Author: andreas
Date: Wed Nov 14 15:35:21 2007
New Revision: 595134
URL: http://svn.apache.org/viewvc?rev=595134&view=rev
Log:
I18n sitemap: don't return an empty catalogue if the catalogue doesn't exist for this locale, because this would avoid the fallback. This fixes bug 43862.
Modified:
lenya/trunk/src/webapp/lenya/i18n.xmap
Modified: lenya/trunk/src/webapp/lenya/i18n.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/i18n.xmap?rev=595134&r1=595133&r2=595134&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/i18n.xmap (original)
+++ lenya/trunk/src/webapp/lenya/i18n.xmap Wed Nov 14 15:35:21 2007
@@ -38,7 +38,7 @@
</map:when>
</map:select>
<map:transform type="xinclude"/>
- <map:serialize/>
+ <map:serialize type="xml"/>
</map:resource>
</map:resources>
@@ -52,26 +52,26 @@
<map:when test="aggregate-fallback://lenya/modules/{1}/resources/i18n/{2}">
<map:generate src="aggregate-fallback://lenya/modules/{1}/resources/i18n/{2}"/>
</map:when>
+ <!-- Modules are not required to contain a catalogue. -->
<map:otherwise>
<map:generate src="resources/i18n/emptyCatalogue.xml"/>
</map:otherwise>
</map:select>
- <map:serialize/>
+ <map:serialize type="xml"/>
</map:match>
<map:match pattern="i18n-catalogue/**">
<map:select type="resource-exists">
<map:when test="aggregate-fallback://lenya/resources/i18n/{1}">
<map:generate src="aggregate-fallback://lenya/resources/i18n/{1}"/>
+ <map:call resource="serializeCatalogue">
+ <map:parameter name="catalogue" value="{1}"/>
+ </map:call>
</map:when>
- <map:otherwise>
- <map:generate src="aggregate-fallback://lenya/resources/i18n/cmsui.xml"/>
- </map:otherwise>
+ <!-- We don't return an empty catalogue, otherwise the fallback from "en_us" to "en" wouldn't be triggered. -->
</map:select>
- <map:call resource="serializeCatalogue">
- <map:parameter name="catalogue" value="{1}"/>
- </map:call>
</map:match>
+
</map:pipeline>
</map:pipelines>
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.