Author: sjur
Date: Thu Sep 11 06:16:57 2008
New Revision: 694242
URL: http://svn.apache.org/viewvc?rev=694242&view=rev
Log:
Added i18n of strings in the FO processing.
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-pdfoutline.xsl
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
URL:
http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl?rev=694242&r1=694241&r2=694242&view=diff
==============================================================================
---
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
(original)
+++
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
Thu Sep 11 06:16:57 2008
@@ -19,6 +19,8 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:prop="http://apache.org/forrest/properties/1.0"
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ exclude-result-prefixes="i18n"
version="1.0">
<xsl:variable
name="config"
@@ -597,7 +599,8 @@
select="@id" />
<xsl:call-template
name="insertPageBreaks" />
-<!-- insert i18n stuff here --> NOTICE: <xsl:apply-templates />
+<!-- insert i18n stuff here -->
+ <i18n:text i18n:catalogue="pdfmessages">NOTICE:</i18n:text>
<xsl:apply-templates />
</fo:block>
</xsl:template>
<xsl:template
@@ -620,7 +623,7 @@
<xsl:apply-templates select="@tag"/>
<xsl:choose>
<xsl:when test="starts-with(., '$Revision: ')">
-<!-- insert i18n stuff here --> Version <xsl:value-of select="substring(., 12,
string-length(.) -11-2)"/>
+<!-- insert i18n stuff here --> <i18n:text
i18n:catalogue="pdfmessages">Version</i18n:text> <xsl:value-of
select="substring(., 12, string-length(.) -11-2)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
@@ -636,7 +639,7 @@
font-size="smaller">
<xsl:call-template
name="insertPageBreaks" />
-<!-- insert i18n stuff here --> by <xsl:for-each
+<!-- insert i18n stuff here --> <i18n:text
i18n:catalogue="pdfmessages">by</i18n:text> <xsl:for-each
select="person">
<xsl:value-of
select="@name" />
@@ -658,7 +661,9 @@
id="__toc__">
<xsl:call-template name="insertPageBreaks"/>
<!-- insert i18n stuff here -->
- <xsl:text>Table of contents</xsl:text>
+ <xsl:text>
+ <i18n:text i18n:catalogue="pdfmessages">Table of contents</i18n:text>
+ </xsl:text>
</fo:block>
<fo:block
font-family="{$TOCFontFamily}"
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl
URL:
http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl?rev=694242&r1=694241&r2=694242&view=diff
==============================================================================
---
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl
(original)
+++
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-commonElements.xsl
Thu Sep 11 06:16:57 2008
@@ -15,8 +15,12 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ exclude-result-prefixes="i18n"
+ version="1.0">
<xsl:include href="lm://transform.xml.pathutils"/>
@@ -284,7 +288,10 @@
<xsl:when test="@label">
<xsl:value-of select="@label"/>
</xsl:when>
- <xsl:otherwise>Warning: </xsl:otherwise>
+ <xsl:otherwise>
+ <!-- insert i18n stuff here -->
+ <i18n:text i18n:catalogue="pdfmessages">Warning:</i18n:text>
+ </xsl:otherwise>
</xsl:choose>
<xsl:value-of select="title"/>
</fo:block>
@@ -323,7 +330,9 @@
<xsl:value-of select="@label"/>
</xsl:when>
<!-- insert i18n stuff here -->
- <xsl:otherwise>Note: </xsl:otherwise>
+ <xsl:otherwise>
+ <i18n:text i18n:catalogue="pdfmessages">Note:</i18n:text>
+ </xsl:otherwise>
</xsl:choose>
<xsl:value-of select="title"/>
</fo:block>
@@ -357,7 +366,8 @@
keep-with-next.within-column="always">
<xsl:copy-of select="@id"/>
<xsl:call-template name="insertPageBreaks"/>
- <!-- insert i18n stuff here --> FIXME (
+ <!-- insert i18n stuff here -->
+ <i18n:text i18n:catalogue="pdfmessages">FIXME</i18n:text> (
<xsl:value-of select="@author"/>):
<xsl:value-of select="title"/> </fo:block>
<fo:block margin-left="0.25in" margin-right="0.25in"
@@ -552,7 +562,8 @@
<xsl:if test="caption">
<fo:block font-size="10pt" text-align="left" font-weight="normal"
margin-top="5pt" keep-with-next.within-column="always">
- <!-- insert i18n stuff here --> Table
+ <!-- insert i18n stuff here -->
+ <i18n:text i18n:catalogue="pdfmessages">Table</i18n:text>
<xsl:text>
</xsl:text>
<xsl:number count="table" level="multiple"/>
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-pdfoutline.xsl
URL:
http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-pdfoutline.xsl?rev=694242&r1=694241&r2=694242&view=diff
==============================================================================
---
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-pdfoutline.xsl
(original)
+++
forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/helper-pdfoutline.xsl
Thu Sep 11 06:16:57 2008
@@ -18,6 +18,8 @@
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ exclude-result-prefixes="i18n"
version="1.0">
<xsl:template
match="document"
@@ -28,7 +30,7 @@
<fo:bookmark internal-destination="__toc__">
<fo:bookmark-title>
<!-- insert i18n stuff here -->
- <xsl:text>Table of contents</xsl:text>
+ <xsl:text><i18n:text i18n:catalogue="pdfmessages">Table of
contents</i18n:text></xsl:text>
</fo:bookmark-title>
</fo:bookmark>
</xsl:if>