hi everyone!

yeah, me sending a patch to the list again. but it's short, and i hope somebody gets annoyed enough to apply it :)

for ages i have had problems with i18n in publications derived from a template. the catalog files are not properly found, and the merging of derived catalog and template catalog did not work too well either.

to fix this, i cobbled together the attached patch (which is also in bugzilla http://issues.apache.org/bugzilla/show_bug.cgi?id=38413).

with this patch, a catalog from a derived publication will be correctly merged with its parent's catalog and with the core catalog.

note: it changes the location of the publication catalog from lenya/resources/i18n to resources/i18n. i felt that for a standard feature such as i18n, having to explicitly overload core code (which is implied by using the lenya/ dir) is semantically wrong.

please review and apply. i'm not sure it's 100% correct, but it's at least twice as correct as the current i18n sitemap code :)


regards,

jörn


--
"Open source takes the bullshit out of software."
        - Charles Ferguson on TechnologyReview.com

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: [EMAIL PROTECTED], Telefon: 0203/379-2736
--- src/webapp/lenya/i18n.xmap-old	2006-02-12 14:39:20.000000000 +0100
+++ src/webapp/lenya/i18n.xmap	2006-02-12 14:39:20.000000000 +0100
@@ -30,9 +30,9 @@
     <map:pipeline type="noncaching">
       <map:match pattern="i18n-catalogue/**">
         <map:select type="resource-exists">
-          <map:when test="pubs/{page-envelope:publication-id}/lenya/resources/i18n/{1}">
-            <map:generate type="serverpages" src="resources/i18n/catalogue.xsp">
-              <map:parameter name="pub-catalogue-location" value="context:/lenya/pubs/{page-envelope:publication-id}/lenya/resources/i18n/"/>
+          <map:when test="fallback://resources/i18n/{1}">
+            <map:generate type="serverpages" src="fallback://resources/i18n/catalogue.xsp">
+              <map:parameter name="pub-catalogue-location" value="fallback://resources/i18n/"/>
         	  <map:parameter name="catalogue-file" value="{1}"/>
             </map:generate>
             <map:transform type="xinclude"/>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to