[yelp-xsl] Made copyright notices localizable (DocBook and Mallard)
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-xsl] Made copyright notices localizable (DocBook and Mallard)
- Date: Thu, 26 Jan 2012 23:34:38 +0000 (UTC)
commit 1531d46a2399c11662304b8e72a97355ff59cb4c
Author: Shaun McCance <shaunm gnome org>
Date: Thu Jan 26 10:29:41 2012 -0500
Made copyright notices localizable (DocBook and Mallard)
xslt/common/domains/yelp-xsl.pot | 32 +++++++++++++++++++++---------
xslt/common/domains/yelp-xsl.xml.in | 15 +++++++++++++-
xslt/docbook/common/db-common.xsl | 36 ++++++++++++++++++++++------------
xslt/mallard/html/mal2html-page.xsl | 22 ++++++++++++++++++--
4 files changed, 78 insertions(+), 27 deletions(-)
---
diff --git a/xslt/common/domains/yelp-xsl.pot b/xslt/common/domains/yelp-xsl.pot
index db0a839..1c2c77b 100644
--- a/xslt/common/domains/yelp-xsl.pot
+++ b/xslt/common/domains/yelp-xsl.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2011-11-11 07:53-0500\n"
+"POT-Creation-Date: 2012-01-26 10:28-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL ADDRESS>\n"
"Language-Team: LANGUAGE <LL li org>\n"
@@ -333,7 +333,7 @@ msgstr ""
#. these are generally formatted with [square brackets] surrounding
#. them.
#.
-#. This string is similar to citation.format, but they are used in
+#. This string is similar to citation.label, but they are used in
#. different places. The citation formatter is used when referencing
#. a bibliography entry in running prose. This formatter is used for
#. the actual bibliography entry. You may use the same formatting for
@@ -419,6 +419,18 @@ msgstr ""
msgid "from <comment.name/>"
msgstr ""
+#. ID: copyright.format
+#. This is a format message used to format copyright notices. Special
+#. elements in the message will be replaced with the appropriate content,
+#. as follows:
+#.
+#. <copyright.years/> - The years the copyrightable material was made
+#. <copyright.name/> - The person or entity that holds the copyright
+#.
+#: yelp-xsl.xml.in:470(msg/msgstr)
+msgid "Â <copyright.years/> <copyright.name/>"
+msgstr ""
+
#. ID: email.tooltip
#. This is a format message used to format tooltips on mailto: links.
#. Special elements in the message will be replaced with the appropriate
@@ -426,7 +438,7 @@ msgstr ""
#.
#. <string/> - The linked-to email address
#.
-#: yelp-xsl.xml.in:469(msg/msgstr)
+#: yelp-xsl.xml.in:482(msg/msgstr)
msgid "Send email to â<string/>â."
msgstr ""
@@ -437,7 +449,7 @@ msgstr ""
#.
#. <glossterm/> - The term being defined by the glossary entry
#.
-#: yelp-xsl.xml.in:481(msg/msgstr)
+#: yelp-xsl.xml.in:494(msg/msgstr)
msgid "Read the definition for â<glossterm/>â."
msgstr ""
@@ -457,7 +469,7 @@ msgstr ""
#.
#. <glosssee/> - The actual link or links of the cross reference
#.
-#: yelp-xsl.xml.in:502(msg/msgstr)
+#: yelp-xsl.xml.in:515(msg/msgstr)
msgid "See <glosssee/>."
msgstr ""
@@ -478,7 +490,7 @@ msgstr ""
#.
#. <glosssee/> - The actual link or links of the cross reference
#.
-#: yelp-xsl.xml.in:524(msg/msgstr)
+#: yelp-xsl.xml.in:537(msg/msgstr)
msgid "See also <glosssee/>."
msgstr ""
@@ -489,7 +501,7 @@ msgstr ""
#.
#. <node/> - The text content of the quote element
#.
-#: yelp-xsl.xml.in:536(msg/msgstr)
+#: yelp-xsl.xml.in:549(msg/msgstr)
msgid "â<node/>â"
msgstr ""
@@ -500,7 +512,7 @@ msgstr ""
#.
#. <node/> - The text content of the quote element
#.
-#: yelp-xsl.xml.in:548(msg/msgstr)
+#: yelp-xsl.xml.in:561(msg/msgstr)
msgid "â<node/>â"
msgstr ""
@@ -514,7 +526,7 @@ msgstr ""
#.
#. <seeie/> - The actual link or links of the cross reference
#.
-#: yelp-xsl.xml.in:563(msg/msgstr)
+#: yelp-xsl.xml.in:576(msg/msgstr)
msgid "See <seeie/>."
msgstr ""
@@ -528,7 +540,7 @@ msgstr ""
#.
#. <seeie/> - The actual link or links of the cross reference
#.
-#: yelp-xsl.xml.in:578(msg/msgstr)
+#: yelp-xsl.xml.in:591(msg/msgstr)
msgid "See also <seeie/>."
msgstr ""
diff --git a/xslt/common/domains/yelp-xsl.xml.in b/xslt/common/domains/yelp-xsl.xml.in
index cf02699..59f4471 100644
--- a/xslt/common/domains/yelp-xsl.xml.in
+++ b/xslt/common/domains/yelp-xsl.xml.in
@@ -369,7 +369,7 @@ of the authors' names and the year of publication. In English,
these are generally formatted with [square brackets] surrounding
them.
-This string is similar to citation.format, but they are used in
+This string is similar to citation.label, but they are used in
different places. The citation formatter is used when referencing
a bibliography entry in running prose. This formatter is used for
the actual bibliography entry. You may use the same formatting for
@@ -457,6 +457,19 @@ appropriate content, as follows:
<msgstr>from <comment.name/></msgstr>
</msg>
+<msg id="copyright.format">
+<its:locNote>
+ID: copyright.format
+This is a format message used to format copyright notices. Special
+elements in the message will be replaced with the appropriate content,
+as follows:
+
+<copyright.years/> - The years the copyrightable material was made
+<copyright.name/> - The person or entity that holds the copyright
+</its:locNote>
+<msgstr>Â <copyright.years/> <copyright.name/></msgstr>
+</msg>
+
<msg id="email.tooltip">
<its:locNote>
ID: email.tooltip
diff --git a/xslt/docbook/common/db-common.xsl b/xslt/docbook/common/db-common.xsl
index 1e9610d..415d8f2 100644
--- a/xslt/docbook/common/db-common.xsl
+++ b/xslt/docbook/common/db-common.xsl
@@ -19,7 +19,8 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:db="http://docbook.org/ns/docbook"
xmlns:str="http://exslt.org/strings"
- exclude-result-prefixes="db str"
+ xmlns:msg="http://projects.gnome.org/yelp/gettext/"
+ exclude-result-prefixes="db str msg"
version="1.0">
<!--!!==========================================================================
@@ -44,7 +45,15 @@ notice, beginning with the copyright symbol "Â".
-->
<xsl:template name="db.copyright">
<xsl:param name="node" select="."/>
- <xsl:text> </xsl:text>
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="'copyright.format'"/>
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="format" select="true()"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="l10n.format.mode" match="msg:copyright.years">
+ <xsl:param name="node"/>
<xsl:for-each select="$node/year | $node/db:year">
<xsl:if test="position() != 1">
<xsl:call-template name="l10n.gettext">
@@ -53,17 +62,18 @@ notice, beginning with the copyright symbol "Â".
</xsl:if>
<xsl:apply-templates select="."/>
</xsl:for-each>
- <xsl:if test="$node/holder | $node/db:holder">
- <xsl:text>  </xsl:text>
- <xsl:for-each select="$node/holder | $node/db:holder">
- <xsl:if test="position() != 1">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="', '"/>
- </xsl:call-template>
- </xsl:if>
- <xsl:apply-templates select="."/>
- </xsl:for-each>
- </xsl:if>
+</xsl:template>
+
+<xsl:template mode="l10n.format.mode" match="msg:copyright.name">
+ <xsl:param name="node"/>
+ <xsl:for-each select="$node/holder | $node/db:holder">
+ <xsl:if test="position() != 1">
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="', '"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:apply-templates select="."/>
+ </xsl:for-each>
</xsl:template>
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index 5e9de01..c9f0dc1 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -22,8 +22,9 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
xmlns:e="http://projectmallard.org/experimental/"
xmlns:exsl="http://exslt.org/common"
xmlns:set="http://exslt.org/sets"
+ xmlns:msg="http://projects.gnome.org/yelp/gettext/"
xmlns="http://www.w3.org/1999/xhtml"
- exclude-result-prefixes="mal ui e exsl set"
+ exclude-result-prefixes="mal ui e exsl set msg"
version="1.0">
<!--!!==========================================================================
@@ -73,8 +74,11 @@ the #{page} element. Information is extracted from the #{info} element of ${node
<div class="copyrights">
<xsl:for-each select="$copyrights">
<div class="copyright">
- <!-- FIXME: i18n, multi-year, email -->
- <xsl:value-of select="concat('Â ', mal:years, ' ', mal:name)"/>
+ <xsl:call-template name="l10n.gettext">
+ <xsl:with-param name="msgid" select="'copyright.format'"/>
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="format" select="true()"/>
+ </xsl:call-template>
</div>
</xsl:for-each>
</div>
@@ -209,6 +213,18 @@ the #{page} element. Information is extracted from the #{info} element of ${node
</xsl:if>
</xsl:template>
+<xsl:template mode="l10n.format.mode" match="msg:copyright.years">
+ <xsl:param name="node"/>
+ <xsl:apply-templates mode="mal2html.inline.mode"
+ select="$node/mal:years/node()"/>
+</xsl:template>
+
+<xsl:template mode="l10n.format.mode" match="msg:copyright.name">
+ <xsl:param name="node"/>
+ <xsl:apply-templates mode="mal2html.inline.mode"
+ select="$node/mal:name/node()"/>
+</xsl:template>
+
<!--**==========================================================================
mal2html.page.linktrails
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]