forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r408690 - in /forrest/trunk/main/webapp: forrest.xmap i18n.xmap menu.xmap sitemap.xmap tabs.xmap
Date Mon, 22 May 2006 15:20:24 GMT
Author: bdelacretaz
Date: Mon May 22 08:20:23 2006
New Revision: 408690

URL: http://svn.apache.org/viewvc?rev=408690&view=rev
Log:
FOR-887, make i18n more consistent:
-Single configuration of the LocaleAction and LocaleMatcher in the main sitemap
-Always Use LocaleAction to select the I18nTransformer locale

Modified:
    forrest/trunk/main/webapp/forrest.xmap
    forrest/trunk/main/webapp/i18n.xmap
    forrest/trunk/main/webapp/menu.xmap
    forrest/trunk/main/webapp/sitemap.xmap
    forrest/trunk/main/webapp/tabs.xmap

Modified: forrest/trunk/main/webapp/forrest.xmap
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/forrest.xmap?rev=408690&r1=408689&r2=408690&view=diff
==============================================================================
--- forrest/trunk/main/webapp/forrest.xmap (original)
+++ forrest/trunk/main/webapp/forrest.xmap Mon May 22 08:20:23 2006
@@ -97,8 +97,6 @@
           <document-declaration public-id="-//APACHE//DTD How-to V2.0//EN" />
         </sourcetype>
       </map:action>
-      <map:action logger="sitemap.action.locale" name="locale" src="org.apache.cocoon.acting.LocaleAction">
-      </map:action>
     </map:actions>
     <map:selectors default="parameter">
 	  <map:selector logger="sitemap.selector.parameter" name="parameter" src="org.apache.cocoon.selection.ParameterSelector"
/>

Modified: forrest/trunk/main/webapp/i18n.xmap
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/i18n.xmap?rev=408690&r1=408689&r2=408690&view=diff
==============================================================================
--- forrest/trunk/main/webapp/i18n.xmap (original)
+++ forrest/trunk/main/webapp/i18n.xmap Mon May 22 08:20:23 2006
@@ -34,9 +34,6 @@
         </catalogues>
       </map:transformer>
     </map:transformers>
-    <map:actions>
-      <map:action name="locale" src="org.apache.cocoon.acting.LocaleAction" />
-    </map:actions>
   </map:components> 
 
   <map:pipelines>
@@ -52,7 +49,7 @@
         <map:parameter name="ext"    value="{3}" />
       </map:transform>
       <map:transform type="i18n">
-        <map:parameter name="locale" value="{../language}"/>
+        <map:parameter name="locale" value="{../locale}"/>
       </map:transform>
       <map:serialize />
       </map:match>

Modified: forrest/trunk/main/webapp/menu.xmap
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/menu.xmap?rev=408690&r1=408689&r2=408690&view=diff
==============================================================================
--- forrest/trunk/main/webapp/menu.xmap (original)
+++ forrest/trunk/main/webapp/menu.xmap Mon May 22 08:20:23 2006
@@ -48,9 +48,6 @@
     <map:selectors>
       <map:selector logger="sitemap.selector.config" name="config" src="org.apache.cocoon.selection.SimpleSelector"
/>
     </map:selectors>
-    <map:actions>
-      <map:action name="locale" src="org.apache.cocoon.acting.LocaleAction" />
-    </map:actions>
   </map:components>
 
   <map:pipelines>
@@ -127,10 +124,7 @@
             <map:act type="locale">
               <map:transform src="{lm:transform.book.book-i18n}"/>
               <map:transform type="i18n">
-                <!-- We can use a default locale attribute or Request Parameter
-                <map:parameter name="locale" value="{defaults:locale}"/>
-		<map:parameter name="locale" value="{lang}{country}{variant}"-->
-                <map:parameter name="locale" value="{request:locale}"/>
+                <map:parameter name="locale" value="{locale}"/>
               </map:transform>
             </map:act>
 

Modified: forrest/trunk/main/webapp/sitemap.xmap
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/sitemap.xmap?rev=408690&r1=408689&r2=408690&view=diff
==============================================================================
--- forrest/trunk/main/webapp/sitemap.xmap (original)
+++ forrest/trunk/main/webapp/sitemap.xmap Mon May 22 08:20:23 2006
@@ -224,13 +224,31 @@
       <map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
       <map:matcher name="regexp" src="org.apache.cocoon.matching.RegexpURIMatcher"/>
       <map:matcher name="i18n" src="org.apache.cocoon.matching.LocaleMatcher">
+        <!--  FIXME (FOR-887): make these configurable, using same parameters for LocaleMatcher
and LocaleAction -->
+        <!-- See http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/matching/LocaleMatcher.html
for a description of these parameters -->
+        <default-locale language="en" country="US"/>
         <negotiate>true</negotiate>
+        <use-locale>false</use-locale>
         <use-locales>false</use-locales>
         <use-blank-locale>true</use-blank-locale>
-        <default-locale language="en" country="US"/>
+        <locale-attribute>locale</locale-attribute>
       </map:matcher>
     </map:matchers>
 
+    <map:actions>
+      <map:action name="locale" src="org.apache.cocoon.acting.LocaleAction">
+        <!-- See http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/acting/LocaleAction.html
for a description of these parameters -->
+        <!--  FIXME (FOR-887): make these configurable, using same parameters for LocaleMatcher
and LocaleAction -->
+        <default-locale language="en" country="US"/>
+        <use-locale>false</use-locale>
+        <store-in-request>false</store-in-request>
+        <create-session>false</create-session>
+        <store-in-session>false</store-in-session>
+        <store-in-cookie>false</store-in-cookie>
+        <locale-attribute>locale</locale-attribute>
+      </map:action>
+    </map:actions>
+    
     <map:selectors>
       <map:selector name="exists" logger="sitemap.selector.exists"  
                     src="org.apache.forrest.sourceexists.SourceExistsSelector" />
@@ -286,9 +304,11 @@
         <map:select type="config">
           <map:parameter name="value" value="{defaults:i18n}"/>
           <map:when test="true">	
-            <map:transform type="i18n">
-              <map:parameter name="locale" value="{request:locale}"/>
-            </map:transform>
+            <map:act type="locale">
+              <map:transform type="i18n">
+                <map:parameter name="locale" value="{locale}"/>
+              </map:transform>
+            </map:act>
 	  </map:when>
 	  <map:otherwise>
             <!--

Modified: forrest/trunk/main/webapp/tabs.xmap
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/tabs.xmap?rev=408690&r1=408689&r2=408690&view=diff
==============================================================================
--- forrest/trunk/main/webapp/tabs.xmap (original)
+++ forrest/trunk/main/webapp/tabs.xmap Mon May 22 08:20:23 2006
@@ -32,9 +32,6 @@
         <cache-at-startup>true</cache-at-startup>
       </map:transformer>
     </map:transformers>
-    <map:actions>
-      <map:action name="locale" src="org.apache.cocoon.acting.LocaleAction" />
-    </map:actions>
   </map:components> 
 
   <map:resources>
@@ -63,7 +60,7 @@
             <map:act type="locale">
               <map:transform src="{lm:transform.book.book-i18n}"/>
               <map:transform type="i18n">
-	              <map:parameter name="locale" value="{request:locale}"/>
+                <map:parameter name="locale" value="{locale}"/>
               </map:transform>
             </map:act>
           </map:when>



Mime
View raw message