You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by fl...@apache.org on 2010/11/09 19:56:20 UTC
svn commit: r1033154 - in
/lenya/trunk/org.apache.lenya.core.i18n/src/main/resources:
COB-INF/sitemap.xmap COB-INF/xslt/emptyCatalogue.xml
META-INF/cocoon/avalon/lenya-core-i18n-sitemap.xconf
META-INF/cocoon/spring/lenya-core-i18n-module-registration.xml
Author: florent
Date: Tue Nov 9 18:56:20 2010
New Revision: 1033154
URL: http://svn.apache.org/viewvc?rev=1033154&view=rev
Log:
solve some i18n issues
Added:
lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/META-INF/cocoon/spring/lenya-core-i18n-module-registration.xml
Modified:
lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/COB-INF/sitemap.xmap
lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/COB-INF/xslt/emptyCatalogue.xml
lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/META-INF/cocoon/avalon/lenya-core-i18n-sitemap.xconf
Modified: lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/COB-INF/sitemap.xmap?rev=1033154&r1=1033153&r2=1033154&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/COB-INF/sitemap.xmap (original)
+++ lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/COB-INF/sitemap.xmap Tue Nov 9 18:56:20 2010
@@ -24,10 +24,9 @@
in sitemap.xmap and global-sitemap.xmap.
-->
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
- <map:pipelines>
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+ <map:pipelines>
<map:pipeline id="service">
<map:match pattern="translation">
@@ -42,13 +41,13 @@
</map:pipeline>
<map:pipeline type="noncaching">
-
+
<!-- This pipeline is decoupled from the one below because the page-envelope input module
call prevents it from being cached. -->
<!-- catalogue/{1:catalogue} -->
<map:match pattern="catalogue/*">
<map:select type="resource-exists">
- <map:when test="context://lenya/resources/i18n/{1}">
+ <map:when test="fallback://lenya/resources/i18n/{1}">
<map:select type="parameter">
<map:parameter name="parameter-selector-test" value="{page-envelope:is-publication}"/>
<map:when test="true">
Modified: lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/COB-INF/xslt/emptyCatalogue.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/COB-INF/xslt/emptyCatalogue.xml?rev=1033154&r1=1033153&r2=1033154&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/COB-INF/xslt/emptyCatalogue.xml (original)
+++ lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/COB-INF/xslt/emptyCatalogue.xml Tue Nov 9 18:56:20 2010
@@ -16,6 +16,13 @@
limitations under the License.
-->
-<catalogue xmlns="http://apache.org/cocoon/i18n/2.1"/>
+<catalogue xmlns="http://apache.org/cocoon/i18n/2.1">
+ <!-- add this message because the directive
+ <i:include src="path/file" strip-root="true" /> throw an error if the file is just composed by root
+ TODO : solve this bug in the cocoon include transformer and clean this workaround here
+ -->
+ <message key="empty.catalogue">Empty Catalogue</message>
+
+</catalogue>
Modified: lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/META-INF/cocoon/avalon/lenya-core-i18n-sitemap.xconf
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/META-INF/cocoon/avalon/lenya-core-i18n-sitemap.xconf?rev=1033154&r1=1033153&r2=1033154&view=diff
==============================================================================
--- lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/META-INF/cocoon/avalon/lenya-core-i18n-sitemap.xconf (original)
+++ lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/META-INF/cocoon/avalon/lenya-core-i18n-sitemap.xconf Tue Nov 9 18:56:20 2010
@@ -16,14 +16,43 @@
limitations under the License.
-->
-<!-- <catalogue id="cmsui" name="cmsui" location="cocoon://modules/i18n/catalogue/"/> -->
+<!-- TODO : use the "dynamic" catalogue pipeline ie with this catalogue definition (that refer to a pipeline in this sitemap) :
+ <catalogue id="cmsui" name="cmsui" location="servlet:i18n:/catalogue/" />
+
+ There is a strange behaviour : when the i18n transformer is use in this context
+ <map:match pattern="thatworks">
+ <map:generate src="alocalFile.xml"/>
+ <map:transform type="i18n"/>
+ <map:serialize type="xml"/>
+ </map:match>
+
+ This works
+
+ But this don't works when used in this context :
+ <map:match pattern="translation">
+ <map:generate src="service-consumer:" />
+ <map:transform type="i18n">
+ <map:parameter name="locale" value="{request:locale}" />
+ </map:transform>
+ <map:serialize type="xml" />
+ </map:match>
+
+
+ I also try <catalogue id="cmsui" name="cmsui" location="servlet:i18n:/catalogue" />
+ with no success...
+
+
+-->
<map:components xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:transformers>
<map:transformer name="i18n" logger="sitemap.transformer.i18n" src="org.apache.cocoon.transformation.I18nTransformer">
<catalogues default="cmsui">
- <catalogue id="cmsui" name="cmsui" location="resources/i18n"/>
+ <catalogue id="cmsui" name="cmsui" location="resources/i18n" />
+ <!-- this under seems to not work too... and this is not a good approch because all module have to be referenced here -->
+ <catalogue id="export-module" name="cmsui" location="fallback://lenya/modules/export/resources/i18n" />
</catalogues>
- <untranslated-text>untranslated</untranslated-text>
+ <!-- commented while translation not solve
+ <untranslated-text>untranslated</untranslated-text> -->
<cache-at-startup>true</cache-at-startup>
</map:transformer>
</map:transformers>
Added: lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/META-INF/cocoon/spring/lenya-core-i18n-module-registration.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/META-INF/cocoon/spring/lenya-core-i18n-module-registration.xml?rev=1033154&view=auto
==============================================================================
--- lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/META-INF/cocoon/spring/lenya-core-i18n-module-registration.xml (added)
+++ lenya/trunk/org.apache.lenya.core.i18n/src/main/resources/META-INF/cocoon/spring/lenya-core-i18n-module-registration.xml Tue Nov 9 18:56:20 2010
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:p="http://www.springframework.org/schema/p"
+ xmlns:configurator="http://cocoon.apache.org/schema/configurator"
+ xmlns="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://cocoon.apache.org/schema/configurator http://cocoon.apache.org/schema/configurator/cocoon-configurator-1.0.1.xsd">
+
+ <bean name="org.apache.lenya.cms.module.Module/i18n"
+ class="org.apache.lenya.cms.module.ModuleImpl">
+ <property name="baseUri" value="file://${lenya.home}/org.apache.lenya.core.i18n/target/classes/COB-INF"/>
+ </bean>
+
+</beans>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org