[yelp-xsl] Replace blockquote icons with :before quote char



commit 7aa3d153ae193528868883a3242bcb6b63b80f01
Author: Shaun McCance <shaunm gnome org>
Date:   Sat Sep 29 10:44:23 2012 -0400

    Replace blockquote icons with :before quote char

 icons/hicolor/48x48/status/Makefile.am         |    7 +--
 icons/hicolor/48x48/status/yelp-quote-00AB.png |  Bin 740 -> 0 bytes
 icons/hicolor/48x48/status/yelp-quote-00BB.png |  Bin 786 -> 0 bytes
 icons/hicolor/48x48/status/yelp-quote-201C.png |  Bin 767 -> 0 bytes
 icons/hicolor/48x48/status/yelp-quote-201D.png |  Bin 756 -> 0 bytes
 icons/hicolor/48x48/status/yelp-quote-201E.png |  Bin 756 -> 0 bytes
 icons/hicolor/Makefile.am                      |    2 -
 icons/hicolor/watermark-blockquote.xcf         |  Bin 8697 -> 0 bytes
 xslt/common/domains/check.xsl                  |   16 ------
 xslt/common/domains/yelp-xsl.pot               |   54 ++++++---------------
 xslt/common/domains/yelp-xsl.xml.in            |   27 ----------
 xslt/common/html.xsl                           |   63 +++++++++++++++++++++---
 xslt/common/icons.xsl                          |   32 +++---------
 xslt/docbook/utils/graphics.xsl                |    6 --
 14 files changed, 80 insertions(+), 127 deletions(-)
---
diff --git a/icons/hicolor/48x48/status/Makefile.am b/icons/hicolor/48x48/status/Makefile.am
index 46ce961..9fa8327 100644
--- a/icons/hicolor/48x48/status/Makefile.am
+++ b/icons/hicolor/48x48/status/Makefile.am
@@ -4,11 +4,6 @@ icon_DATA =				\
 	yelp-note-bug.png		\
 	yelp-note-important.png		\
 	yelp-note-tip.png		\
-	yelp-note-warning.png		\
-	yelp-quote-00AB.png		\
-	yelp-quote-00BB.png		\
-	yelp-quote-201C.png		\
-	yelp-quote-201D.png		\
-	yelp-quote-201E.png
+	yelp-note-warning.png
 
 EXTRA_DIST = $(icon_DATA)
diff --git a/icons/hicolor/Makefile.am b/icons/hicolor/Makefile.am
index 1419b08..0ba2023 100644
--- a/icons/hicolor/Makefile.am
+++ b/icons/hicolor/Makefile.am
@@ -1,3 +1 @@
 SUBDIRS = 24x24 48x48 scalable watermarks
-
-EXTRA_DIST = watermark-blockquote.xcf
diff --git a/xslt/common/domains/check.xsl b/xslt/common/domains/check.xsl
index 3d07b6a..4e1857a 100644
--- a/xslt/common/domains/check.xsl
+++ b/xslt/common/domains/check.xsl
@@ -62,22 +62,6 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
         </xsl:if>
       </xsl:for-each>
     </xsl:if>
-    <xsl:if test="$msg/@id = 'yelp-quote-201C.png'">
-      <xsl:for-each select="$xml_out/msg:l10n/msg:msg[ id = $msg/@id]/msg:msgstr">
-        <xsl:variable name="char" select="substring-before(substring-after(., 'yelp-quote-'), '.png')"/>
-        <xsl:if test="not($char = '201C') and not($char = '201D') and not($char = '201E') and
-                      not($char = '00AB') and not($char = '00BB')">
-          <xsl:message>
-            <xsl:text>Incorrect </xsl:text>
-            <xsl:value-of select="@xml:lang"/>
-            <xsl:text> translation of </xsl:text>
-            <xsl:value-of select="$msg/@id"/>
-            <xsl:text>: </xsl:text>
-            <xsl:value-of select="."/>
-          </xsl:message>
-        </xsl:if>
-      </xsl:for-each>
-    </xsl:if>
     <xsl:if test="$msg/@id = 'Other Credits'">
       <xsl:for-each select="$xml_out/msg:l10n/msg:msg[ id = $msg/@id]/msg:msgstr">
         <xsl:if test="contains(., '@')">
diff --git a/xslt/common/domains/yelp-xsl.pot b/xslt/common/domains/yelp-xsl.pot
index 8e88b94..e422f87 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: 2012-05-14 08:16-0400\n"
+"POT-Creation-Date: 2012-09-29 10:35-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"
@@ -289,30 +289,6 @@ msgstr ""
 msgid "Written By"
 msgstr ""
 
-#. This is an image of the opening quotation character for your language.
-#. The image is used as a watermark on blockquote elements.  There are a
-#. number of different quote characters used by various languages, so the
-#. image name is translatable.  The name of the icon should be of the form
-#. "yelp-quote-XXXX.png", where XXXX is the Unicode code point of the opening
-#. quote character.  For example, some languages use the double angle quotation
-#. mark.  Translators for these languages should use "yelp-quote-00AB.png".
-#. 
-#. The image, however, is not automatically created.  Do not translate
-#. this to a value if there isn't a corresponding file in yelp-xsl under
-#. the directory icons/hicolor/48x48/status.
-#. 
-#. Languages that use guillemets (angle quotation marks) should use either
-#. 00AB or 00BB, depending on whether the opening quotation is the left
-#. guillemet or the right guillemet.  Languages that use inverted comma
-#. quotation marks should use 201C, 201D, or 201E.  Single quotation marks
-#. don't make very nice watermarks, so if you would normally open a quote
-#. with single quotation marks in your language, use the corresponding
-#. double quotation mark for the watermark image.
-#. 
-#: yelp-xsl.xml.in:344(msg/msgstr)
-msgid "yelp-quote-201C.png"
-msgstr ""
-
 #. ID: biblioentry.tooltip
 #. This is a format message used to format tooltips on cross references
 #. to bibliography entries.
@@ -322,7 +298,7 @@ msgstr ""
 #. 
 #. <biblioentry.label/> - The term being defined by the glossary entry
 #. 
-#: yelp-xsl.xml.in:360(msg/msgstr)
+#: yelp-xsl.xml.in:333(msg/msgstr)
 msgid "View the bibliography entry <biblioentry.label/>."
 msgstr ""
 
@@ -344,7 +320,7 @@ msgstr ""
 #. 
 #. <biblioentry.label/> - The text content of the bibliography label
 #. 
-#: yelp-xsl.xml.in:383(msg/msgstr)
+#: yelp-xsl.xml.in:356(msg/msgstr)
 msgid "[<biblioentry.label/>]"
 msgstr ""
 
@@ -360,7 +336,7 @@ msgstr ""
 #. <citation.label/> - The text content of the citation element, possibly
 #.                     as a link to an entry in the bibliography
 #. 
-#: yelp-xsl.xml.in:400(msg/msgstr)
+#: yelp-xsl.xml.in:373(msg/msgstr)
 msgid "[<citation.label/>]"
 msgstr ""
 
@@ -388,7 +364,7 @@ msgstr ""
 #. <comment.name/> - The name of the person making the comment
 #. <comment.date/> - The date the comment was made
 #. 
-#: yelp-xsl.xml.in:429(msg/msgstr)
+#: yelp-xsl.xml.in:402(msg/msgstr)
 msgid "from <comment.name/> on <comment.date/>"
 msgstr ""
 
@@ -415,7 +391,7 @@ msgstr ""
 #. 
 #. <comment.name/> - The name of the person making the comment
 #. 
-#: yelp-xsl.xml.in:457(msg/msgstr)
+#: yelp-xsl.xml.in:430(msg/msgstr)
 msgid "from <comment.name/>"
 msgstr ""
 
@@ -427,7 +403,7 @@ msgstr ""
 #. <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)
+#: yelp-xsl.xml.in:443(msg/msgstr)
 msgid "Â <copyright.years/> <copyright.name/>"
 msgstr ""
 
@@ -438,7 +414,7 @@ msgstr ""
 #. 
 #. <string/> - The linked-to email address
 #. 
-#: yelp-xsl.xml.in:482(msg/msgstr)
+#: yelp-xsl.xml.in:455(msg/msgstr)
 msgid "Send email to â<string/>â."
 msgstr ""
 
@@ -449,7 +425,7 @@ msgstr ""
 #. 
 #. <glossterm/> - The term being defined by the glossary entry
 #. 
-#: yelp-xsl.xml.in:494(msg/msgstr)
+#: yelp-xsl.xml.in:467(msg/msgstr)
 msgid "Read the definition for â<glossterm/>â."
 msgstr ""
 
@@ -469,7 +445,7 @@ msgstr ""
 #. 
 #. <glosssee/> - The actual link or links of the cross reference
 #. 
-#: yelp-xsl.xml.in:515(msg/msgstr)
+#: yelp-xsl.xml.in:488(msg/msgstr)
 msgid "See <glosssee/>."
 msgstr ""
 
@@ -490,7 +466,7 @@ msgstr ""
 #. 
 #. <glosssee/> - The actual link or links of the cross reference
 #. 
-#: yelp-xsl.xml.in:537(msg/msgstr)
+#: yelp-xsl.xml.in:510(msg/msgstr)
 msgid "See also <glosssee/>."
 msgstr ""
 
@@ -501,7 +477,7 @@ msgstr ""
 #. 
 #. <node/> - The text content of the quote element
 #. 
-#: yelp-xsl.xml.in:549(msg/msgstr)
+#: yelp-xsl.xml.in:522(msg/msgstr)
 msgid "â<node/>â"
 msgstr ""
 
@@ -512,7 +488,7 @@ msgstr ""
 #. 
 #. <node/> - The text content of the quote element
 #. 
-#: yelp-xsl.xml.in:561(msg/msgstr)
+#: yelp-xsl.xml.in:534(msg/msgstr)
 msgid "â<node/>â"
 msgstr ""
 
@@ -526,7 +502,7 @@ msgstr ""
 #. 
 #. <seeie/> - The actual link or links of the cross reference
 #. 
-#: yelp-xsl.xml.in:576(msg/msgstr)
+#: yelp-xsl.xml.in:549(msg/msgstr)
 msgid "See <seeie/>."
 msgstr ""
 
@@ -540,7 +516,7 @@ msgstr ""
 #. 
 #. <seeie/> - The actual link or links of the cross reference
 #. 
-#: yelp-xsl.xml.in:591(msg/msgstr)
+#: yelp-xsl.xml.in:564(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 2e8cf08..27f357b 100644
--- a/xslt/common/domains/yelp-xsl.xml.in
+++ b/xslt/common/domains/yelp-xsl.xml.in
@@ -319,33 +319,6 @@ This is used a tooltip on a link to expand images to full size.
 
 <!-- ======================================================================= -->
 
-<msg id="yelp-quote-201C.png">
-<its:locNote>
-This is an image of the opening quotation character for your language.
-The image is used as a watermark on blockquote elements.  There are a
-number of different quote characters used by various languages, so the
-image name is translatable.  The name of the icon should be of the form
-"yelp-quote-XXXX.png", where XXXX is the Unicode code point of the opening
-quote character.  For example, some languages use the double angle quotation
-mark.  Translators for these languages should use "yelp-quote-00AB.png".
-
-The image, however, is not automatically created.  Do not translate
-this to a value if there isn't a corresponding file in yelp-xsl under
-the directory icons/hicolor/48x48/status.
-
-Languages that use guillemets (angle quotation marks) should use either
-00AB or 00BB, depending on whether the opening quotation is the left
-guillemet or the right guillemet.  Languages that use inverted comma
-quotation marks should use 201C, 201D, or 201E.  Single quotation marks
-don't make very nice watermarks, so if you would normally open a quote
-with single quotation marks in your language, use the corresponding
-double quotation mark for the watermark image.
-</its:locNote>
-<msgstr>yelp-quote-201C.png</msgstr>
-</msg>
-
-<!-- ======================================================================= -->
-
 <msg id="biblioentry.tooltip">
 <its:locNote><![CDATA[
 ID: biblioentry.tooltip
diff --git a/xslt/common/html.xsl b/xslt/common/html.xsl
index 23db16b..8080d93 100644
--- a/xslt/common/html.xsl
+++ b/xslt/common/html.xsl
@@ -251,8 +251,12 @@ as ${node} to this template.
       <title>
         <xsl:apply-templates mode="html.title.mode" select="$node"/>
       </title>
-      <xsl:call-template name="html.css"/>
-      <xsl:call-template name="html.js"/>
+      <xsl:call-template name="html.css">
+        <xsl:with-param name="node" select="$node"/>
+      </xsl:call-template>
+      <xsl:call-template name="html.js">
+        <xsl:with-param name="node" select="$node"/>
+      </xsl:call-template>
       <xsl:call-template name="html.head.custom">
         <xsl:with-param name="node" select="$node"/>
       </xsl:call-template>
@@ -1019,15 +1023,59 @@ div.note-sidebar > div.inner > div.region > div.contents { margin-</xsl:text>
   <xsl:value-of select="$left"/><xsl:text>: 0px; }
 div.quote {
   padding: 0;
-  background-image: url('</xsl:text>
-    <xsl:value-of select="$icons.quote"/><xsl:text>');
-  background-repeat: no-repeat;
-  background-position: top </xsl:text><xsl:value-of select="$left"/><xsl:text>;
   min-height: </xsl:text>
     <xsl:value-of select="$icons.size.quote"/><xsl:text>px;
 }
+div.quote > div.inner:before {
+  float: </xsl:text><xsl:value-of select="$left"/><xsl:text>;
+  content: '</xsl:text>
+  <xsl:variable name="quote">
+    <xsl:for-each select="$node[1]">
+      <xsl:call-template name="l10n.gettext">
+        <xsl:with-param name="msgid" select="'quote.format'"/>
+        <xsl:with-param name="node" select="$node"/>
+      </xsl:call-template>
+    </xsl:for-each>
+  </xsl:variable>
+  <xsl:variable name="quotc" select="substring(concat($quote, 'â'), 1, 1)"/>
+  <xsl:choose>
+    <xsl:when test="contains('Ââ', $quotc)">
+      <xsl:text>Â</xsl:text>
+    </xsl:when>
+    <xsl:when test="contains('Ââ', $quotc)">
+      <xsl:text>Â</xsl:text>
+    </xsl:when>
+    <xsl:when test="contains('ââââ', $quotc)">
+      <xsl:text>â</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>â</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose><xsl:text>';
+  font-family: "Century Schoolbook L";
+  font-size: </xsl:text>
+    <xsl:value-of select="$icons.size.quote"/><xsl:text>px;
+  font-weight: bold;
+  line-height: </xsl:text>
+  <xsl:choose>
+    <xsl:when test="contains('ÂÂââ', $quotc)">
+      <xsl:text>0.5</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>1</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose><xsl:text>em;
+  margin: 0; padding: 0;
+  height: </xsl:text>
+    <xsl:value-of select="$icons.size.quote"/><xsl:text>px;
+  width: </xsl:text>
+    <xsl:value-of select="$icons.size.quote"/><xsl:text>px;
+  text-align: center;
+  color: </xsl:text>
+    <xsl:value-of select="$color.dark_background"/><xsl:text>;
+}
 div.quote > div.inner > div.title {
-  margin: 0 0 0.5em 0;
+  margin: 0;
   margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: </xsl:text>
     <xsl:value-of select="$icons.size.quote"/><xsl:text>px;
 }
@@ -1036,6 +1084,7 @@ blockquote {
   margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: </xsl:text>
     <xsl:value-of select="$icons.size.quote"/><xsl:text>px;
 }
+blockquote > *:first-child { margin-top: 0; }
 div.quote > div.inner > div.region > div.cite {
   margin-top: 0.5em;
   margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: </xsl:text>
diff --git a/xslt/common/icons.xsl b/xslt/common/icons.xsl
index 7491a95..388a238 100644
--- a/xslt/common/icons.xsl
+++ b/xslt/common/icons.xsl
@@ -114,33 +114,17 @@ This parameter specifies the URL for the icon used for warning notes.
 <!--@@==========================================================================
 icons.size.quote
 The size of the quote icons.
-:Revision:version="1.0" date="2010-05-03" status="final"
-
-This parameter specifies the size of the quote icons. Use an integer giving
-the width of the image files in pixels. Icons are assumed to be square, and
-all quote icons are assumed to have the same size.
--->
-<xsl:param name="icons.size.quote" select="48"/>
+:Revision:version="3.8" date="2012-09-29" status="final"
 
+This parameter specifies the size of the block quote icon. Use an integer giving
+the width of the image files in pixels. Icons are assumed to be square, and all
+quote icons are assumed to have the same size.
 
-<!--@@==========================================================================
-icons.quote
-The URL for the block quote watermark.
-:Revision:version="1.0" date="2010-05-03" status="final"
-
-This parameter specifies the URL for the watermark for block quotes. The
-default name of the image file is translatable. If you set this parameter,
-you should ensure that your graphic uses a suitable quote character for the
-language your document is written in.
+As of version 3.8, there is no longer an actual image file for the quote icon.
+Instead, a language-appropriate quotation character is placed in the margin.
+This parameters still affects the size of that character.
 -->
-<xsl:param name="icons.quote">
-  <xsl:value-of select="$icons.base_url"/>
-  <xsl:for-each select="/*">
-    <xsl:call-template name="l10n.gettext">
-      <xsl:with-param name="msgid" select="'yelp-quote-201C.png'"/>
-    </xsl:call-template>
-  </xsl:for-each>
-</xsl:param>
+<xsl:param name="icons.size.quote" select="48"/>
 
 
 <!--@@==========================================================================
diff --git a/xslt/docbook/utils/graphics.xsl b/xslt/docbook/utils/graphics.xsl
index 0906d3f..8d270fd 100644
--- a/xslt/docbook/utils/graphics.xsl
+++ b/xslt/docbook/utils/graphics.xsl
@@ -42,12 +42,6 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
   <xsl:if test="//warning[1]">
     <xsl:text>admon-warning.png&#x000A;</xsl:text>
   </xsl:if>
-  <xsl:if test="//blockquote[1]">
-    <xsl:call-template name="l10n.gettext">
-      <xsl:with-param name="msgid" select="'blockquote-watermark-201C.png'"/>
-    </xsl:call-template>
-    <xsl:text>&#x000A;</xsl:text>
-  </xsl:if>
   <xsl:if test="//classsynopsis[ language = 'cpp'][1] or //programlisting[ language = 'cpp']">
     <xsl:text>watermark-code-cpp.png&#x000A;</xsl:text>
   </xsl:if>



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