Author: sjur
Date: Thu Sep 11 04:04:00 2008
New Revision: 694215
URL: http://svn.apache.org/viewvc?rev=694215&view=rev
Log:
Added i18n processing for the PDF plugin.
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/output.xmap
Modified: forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/output.xmap
URL:
http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/output.xmap?rev=694215&r1=694214&r2=694215&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/output.xmap
(original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/output.xmap Thu
Sep 11 04:04:00 2008
@@ -27,6 +27,13 @@
]>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:components>
+ <map:transformers default="xslt">
+ <map:transformer name="i18n"
src="org.apache.cocoon.transformation.I18nTransformer">
+ <catalogues default="pdfmessages">
+ <catalogue id="pdfmessages" name="OutputPDFMessages"
location="{lm:plugin.translations}"/>
+ </catalogues>
+ </map:transformer>
+ </map:transformers>
<map:serializers default="fo2pdf">
<map:serializer name="fo2pdf"
src="org.apache.cocoon.blocks.fop.FOPNGSerializer" mime-type="application/pdf">
<user-config>&pdf-config-file;</user-config>
@@ -35,6 +42,7 @@
</map:components>
<map:pipelines>
<map:pipeline>
+ <map:act type="locale" >
<map:match type="regexp" pattern="^(.*?)([^/]*).fo$">
<map:select type="exists">
@@ -59,8 +67,8 @@
</map:select>
<map:serialize type="xml"/>
</map:match>
+
<!-- generate .pdf files from .fo -->
-
<map:match type="regexp" pattern="^(.*?)([^/]*).pdf$">
<map:select type="exists">
<map:when test="{lm:project.{1}{2}.pdf}">
@@ -68,15 +76,22 @@
</map:when>
<map:when test="{lm:project.{1}{2}.fo}">
<map:generate src="{lm:project.{1}{2}.fo}"/>
+ <map:transform type="i18n">
+ <map:parameter name="locale" value="{../locale}"/>
+ </map:transform>
<map:serialize type="fo2pdf"/>
</map:when>
<map:otherwise>
<map:generate src="cocoon://{1}{2}.fo"/>
+ <map:transform type="i18n">
+ <map:parameter name="locale" value="{../locale}"/>
+ </map:transform>
<map:serialize type="fo2pdf"/>
</map:otherwise>
</map:select>
</map:match>
+ </map:act>
</map:pipeline>
</map:pipelines>
</map:sitemap>