[gnome-doc-utils] [mal2html] Initial i18n work on Mallard stylesheets, much help from Milo



commit 28eb3045816b0e2696c0ff3ee08a7e8930d8f365
Author: Shaun McCance <shaunm gnome org>
Date:   Sat Jul 25 21:59:00 2009 -0500

    [mal2html] Initial i18n work on Mallard stylesheets, much help from Milo

 xslt/gettext/l10n.xml.in            |   72 +++++++++++++++++++++++++++++++++++
 xslt/mallard/html/mal2html-page.xsl |   53 +++++++++++++++++++------
 xslt/mallard/html/mal2html.xsl      |    9 ----
 xslt/mallard/html/mal2xhtml.xsl     |    9 ----
 4 files changed, 112 insertions(+), 31 deletions(-)
---
diff --git a/xslt/gettext/l10n.xml.in b/xslt/gettext/l10n.xml.in
index 45b60a5..416607d 100644
--- a/xslt/gettext/l10n.xml.in
+++ b/xslt/gettext/l10n.xml.in
@@ -2348,4 +2348,76 @@
   </_msg>
 </msgset>
 
+<!-- Mallard specific strings -->
+
+<msgset>
+  <msgid>Further Reading</msgid>
+  <!-- Automatic further reading section and links -->
+  <_msg>Further Reading</_msg>
+</msgset>
+<msgset>
+  <msgid>More About</msgid>
+  <!-- Automatic more about section and links -->
+  <_msg>More About</_msg>
+</msgset>
+<msgset>
+  <msgid>See Also</msgid>
+  <!-- Automatic see also section and links -->
+  <_msg>See Also</_msg>
+</msgset>
+<msgset>
+  <msgid>Stub</msgid>
+  <!--
+  This is used as a descrpition for the status of the document.
+  This will not be visibile to the users.
+
+  Stub: the document has little or basic content, it may have been
+  created by developers in order to have it included in the build.
+   -->
+  <_msg>Stub</_msg>
+</msgset>
+<msgset>
+  <msgid>Incomplete</msgid>
+  <!--
+  This is used as a descrpition for the status of the document.
+  This will not be visibile to the users.
+
+  Incomplete: the document has the basic structure in place, but the
+  authors have not yet written all the content.
+  -->
+  <_msg>Incomplete</_msg>
+</msgset>
+<msgset>
+  <msgid>Draft</msgid>
+  <!--
+  This is used as a descrpition for the status of the document.
+  This will not be visibile to the users.
+
+  Draft: the authors have written all the content, but they still need
+  to clean up the language or markup.
+  -->
+  <_msg>Draft</_msg>
+</msgset>
+<msgset>
+  <msgid>Ready for review</msgid>
+  <!--
+  This is used as a descrpition for the status of the document.
+  This will not be visibile to the users.
+
+  Review: the authors consider the document complete.
+  -->
+  <_msg>Ready for review</_msg>
+</msgset>
+<msgset>
+  <msgid>Final</msgid>
+  <!--
+  This is used as a descrpition for the status of the document.
+  This will not be visibile to the users.
+
+  Final: a senior member of the documentation team has reviewd the
+  document and approved it.
+  -->
+  <_msg>Final</_msg>
+</msgset>
+
 </l10n>
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index 895950d..46f34b5 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -207,19 +207,29 @@ REMARK: Describe this template
               <!-- FIXME: i18n -->
               <xsl:choose>
                 <xsl:when test="$revision/@status = 'stub'">
-                  <xsl:text>Stub</xsl:text>
+                  <xsl:call-template name="l10n.gettext">
+                    <xsl:with-param name="msgid" select="'Stub'"/>
+                  </xsl:call-template>
                 </xsl:when>
                 <xsl:when test="$revision/@status = 'incomplete'">
-                  <xsl:text>Incomplete</xsl:text>
+                  <xsl:call-template name="l10n.gettext">
+                    <xsl:with-param name="msgid" select="'Incomplete'"/>
+                   </xsl:call-template>
                 </xsl:when>
                 <xsl:when test="$revision/@status = 'draft'">
-                  <xsl:text>Draft</xsl:text>
+                  <xsl:call-template name="l10n.gettext">
+                    <xsl:with-param name="msgid" select="'Draft'"/>
+                  </xsl:call-template>
                 </xsl:when>
                 <xsl:when test="$revision/@status = 'review'">
-                  <xsl:text>Ready for review</xsl:text>
+                  <xsl:call-template name="l10n.gettext">
+                    <xsl:with-param name="msgid" select="'Ready for review'"/>
+                  </xsl:call-template>
                 </xsl:when>
                 <xsl:when test="$revision/@status = 'final'">
-                  <xsl:text>Final</xsl:text>
+                  <xsl:call-template name="l10n.gettext">
+                    <xsl:with-param name="msgid" select="'Final'"/>
+                  </xsl:call-template>
                 </xsl:when>
               </xsl:choose>
             </span>
@@ -275,14 +285,18 @@ REMARK: Describe this template
             <xsl:text>title</xsl:text>
           </xsl:attribute>
           <!-- FIXME: i18n -->
-          <xsl:text>Further Reading</xsl:text>
+          <xsl:call-template name="l10n.gettext">
+            <xsl:with-param name="msgid" select="'Further Reading'"/>
+          </xsl:call-template>
         </xsl:element>
       </div>
       <div class="autolinks">
         <xsl:if test="$pagelinks or $guidelinks">
           <div class="title"><span>
             <!-- FIXME: i18n -->
-            <xsl:text>More About</xsl:text>
+            <xsl:call-template name="l10n.gettext">
+                <xsl:with-param name="msgid" select="'More About'"/>
+            </xsl:call-template>
           </span></div>
           <ul>
             <xsl:for-each select="$pagelinks">
@@ -302,7 +316,9 @@ REMARK: Describe this template
         <xsl:if test="$inlinks or $outlinks">
           <div class="title"><span>
             <!-- FIXME: i18n -->
-            <xsl:text>See Also</xsl:text>
+            <xsl:call-template name="l10n.gettext">
+                <xsl:with-param name="msgid" select="'See Also'"/>
+            </xsl:call-template>
           </span></div>
           <ul>
             <xsl:for-each select="$inlinks">
@@ -510,23 +526,34 @@ REMARK: Describe this template
             <div class="title">
               <xsl:choose>
                 <xsl:when test="$revision/@status = 'stub'">
-                  <xsl:text>Stub</xsl:text>
+                  <xsl:call-template name="l10n.gettext">
+                    <xsl:with-param name="msgid" select="'Stub'"/>
+                  </xsl:call-template>
                 </xsl:when>
                 <xsl:when test="$revision/@status = 'incomplete'">
-                  <xsl:text>Incomplete</xsl:text>
+                  <xsl:call-template name="l10n.gettext">
+                    <xsl:with-param name="msgid" select="'Incomplete'"/>
+                   </xsl:call-template>
                 </xsl:when>
                 <xsl:when test="$revision/@status = 'draft'">
-                  <xsl:text>Draft</xsl:text>
+                  <xsl:call-template name="l10n.gettext">
+                    <xsl:with-param name="msgid" select="'Draft'"/>
+                  </xsl:call-template>
                 </xsl:when>
                 <xsl:when test="$revision/@status = 'review'">
-                  <xsl:text>Ready for review</xsl:text>
+                  <xsl:call-template name="l10n.gettext">
+                    <xsl:with-param name="msgid" select="'Ready for review'"/>
+                  </xsl:call-template>
                 </xsl:when>
                 <xsl:when test="$revision/@status = 'final'">
-                  <xsl:text>Final</xsl:text>
+                  <xsl:call-template name="l10n.gettext">
+                    <xsl:with-param name="msgid" select="'Final'"/>
+                  </xsl:call-template>
                 </xsl:when>
               </xsl:choose>
             </div>
             <p class="version">
+              <!-- FIXME: i18n -->
               <xsl:text>Version </xsl:text>
               <xsl:value-of select="$revision/@version"/>
               <xsl:text> on </xsl:text>
diff --git a/xslt/mallard/html/mal2html.xsl b/xslt/mallard/html/mal2html.xsl
index 5ef6ce8..41d8b09 100644
--- a/xslt/mallard/html/mal2html.xsl
+++ b/xslt/mallard/html/mal2html.xsl
@@ -70,13 +70,4 @@ REMARK: Describe this module
   <xsl:apply-templates/>
 </xsl:template>
 
-<!-- FIXME -->
-<xsl:template name="l10n.gettext">
-  <xsl:param name="msgid" select="'email.tooltip'"/>
-  <xsl:value-of select="$msgid"/>
-</xsl:template>
-<xsl:template name="l10n.direction">
-  <xsl:text>ltr</xsl:text>
-</xsl:template>
-
 </xsl:stylesheet>
diff --git a/xslt/mallard/html/mal2xhtml.xsl b/xslt/mallard/html/mal2xhtml.xsl
index b835e9c..2cb9133 100644
--- a/xslt/mallard/html/mal2xhtml.xsl
+++ b/xslt/mallard/html/mal2xhtml.xsl
@@ -69,13 +69,4 @@ REMARK: Describe this module
   <xsl:apply-templates/>
 </xsl:template>
 
-<!-- FIXME -->
-<xsl:template name="l10n.gettext">
-  <xsl:param name="msgid" select="'email.tooltip'"/>
-  <xsl:value-of select="$msgid"/>
-</xsl:template>
-<xsl:template name="l10n.direction">
-  <xsl:text>ltr</xsl:text>
-</xsl:template>
-
 </xsl:stylesheet>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]