forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From che...@apache.org
Subject svn commit: r154917 - in forrest/trunk: docs-author/status.xml main/webapp/forrest.xmap main/webapp/menu.xmap main/webapp/tabs.xmap
Date Wed, 23 Feb 2005 00:02:36 GMT
Author: cheche
Date: Tue Feb 22 16:02:34 2005
New Revision: 154917

URL: http://svn.apache.org/viewcvs?view=rev&rev=154917
Log:
I18n uses org.apache.cocoon.matching.LocaleMatcher instead of i18n transformer.
This requiered that your source must be foo.lang.xml instead of foo_lang.xml


Modified:
    forrest/trunk/docs-author/status.xml
    forrest/trunk/main/webapp/forrest.xmap
    forrest/trunk/main/webapp/menu.xmap
    forrest/trunk/main/webapp/tabs.xmap

Modified: forrest/trunk/docs-author/status.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/docs-author/status.xml?view=diff&r1=154916&r2=154917
==============================================================================
--- forrest/trunk/docs-author/status.xml (original)
+++ forrest/trunk/docs-author/status.xml Tue Feb 22 16:02:34 2005
@@ -51,6 +51,10 @@
         Added document to facilitate
         <link href="site:upgrading_07">upgrading to v0.7</link>
       </action>
+      <action dev="JJP" type="fix" context="core" fixes-bug="FOR-18" >
+        I18n uses org.apache.cocoon.matching.LocaleMatcher instead of i18n transformer.
+       This requiered that your source must be foo.lang.xml instead of foo_lang.xml
+      </action>
       <action dev="RDG" type="add" context="plugins" fixes-bug="FOR-445" due-to="Cyriaque
Dupoirieux">
         Added proxy.host and proxy.port to allow plugin downloads from behind a
         proxy.

Modified: forrest/trunk/main/webapp/forrest.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/forrest.xmap?view=diff&r1=154916&r2=154917
==============================================================================
--- forrest/trunk/main/webapp/forrest.xmap (original)
+++ forrest/trunk/main/webapp/forrest.xmap Tue Feb 22 16:02:34 2005
@@ -51,7 +51,15 @@
                   
     </map:generators>
     <map:serializers default="html"/>
-    <map:matchers default="wildcard"/>
+    <map:matchers default="wildcard">
+    <map:matcher name="i18n" src="org.apache.cocoon.matching.LocaleMatcher">
+    <negotiate>true</negotiate>
+    <use-locales>true</use-locales>
+    <use-blank-locale>true</use-blank-locale>
+    <default-locale language="en" country="US"/>
+    </map:matcher>
+    </map:matchers>
+
 
     <map:transformers default="xslt">
 	   <map:transformer name="pattern" 
@@ -297,23 +305,49 @@
       <!-- SOURCE FORMATS                                               -->
       <!-- ============================================================ -->
 
-      <map:match pattern="**.xml">
-        <map:select type="config">
-          <map:parameter name="value" value="{defaults:i18n}"/>
-          <map:when test="true">
-          <map:act type="locale">
-            <map:call resource="file-resolver">
-              <map:parameter name="uri" value="{../1}_{language}"/>
-            </map:call>
-          </map:act>
-          </map:when>
-          <map:otherwise>
-            <map:call resource="file-resolver">
-              <map:parameter name="uri" value="{1}"/>
-            </map:call>
-          </map:otherwise>
-        </map:select>
-      </map:match>
+      <map:match type="wildcard" pattern="**.xml">
+       <map:match type="i18n" pattern="{project:content.xdocs}{1}.*.xml">
+          <map:generate src="{source}" />
+          <map:call resource="transform-to-document">
+            <map:parameter name="src" value="{source}" />
+          </map:call>
+          <map:serialize type="xml-document"/>
+       </map:match>
+       <map:match type="i18n" pattern="{project:content.xdocs}{1}.*.ihtml">
+         <map:generate src="{source}" type="html" />
+         <map:transform src="{forrest:stylesheets}/html2document.xsl" />
+         <map:transform type="idgen" />
+         <map:serialize type="xml-document"/>
+       </map:match>
+       <map:match type="i18n" pattern="{project:content.xdocs}{1}.*.html">
+         <map:generate src="{source}" type="html" />
+         <map:transform src="{forrest:stylesheets}/html2document.xsl" />
+         <map:transform type="idgen" />
+         <map:serialize type="xml-document"/>
+       </map:match>
+       <map:match type="i18n" pattern="{project:content.xdocs}{1}.*.txt">
+         <map:generate type="text2xml" src="{source}" />
+         <map:transform src="{forrest:stylesheets}/text2document.xsl">
+         <map:parameter name="filename" value="{2}" />
+         </map:transform>
+         <map:serialize type="xml-document"/>
+       </map:match>
+       <map:match type="i18n" pattern="{project:content.xdocs}{1}.*.xml">
+          <map:generate src="{source}" />
+          <map:call resource="transform-to-document">
+            <map:parameter name="src" value="{source}" />
+          </map:call>
+          <map:serialize type="xml-document"/>
+       </map:match>
+       <map:select type="exists">
+         <map:when test="{project:temp-dir}/input.xmap">
+             <map:mount uri-prefix=""
+                        src="{project:temp-dir}/input.xmap"
+                        check-reload="yes"
+                        pass-through="true"/>
+         </map:when> 
+       </map:select>
+     </map:match>
       
   </map:pipeline>
 

Modified: forrest/trunk/main/webapp/menu.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/menu.xmap?view=diff&r1=154916&r2=154917
==============================================================================
--- forrest/trunk/main/webapp/menu.xmap (original)
+++ forrest/trunk/main/webapp/menu.xmap Tue Feb 22 16:02:34 2005
@@ -135,7 +135,7 @@
                 <map:parameter name="locale" value="{defaults:locale}"/>
                 <map:parameter name="locale" value="{request-param:locale}"/>
                 -->
-                <map:parameter name="locale" value="{language}{country}{variant}"/>
+                <map:parameter name="locale" value="{lang}{country}{variant}"/>
               </map:transform>
             </map:act>
 

Modified: forrest/trunk/main/webapp/tabs.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/tabs.xmap?view=diff&r1=154916&r2=154917
==============================================================================
--- forrest/trunk/main/webapp/tabs.xmap (original)
+++ forrest/trunk/main/webapp/tabs.xmap Tue Feb 22 16:02:34 2005
@@ -77,7 +77,7 @@
             <map:act type="locale">
               <map:transform src="{forrest:stylesheets}/i18n.xsl"/>
               <map:transform type="i18n">
-                <map:parameter name="locale" value="{language}{country}{variant}"/>
+                <map:parameter name="locale" value="{lang}{country}{variant}"/>
               </map:transform>
             </map:act>
           </map:when>



Mime
View raw message