[yelp-xsl] Fixed seeie/seealsoie formatters in DocBook, bug in gettext
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-xsl] Fixed seeie/seealsoie formatters in DocBook, bug in gettext
- Date: Fri, 1 Jul 2011 14:15:56 +0000 (UTC)
commit beb0b7e841ce35d1375488075bb117dbf24a09c2
Author: Shaun McCance <shaunm gnome org>
Date: Fri Jul 1 10:20:06 2011 -0400
Fixed seeie/seealsoie formatters in DocBook, bug in gettext
test/testdocs/index.x001.xml | 65 +++++++++++++++++
xslt/docbook/html/db2html-index.xsl | 2 +-
xslt/gettext/domains/yelp-xsl.pot | 130 ++++++++++++++++++++-------------
xslt/gettext/domains/yelp-xsl.xml.in | 101 ++++++++-------------------
xslt/gettext/gettext.xsl | 4 +-
5 files changed, 177 insertions(+), 125 deletions(-)
---
diff --git a/test/testdocs/index.x001.xml b/test/testdocs/index.x001.xml
new file mode 100644
index 0000000..ae132e2
--- /dev/null
+++ b/test/testdocs/index.x001.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE index PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
+<index id="index">
+<indexinfo>
+<title>Unit Test: index.x001.xml</title>
+<authorgroup>
+<author><firstname>Shaun</firstname><surname>McCance</surname>
+<affiliation><address><email>shaunm gnome org</email></address></affiliation>
+</author>
+</authorgroup>
+</indexinfo>
+
+<indexentry>
+<primaryie>code</primaryie>
+<secondaryie>block</secondaryie>
+<secondaryie>inline</secondaryie>
+</indexentry>
+
+<indexentry>
+<primaryie>comment</primaryie>
+</indexentry>
+
+<indexentry>
+<primaryie>example</primaryie>
+</indexentry>
+
+<indexentry id="figure">
+<primaryie>figure</primaryie>
+<seeie linkend="listing">listing</seeie>
+<seeie linkend="listing">media</seeie>
+</indexentry>
+
+<indexentry id="listing">
+<primaryie>listing</primaryie>
+<seealsoie linkend="figure">figure</seealsoie>
+</indexentry>
+
+<indexentry>
+<primaryie>media</primaryie>
+<secondaryie>block</secondaryie>
+<secondaryie>inline</secondaryie>
+</indexentry>
+
+<indexentry>
+<primaryie>note</primaryie>
+</indexentry>
+
+<indexentry>
+<primaryie>p</primaryie>
+</indexentry>
+
+<indexentry>
+<primaryie>quote</primaryie>
+</indexentry>
+
+<indexentry>
+<primaryie>screen</primaryie>
+</indexentry>
+
+<indexentry>
+<primaryie>synopsis</primaryie>
+</indexentry>
+
+</index>
diff --git a/xslt/docbook/html/db2html-index.xsl b/xslt/docbook/html/db2html-index.xsl
index c94ac92..59ea2dc 100644
--- a/xslt/docbook/html/db2html-index.xsl
+++ b/xslt/docbook/html/db2html-index.xsl
@@ -202,7 +202,7 @@ indexterm (autoidx)
<xsl:with-param name="msgid" select="', '"/>
</xsl:call-template>
</xsl:if>
- <xsl:value-of select="."/>
+ <xsl:apply-templates/>
<!--
<xsl:choose>
<xsl:when test="@otherterm">
diff --git a/xslt/gettext/domains/yelp-xsl.pot b/xslt/gettext/domains/yelp-xsl.pot
index 9630376..89f7d92 100644
--- a/xslt/gettext/domains/yelp-xsl.pot
+++ b/xslt/gettext/domains/yelp-xsl.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2011-06-18 12:22-0400\n"
+"POT-Creation-Date: 2011-07-01 10:19-0400\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"
@@ -14,7 +14,7 @@ msgstr ""
#. translate it to "predefinito:LTR", if it isn't default:LTR
#. or default:RTL it will not work.
#.
-#: yelp-xsl.xml.in:28(msg/msgstr)
+#: yelp-xsl.xml.in:27(msg/msgstr)
msgid "default:LTR"
msgstr ""
@@ -25,7 +25,7 @@ msgstr ""
#.
#. Make sure to include leading or trailing spaces if you want them.
#.
-#: yelp-xsl.xml.in:41(msg/msgstr)
+#: yelp-xsl.xml.in:40(msg/msgstr)
#, no-wrap
msgid ""
", "
@@ -38,7 +38,7 @@ msgstr ""
#.
#. Make sure to include leading or trailing spaces if you want them.
#.
-#: yelp-xsl.xml.in:54(msg/msgstr)
+#: yelp-xsl.xml.in:53(msg/msgstr)
#, no-wrap
msgid ""
", and "
@@ -49,7 +49,7 @@ msgstr ""
#.
#. Make sure to include leading or trailing spaces if you want them.
#.
-#: yelp-xsl.xml.in:65(msg/msgstr)
+#: yelp-xsl.xml.in:64(msg/msgstr)
#, no-wrap
msgid ""
" and "
@@ -63,7 +63,7 @@ msgstr ""
#. the labelling style for a qandaset. If the labelling style is set
#. to 'qanda', this string will be used to label questions.
#.
-#: yelp-xsl.xml.in:80(msg/msgstr)
+#: yelp-xsl.xml.in:79(msg/msgstr)
msgid "Q:"
msgstr ""
@@ -75,146 +75,146 @@ msgstr ""
#. the labelling style for a qandaset. If the labelling style is set
#. to 'qanda', this string will be used to label answers.
#.
-#: yelp-xsl.xml.in:93(msg/msgstr)
+#: yelp-xsl.xml.in:92(msg/msgstr)
msgid "A:"
msgstr ""
#. Accessible title for an advanced note.
-#: yelp-xsl.xml.in:100(msg/msgstr)
+#: yelp-xsl.xml.in:99(msg/msgstr)
msgid "Advanced"
msgstr ""
#. Default title for a bibliography.
-#: yelp-xsl.xml.in:105(msg/msgstr)
+#: yelp-xsl.xml.in:104(msg/msgstr)
msgid "Bibliography"
msgstr ""
#. Accessible title for a note about a software bug.
-#: yelp-xsl.xml.in:110(msg/msgstr)
+#: yelp-xsl.xml.in:109(msg/msgstr)
msgid "Bug"
msgstr ""
#. Revision status of a document or page. Content has been written and
#. reviewed, and it awaiting a final approval.
#.
-#: yelp-xsl.xml.in:118(msg/msgstr)
+#: yelp-xsl.xml.in:117(msg/msgstr)
msgid "Candidate"
msgstr ""
#. Default title for a colophon section.
-#: yelp-xsl.xml.in:124(msg/msgstr)
+#: yelp-xsl.xml.in:123(msg/msgstr)
msgid "Colophon"
msgstr ""
#. Title of the listing of subsections.
-#: yelp-xsl.xml.in:130(msg/msgstr)
+#: yelp-xsl.xml.in:129(msg/msgstr)
msgid "Contents"
msgstr ""
#. Default title for a dedication section.
-#: yelp-xsl.xml.in:135(msg/msgstr)
+#: yelp-xsl.xml.in:134(msg/msgstr)
msgid "Dedication"
msgstr ""
#. Revision status of a document or page. Most content has been
#. written, but revisions are still happening.
#.
-#: yelp-xsl.xml.in:143(msg/msgstr)
+#: yelp-xsl.xml.in:142(msg/msgstr)
msgid "Draft"
msgstr ""
#. Revision status of a document or page. A senior member of the
#. documentation team has reviewed and approved.
#.
-#: yelp-xsl.xml.in:151(msg/msgstr)
+#: yelp-xsl.xml.in:150(msg/msgstr)
msgid "Final"
msgstr ""
#. Automatic heading above a list of related links.
-#: yelp-xsl.xml.in:156(msg/msgstr)
+#: yelp-xsl.xml.in:155(msg/msgstr)
msgid "Further Reading"
msgstr ""
#. Default title for a glossary.
-#: yelp-xsl.xml.in:161(msg/msgstr)
+#: yelp-xsl.xml.in:160(msg/msgstr)
msgid "Glossary"
msgstr ""
#. Accessible title for an important note.
-#: yelp-xsl.xml.in:166(msg/msgstr)
+#: yelp-xsl.xml.in:165(msg/msgstr)
msgid "Important"
msgstr ""
#. Revision status of a document or page. Work has begun, but
#. not all content has been written.
#.
-#: yelp-xsl.xml.in:174(msg/msgstr)
+#: yelp-xsl.xml.in:173(msg/msgstr)
msgid "Incomplete"
msgstr ""
#. Default title for an index of terms in a book.
-#: yelp-xsl.xml.in:179(msg/msgstr)
+#: yelp-xsl.xml.in:178(msg/msgstr)
msgid "Index"
msgstr ""
#. Automatic heading above a list of guide links.
-#: yelp-xsl.xml.in:184(msg/msgstr)
+#: yelp-xsl.xml.in:183(msg/msgstr)
msgid "More About"
msgstr ""
#. Default title for a refnamediv element. This is the common section
#. title found in most UNIX man pages.
#.
-#: yelp-xsl.xml.in:193(msg/msgstr)
+#: yelp-xsl.xml.in:192(msg/msgstr)
msgid "Name"
msgstr ""
#. Link text for a link to the next page in a series.
-#: yelp-xsl.xml.in:198(msg/msgstr)
+#: yelp-xsl.xml.in:197(msg/msgstr)
msgid "Next"
msgstr ""
#. Accessible title for a note.
-#: yelp-xsl.xml.in:203(msg/msgstr)
+#: yelp-xsl.xml.in:202(msg/msgstr)
msgid "Note"
msgstr ""
#. Revision status of a document or page. Content was once current,
#. but needs to be updated to reflect software updates.
#.
-#: yelp-xsl.xml.in:211(msg/msgstr)
+#: yelp-xsl.xml.in:210(msg/msgstr)
msgid "Outdated"
msgstr ""
#. Tooltip on play/pause buttons for audio and video objects.
-#: yelp-xsl.xml.in:216(msg/msgstr)
+#: yelp-xsl.xml.in:215(msg/msgstr)
msgid "Pause"
msgstr ""
#. Tooltip on play/pause buttons for audio and video objects.
-#: yelp-xsl.xml.in:221(msg/msgstr)
+#: yelp-xsl.xml.in:220(msg/msgstr)
msgid "Play"
msgstr ""
#. Default title for a preface to a book.
-#: yelp-xsl.xml.in:227(msg/msgstr)
+#: yelp-xsl.xml.in:226(msg/msgstr)
msgid "Preface"
msgstr ""
#. Link text for a link to the previous page in a series.
-#: yelp-xsl.xml.in:232(msg/msgstr)
+#: yelp-xsl.xml.in:231(msg/msgstr)
msgid "Previous"
msgstr ""
#. Revision status of a document or page. Content has been written
#. and should be reviewed by other team members.
#.
-#: yelp-xsl.xml.in:240(msg/msgstr)
+#: yelp-xsl.xml.in:239(msg/msgstr)
msgid "Ready for review"
msgstr ""
#. Automatic heading above a list of see-also links.
-#: yelp-xsl.xml.in:245(msg/msgstr)
+#: yelp-xsl.xml.in:244(msg/msgstr)
msgid "See Also"
msgstr ""
@@ -222,42 +222,42 @@ msgstr ""
#. This is used a tooltip on a link to shrink images back down after
#. they've been expanded to full size.
#.
-#: yelp-xsl.xml.in:254(msg/msgstr)
+#: yelp-xsl.xml.in:253(msg/msgstr)
msgid "Scale images down"
msgstr ""
#. Accessible title for a sidebar note.
-#: yelp-xsl.xml.in:259(msg/msgstr)
+#: yelp-xsl.xml.in:258(msg/msgstr)
msgid "Sidebar"
msgstr ""
#. Revision status of a document or page. No content has been written yet.
#.
-#: yelp-xsl.xml.in:266(msg/msgstr)
+#: yelp-xsl.xml.in:265(msg/msgstr)
msgid "Stub"
msgstr ""
#. Default title for a refsynopsisdiv element. This is the common section
#. title found in most UNIX man pages.
#.
-#: yelp-xsl.xml.in:274(msg/msgstr)
+#: yelp-xsl.xml.in:273(msg/msgstr)
msgid "Synopsis"
msgstr ""
#. Accessible title for a tip.
-#: yelp-xsl.xml.in:279(msg/msgstr)
+#: yelp-xsl.xml.in:278(msg/msgstr)
msgid "Tip"
msgstr ""
#. Figures can automatically scale images down to fit the page width.
#. This is used a tooltip on a link to expand images to full size.
#.
-#: yelp-xsl.xml.in:287(msg/msgstr)
+#: yelp-xsl.xml.in:286(msg/msgstr)
msgid "View images at normal size"
msgstr ""
#. Accessible title for a warning.
-#: yelp-xsl.xml.in:292(msg/msgstr)
+#: yelp-xsl.xml.in:291(msg/msgstr)
msgid "Warning"
msgstr ""
@@ -281,7 +281,7 @@ msgstr ""
#. with single quotation marks in your language, use the corresponding
#. double quotation mark for the watermark image.
#.
-#: yelp-xsl.xml.in:319(msg/msgstr)
+#: yelp-xsl.xml.in:318(msg/msgstr)
msgid "yelp-quote-201C.png"
msgstr ""
@@ -294,7 +294,7 @@ msgstr ""
#.
#. <label/> - The term being defined by the glossary entry
#.
-#: yelp-xsl.xml.in:335(msg/msgstr)
+#: yelp-xsl.xml.in:334(msg/msgstr)
msgid "View the bibliography entry <biblioentry.label/>."
msgstr ""
@@ -316,7 +316,7 @@ msgstr ""
#.
#. <biblioentry.label/> - The text content of the bibliography label
#.
-#: yelp-xsl.xml.in:358(msg/msgstr)
+#: yelp-xsl.xml.in:357(msg/msgstr)
msgid "[<biblioentry.label/>]"
msgstr ""
@@ -332,7 +332,7 @@ msgstr ""
#. <citation/> - The text content of the citation element, possibly
#. as a link to an entry in the bibliography
#.
-#: yelp-xsl.xml.in:375(msg/msgstr)
+#: yelp-xsl.xml.in:374(msg/msgstr)
msgid "[<citation.label/>]"
msgstr ""
@@ -360,7 +360,7 @@ msgstr ""
#. <comment.name/> - The name of the person making the comment
#. <comment.date/> - The date the comment was made
#.
-#: yelp-xsl.xml.in:404(msg/msgstr)
+#: yelp-xsl.xml.in:403(msg/msgstr)
msgid "from <comment.name/> on <comment.date/>"
msgstr ""
@@ -387,7 +387,7 @@ msgstr ""
#.
#. <comment.name/> - The name of the person making the comment
#.
-#: yelp-xsl.xml.in:432(msg/msgstr)
+#: yelp-xsl.xml.in:431(msg/msgstr)
msgid "from <comment.name/>"
msgstr ""
@@ -398,7 +398,7 @@ msgstr ""
#.
#. <string/> - The linked-to email address
#.
-#: yelp-xsl.xml.in:444(msg/msgstr)
+#: yelp-xsl.xml.in:443(msg/msgstr)
msgid "Send email to â<string/>â."
msgstr ""
@@ -409,7 +409,7 @@ msgstr ""
#.
#. <glossterm/> - The term being defined by the glossary entry
#.
-#: yelp-xsl.xml.in:456(msg/msgstr)
+#: yelp-xsl.xml.in:455(msg/msgstr)
msgid "Read the definition for â<glossterm/>â."
msgstr ""
@@ -429,7 +429,7 @@ msgstr ""
#.
#. <glosssee/> - The actual link or links of the cross reference
#.
-#: yelp-xsl.xml.in:477(msg/msgstr)
+#: yelp-xsl.xml.in:476(msg/msgstr)
msgid "See <glosssee/>."
msgstr ""
@@ -450,7 +450,7 @@ msgstr ""
#.
#. <glosssee/> - The actual link or links of the cross reference
#.
-#: yelp-xsl.xml.in:499(msg/msgstr)
+#: yelp-xsl.xml.in:498(msg/msgstr)
msgid "See also <glosssee/>."
msgstr ""
@@ -461,7 +461,7 @@ msgstr ""
#.
#. <node/> - The text content of the quote element
#.
-#: yelp-xsl.xml.in:511(msg/msgstr)
+#: yelp-xsl.xml.in:510(msg/msgstr)
msgid "â<node/>â"
msgstr ""
@@ -472,7 +472,35 @@ msgstr ""
#.
#. <node/> - The text content of the quote element
#.
-#: yelp-xsl.xml.in:523(msg/msgstr)
+#: yelp-xsl.xml.in:522(msg/msgstr)
msgid "â<node/>â"
msgstr ""
+#. ID: seeie.format
+#. This is a format message used to format index cross references.
+#. This format message controls the sentence used to present the cross
+#. reference, not the link itself.
+#.
+#. Special elements in the message will be replaced with the
+#. appropriate content, as follows:
+#.
+#. <seeie/> - The actual link or links of the cross reference
+#.
+#: yelp-xsl.xml.in:537(msg/msgstr)
+msgid "See <seeie/>."
+msgstr ""
+
+#. ID: seealsoie.format
+#. This is a format message used to format index cross references.
+#. This format message controls the sentence used to present the cross
+#. reference, not the link itself.
+#.
+#. Special elements in the message will be replaced with the
+#. appropriate content, as follows:
+#.
+#. <seeie/> - The actual link or links of the cross reference
+#.
+#: yelp-xsl.xml.in:552(msg/msgstr)
+msgid "See also <seeie/>."
+msgstr ""
+
diff --git a/xslt/gettext/domains/yelp-xsl.xml.in b/xslt/gettext/domains/yelp-xsl.xml.in
index ef01a6d..326f65e 100644
--- a/xslt/gettext/domains/yelp-xsl.xml.in
+++ b/xslt/gettext/domains/yelp-xsl.xml.in
@@ -8,7 +8,6 @@
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:langRule selector="//*" langPointer="@xml:lang"/>
- <its:translateRule selector="/msg:l10n/msg:msgset" translate="no"/>
<its:translateRule selector="/msg:l10n/msg:msg/msg:msgstr" translate="yes"/>
<its:withinTextRule selector="/msg:l10n/msg:msg/msg:msgstr//*" withinText="yes"/>
@@ -523,76 +522,34 @@ replaced with the appropriate content, as follows:
<msgstr>â<node/>â</msgstr>
</msg>
-<!-- FIXME: probably ok, check -->
-<msgset>
- <msgstr>seeie.format</msgstr>
- <!--
- This is a special format message. Please read the full translator
- documentation before translating this message. The documentation
- is maintained as part of the stylesheet documentation in DocBook.
- For your convenience, it has also been converted to an HTML file
- named STYLESHEETS.xml in the i18n directory.
-
- seeie - A âSeeâ entry in an index, rather than in the text
- http://www.docbook.org/tdg/en/html/seeie.html
-
- This is a format message used to format index cross references.
- This format message controls the sentence used to present the cross
- reference, not the link itself.
-
- Special elements in the message will be replaced with the
- appropriate content, as follows:
-
- seeie - The actual link or links of the cross reference
-
- These should be written as empty XML elements. Due to limitations
- in intltool, I can't write XML content in translator comments. To
- insert the seeie, simply write left angle bracket, seeie, slash,
- right angle bracket.
-
- Additionally, format messages can use the i, b, and tt markup tags
- to mark text as italic, bold, and monospace.
- -->
- <_msg>
- <msgstr>seeie.format</msgstr>
- <msgstr>See <seeie/>.</msgstr>
- </_msg>
-</msgset>
-
-<!-- FIXME: probably ok, check -->
-<msgset>
- <msgstr>seealsoie.format</msgstr>
- <!--
- This is a special format message. Please read the full translator
- documentation before translating this message. The documentation
- is maintained as part of the stylesheet documentation in DocBook.
- For your convenience, it has also been converted to an HTML file
- named STYLESHEETS.xml in the i18n directory.
-
- seealsoie - A âSee alsoâ entry in an index, rather than in the text
- http://www.docbook.org/tdg/en/html/seealsoie.html
-
- This is a format message used to format index cross references.
- This format message controls the sentence used to present the cross
- reference, not the link itself.
-
- Special elements in the message will be replaced with the
- appropriate content, as follows:
-
- seeie - The actual link or links of the cross reference
-
- These should be written as empty XML elements. Due to limitations
- in intltool, I can't write XML content in translator comments. To
- insert the seeie, simply write left angle bracket, seeie, slash,
- right angle bracket.
-
- Additionally, format messages can use the i, b, and tt markup tags
- to mark text as italic, bold, and monospace.
- -->
- <_msg>
- <msgstr>seealsoie.format</msgstr>
- <msgstr>See also <seeie/>.</msgstr>
- </_msg>
-</msgset>
+<msg id="seeie.format">
+<its:locNote>
+ID: seeie.format
+This is a format message used to format index cross references.
+This format message controls the sentence used to present the cross
+reference, not the link itself.
+
+Special elements in the message will be replaced with the
+appropriate content, as follows:
+
+<seeie/> - The actual link or links of the cross reference
+</its:locNote>
+<msgstr>See <seeie/>.</msgstr>
+</msg>
+
+<msg id="seealsoie.format">
+<its:locNote>
+ID: seealsoie.format
+This is a format message used to format index cross references.
+This format message controls the sentence used to present the cross
+reference, not the link itself.
+
+Special elements in the message will be replaced with the
+appropriate content, as follows:
+
+<seeie/> - The actual link or links of the cross reference
+</its:locNote>
+<msgstr>See also <seeie/>.</msgstr>
+</msg>
</l10n>
diff --git a/xslt/gettext/gettext.xsl b/xslt/gettext/gettext.xsl
index a2b1710..f719356 100644
--- a/xslt/gettext/gettext.xsl
+++ b/xslt/gettext/gettext.xsl
@@ -82,8 +82,8 @@ REMARK: Lots of documentation is needed
</xsl:call-template>
</xsl:if>
</xsl:param>
- <xsl:param name="node" select="."/>
<xsl:param name="role" select="''"/>
+ <xsl:param name="node" select="."/>
<xsl:param name="string"/>
<xsl:param name="format" select="false()"/>
@@ -123,6 +123,7 @@ REMARK: Lots of documentation is needed
<xsl:with-param name="number" select="$number"/>
<xsl:with-param name="form" select="$form"/>
<xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="node" select="$node"/>
<xsl:with-param name="string" select="$string"/>
<xsl:with-param name="format" select="$format"/>
</xsl:call-template>
@@ -140,6 +141,7 @@ REMARK: Lots of documentation is needed
<xsl:with-param name="number" select="$number"/>
<xsl:with-param name="form" select="$form"/>
<xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="node" select="$node"/>
<xsl:with-param name="string" select="$string"/>
<xsl:with-param name="format" select="$format"/>
</xsl:call-template>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]