[yelp-xsl] Set play and pause labels on all audio and video elements



commit d1ca108cb84307e6481a776ea5939045fee7b7c8
Author: Shaun McCance <shaunm gnome org>
Date:   Tue Nov 13 10:11:46 2012 -0500

    Set play and pause labels on all audio and video elements

 xslt/docbook/html/db2html-media.xsl  |   20 ++++++++++++++++++++
 xslt/mallard/html/mal2html-media.xsl |   10 ++++++++++
 2 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/xslt/docbook/html/db2html-media.xsl b/xslt/docbook/html/db2html-media.xsl
index 9b8abeb..77e1d12 100644
--- a/xslt/docbook/html/db2html-media.xsl
+++ b/xslt/docbook/html/db2html-media.xsl
@@ -61,6 +61,16 @@ calls *{db2html.mediaobject.fallback} for the contents of the #{audio} element.
         </xsl:when>
       </xsl:choose>
     </xsl:attribute>
+    <xsl:attribute name="data-play-label">
+      <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:call-template name="l10n.gettext">
+        <xsl:with-param name="msgid" select="'Pause'"/>
+      </xsl:call-template>
+    </xsl:attribute>
     <xsl:call-template name="db2html.mediaobject.fallback">
       <xsl:with-param name="node" select="$media"/>
     </xsl:call-template>
@@ -173,6 +183,16 @@ attribute on the HTML #{video} element. This template calls
         </xsl:choose>
       </xsl:attribute>
     </xsl:if>
+    <xsl:attribute name="data-play-label">
+      <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:call-template name="l10n.gettext">
+        <xsl:with-param name="msgid" select="'Pause'"/>
+      </xsl:call-template>
+    </xsl:attribute>
     <xsl:call-template name="db2html.mediaobject.fallback">
       <xsl:with-param name="node" select="$media"/>
     </xsl:call-template>
diff --git a/xslt/mallard/html/mal2html-media.xsl b/xslt/mallard/html/mal2html-media.xsl
index 88bf0e9..14f56aa 100644
--- a/xslt/mallard/html/mal2html-media.xsl
+++ b/xslt/mallard/html/mal2html-media.xsl
@@ -179,6 +179,16 @@ in the source to the #{audio} element's fallback content. If ${inline} is
         </xsl:otherwise>
       </xsl:choose>
     </xsl:attribute>
+    <xsl:attribute name="data-play-label">
+      <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:call-template name="l10n.gettext">
+        <xsl:with-param name="msgid" select="'Pause'"/>
+      </xsl:call-template>
+    </xsl:attribute>
     <xsl:choose>
       <xsl:when test="$inline">
         <xsl:apply-templates mode="mal2html.inline.mode" select="$node/node()"/>



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