[yelp-xsl] [xslt/gettext] Allow localization of some tooltips



commit 4b55b853e919a1c13b7c86721ce4984a966183eb
Author: Shaun McCance <shaunm gnome org>
Date:   Mon Jan 3 19:20:35 2011 -0500

    [xslt/gettext] Allow localization of some tooltips

 xslt/docbook/html/db2html-block.xsl  |    8 ++++++--
 xslt/gettext/l10n.xml.in             |   31 +++++++++++++++++++++++++++++++
 xslt/mallard/html/mal2html-block.xsl |    8 ++++++--
 xslt/mallard/html/mal2html-media.xsl |   12 +++++++++---
 4 files changed, 52 insertions(+), 7 deletions(-)
---
diff --git a/xslt/docbook/html/db2html-block.xsl b/xslt/docbook/html/db2html-block.xsl
index 13d368a..54d4242 100644
--- a/xslt/docbook/html/db2html-block.xsl
+++ b/xslt/docbook/html/db2html-block.xsl
@@ -99,10 +99,14 @@ is then used by the CSS for styling.
           <xsl:if test="$node/self::figure or $node/self::db:figure">
             <a href="#" class="zoom">
               <xsl:attribute name="data-zoom-in-title">
-                <xsl:text>View images at normal size</xsl:text>
+                <xsl:call-template name="l10n.gettext">
+                  <xsl:with-param name="msgid" select="'View images at normal size'"/>
+                </xsl:call-template>
               </xsl:attribute>
               <xsl:attribute name="data-zoom-out-title">
-                <xsl:text>Scale images down</xsl:text>
+                <xsl:call-template name="l10n.gettext">
+                  <xsl:with-param name="msgid" select="'Scale images down'"/>
+                </xsl:call-template>
               </xsl:attribute>
             </a>
           </xsl:if>
diff --git a/xslt/gettext/l10n.xml.in b/xslt/gettext/l10n.xml.in
index 54e1dc5..3236efc 100644
--- a/xslt/gettext/l10n.xml.in
+++ b/xslt/gettext/l10n.xml.in
@@ -338,6 +338,37 @@
   -->
   <_msg>yelp-quote-201C.png</_msg>
 </msgset>
+<msgset>
+  <msgid>View images at normal size</msgid>
+  <!--
+  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.
+  -->
+  <_msg>View images at normal size</_msg>
+</msgset>
+<msgset>
+  <msgid>Scale images down</msgid>
+  <!--
+  Figures can automatically scale images down to fit the page width.
+  This is used a tooltip on a link to shrink images back down after
+  they've been expanded to full size.
+  -->
+  <_msg>Scale images down</_msg>
+</msgset>
+<msgset>
+  <msgid>Play</msgid>
+  <!--
+  Used as a tooltip on play/pause buttons for audio and video objects.
+  -->
+  <_msg>Play</_msg>
+</msgset>
+<msgset>
+  <msgid>Pause</msgid>
+  <!--
+  Used as a tooltip on play/pause buttons for audio and video objects.
+  -->
+  <_msg>Pause</_msg>
+</msgset>
 
 
 <!-- ======================================================================= -->
diff --git a/xslt/mallard/html/mal2html-block.xsl b/xslt/mallard/html/mal2html-block.xsl
index 8040b72..6555741 100644
--- a/xslt/mallard/html/mal2html-block.xsl
+++ b/xslt/mallard/html/mal2html-block.xsl
@@ -266,10 +266,14 @@ in accordance with the Mallard specification on fallback block content.
     <div class="inner">
       <a href="#" class="zoom">
         <xsl:attribute name="data-zoom-in-title">
-          <xsl:text>View images at normal size</xsl:text>
+          <xsl:call-template name="l10n.gettext">
+            <xsl:with-param name="msgid" select="'View images at normal size'"/>
+          </xsl:call-template>
         </xsl:attribute>
         <xsl:attribute name="data-zoom-out-title">
-          <xsl:text>Scale images down</xsl:text>
+          <xsl:call-template name="l10n.gettext">
+            <xsl:with-param name="msgid" select="'Scale images down'"/>
+          </xsl:call-template>
         </xsl:attribute>
       </a>
       <xsl:apply-templates mode="mal2html.block.mode" select="mal:title"/>
diff --git a/xslt/mallard/html/mal2html-media.xsl b/xslt/mallard/html/mal2html-media.xsl
index e488087..ef1e1ba 100644
--- a/xslt/mallard/html/mal2html-media.xsl
+++ b/xslt/mallard/html/mal2html-media.xsl
@@ -94,13 +94,19 @@ FIXME
     <div class="media-controls">
       <button class="media-play">
         <xsl:attribute name="value">
-          <xsl:text>Play</xsl:text>
+          <xsl:call-template name="l10n.gettext">
+            <xsl:with-param name="msgid" select="'Play'"/>
+          </xsl:call-template>
         </xsl:attribute>
         <xsl:attribute name="data-play-label">
-          <xsl:text>Play</xsl:text>
+          <xsl:call-template name="l10n.gettext">
+            <xsl:with-param name="msgid" select="'Play'"/>
+          </xsl:call-template>
         </xsl:attribute>
         <xsl:attribute name="data-pause-label">
-          <xsl:text>Pause</xsl:text>
+          <xsl:call-template name="l10n.gettext">
+            <xsl:with-param name="msgid" select="'Pause'"/>
+          </xsl:call-template>
         </xsl:attribute>
         <canvas width="20" height="20"/>
       </button>



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