[yelp-xsl] Added translators and publishers to About



commit 531174868c643890933a3fd602bab4384dccfc71
Author: Shaun McCance <shaunm gnome org>
Date:   Mon Nov 12 12:31:01 2012 -0500

    Added translators and publishers to About

 xslt/common/domains/yelp-xsl.xml.in    |    5 ++++
 xslt/dita/common/dita-selectors.mod    |    5 ++++
 xslt/dita/html/dita2html-topic.xsl     |   42 ++++++++++++++++++++++++++++++-
 xslt/docbook/html/db2html-division.xsl |   22 +++++++++++++++-
 xslt/mallard/html/mal2html-page.xsl    |   32 +++++++++++++++++++----
 5 files changed, 96 insertions(+), 10 deletions(-)
---
diff --git a/xslt/common/domains/yelp-xsl.xml.in b/xslt/common/domains/yelp-xsl.xml.in
index a4a56bf..c0c83f1 100644
--- a/xslt/common/domains/yelp-xsl.xml.in
+++ b/xslt/common/domains/yelp-xsl.xml.in
@@ -254,6 +254,11 @@ but needs to be updated to reflect software updates.
 <msgstr>Previous</msgstr>
 </msg>
 
+<msg id="Published By">
+<its:locNote>Title for a list of publishers.</its:locNote>
+<msgstr>Published By</msgstr>
+</msg>
+
 <msg id="Ready for review">
 <its:locNote>
 Revision status of a document or page. Content has been written
diff --git a/xslt/dita/common/dita-selectors.mod b/xslt/dita/common/dita-selectors.mod
index e4b1a6e..8adcf4f 100644
--- a/xslt/dita/common/dita-selectors.mod
+++ b/xslt/dita/common/dita-selectors.mod
@@ -317,6 +317,11 @@ topic/prolog
 <!ENTITY topic_prolog "*[name(.) = 'prolog' or starts-with(@class, '- topic/prolog ')]">
 
 <!-- ===========================================================================
+topic/publisher
+-->
+<!ENTITY topic_publisher "*[name(.) = 'publisher' or starts-with(@class, '- topic/publisher ')]">
+
+<!-- ===========================================================================
 topic/related-links
 -->
 <!ENTITY topic_related-links "*[name(.) = 'related-links' or starts-with(@class, '- topic/related-links ')]">
diff --git a/xslt/dita/html/dita2html-topic.xsl b/xslt/dita/html/dita2html-topic.xsl
index 01cbad3..476baf9 100644
--- a/xslt/dita/html/dita2html-topic.xsl
+++ b/xslt/dita/html/dita2html-topic.xsl
@@ -190,8 +190,10 @@ REMARK: Describe this module
                                     yelp:dita.ref.conref($node/&map_topicmeta;)"/>
   <xsl:variable name="copyrights" select="$info/&topic_copyright;"/>
   <xsl:variable name="authors" select="$info/&topic_author;[ type = 'creator']"/>
-  <xsl:variable name="others" select="$info/&topic_author;[ type != 'creator']"/>
-  <xsl:if test="$copyrights or $authors or $others">
+  <xsl:variable name="translators" select="$info/&topic_author;[ type = 'translator']"/>
+  <xsl:variable name="publishers" select="$info/&topic_publisher;"/>
+  <xsl:variable name="others" select="$info/&topic_author;[not(@type = 'creator' or @type = 'translator')]"/>
+  <xsl:if test="$copyrights or $authors or $translators or $publishers or $others">
     <div class="sect about ui-expander" role="contentinfo">
       <div class="yelp-data yelp-data-ui-expander" data-yelp-expanded="false"/>
       <div class="inner">
@@ -237,6 +239,42 @@ REMARK: Describe this module
                 </ul>
               </div>
             </xsl:if>
+            <xsl:if test="$translators">
+              <div class="aboutblurb translators">
+                <div class="title">
+                  <span class="title">
+                    <xsl:call-template name="l10n.gettext">
+                      <xsl:with-param name="msgid" select="'Translated By'"/>
+                    </xsl:call-template>
+                  </span>
+                </div>
+                <ul class="credits">
+                  <xsl:for-each select="$translators">
+                    <li>
+                      <xsl:apply-templates mode="dita2html.topic.mode"/>
+                    </li>
+                  </xsl:for-each>
+                </ul>
+              </div>
+            </xsl:if>
+            <xsl:if test="$publishers">
+              <div class="aboutblurb publishers">
+                <div class="title">
+                  <span class="title">
+                    <xsl:call-template name="l10n.gettext">
+                      <xsl:with-param name="msgid" select="'Published By'"/>
+                    </xsl:call-template>
+                  </span>
+                </div>
+                <ul class="credits">
+                  <xsl:for-each select="$publishers">
+                    <li>
+                      <xsl:apply-templates mode="dita2html.topic.mode"/>
+                    </li>
+                  </xsl:for-each>
+                </ul>
+              </div>
+            </xsl:if>
             <xsl:if test="$others">
               <div class="aboutblurb othercredits">
                 <div class="title">
diff --git a/xslt/docbook/html/db2html-division.xsl b/xslt/docbook/html/db2html-division.xsl
index d00313b..f9cb1f4 100644
--- a/xslt/docbook/html/db2html-division.xsl
+++ b/xslt/docbook/html/db2html-division.xsl
@@ -362,15 +362,15 @@ the division. By default it is called by the %{html.footer.mode} implementation.
     $info/authorgroup/othercredit[ role = 'translator']  |
     $info/db:othercredit[ class = 'translator']          |
     $info/db:authorgroup/db:othercredit[ class = 'translator']"/>
+  <xsl:variable name="publishers" select="$info/publisher | $info/db:publisher"/>
   <xsl:variable name="othercredits" select="set:difference(
     $info/collab | $info/authorgroup/collab | $info/db:collab |
-    $info/publisher      | $info/db:publisher |
     $info/corpcredit     | $info/authorgroup/corpcredit  |
     $info/othercredit    | $info/authorgroup/othercredit |
     $info/db:othercredit | $info/db:authorgroup/db:othercredit,
     ($authors | $editors | $translators))"/>
   <xsl:variable name="legal" select="$info/legalnotice | $info/db:legalnotice"/>
-  <xsl:if test="$copyrights or $authors or $editors or $translators or $othercredits or $legal">
+  <xsl:if test="$copyrights or $authors or $editors or $translators or $publishers or $othercredits or $legal">
     <div class="sect about ui-expander" role="contentinfo">
       <div class="yelp-data yelp-data-ui-expander" data-yelp-expanded="false"/>
       <div class="inner">
@@ -448,6 +448,24 @@ the division. By default it is called by the %{html.footer.mode} implementation.
               </ul>
             </div>
           </xsl:if>
+          <xsl:if test="$publishers">
+            <div class="aboutblurb publishers">
+              <div class="title">
+                <span class="title">
+                  <xsl:call-template name="l10n.gettext">
+                    <xsl:with-param name="msgid" select="'Published By'"/>
+                  </xsl:call-template>
+                </span>
+              </div>
+              <ul class="credits">
+                <xsl:for-each select="$publishers">
+                  <li>
+                    <xsl:apply-templates select="."/>
+                  </li>
+                </xsl:for-each>
+              </ul>
+            </div>
+          </xsl:if>
           <xsl:if test="$othercredits">
             <div class="aboutblurb othercredits">
               <div class="title">
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index c8215b4..ed30c61 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -107,7 +107,7 @@ the #{page} element. Information is extracted from the #{info} element of ${node
             <ul class="credits">
               <xsl:for-each select="$authors">
                 <li>
-                  <xsl:value-of select="mal:name"/>
+                  <xsl:apply-templates mode="mal2html.inline.mode" select="mal:name/node()"/>
                 </li>
               </xsl:for-each>
             </ul>
@@ -127,7 +127,7 @@ the #{page} element. Information is extracted from the #{info} element of ${node
             <ul class="credits">
               <xsl:for-each select="$editors">
                 <li>
-                  <xsl:value-of select="mal:name"/>
+                  <xsl:apply-templates mode="mal2html.inline.mode" select="mal:name/node()"/>
                 </li>
               </xsl:for-each>
             </ul>
@@ -147,7 +147,7 @@ the #{page} element. Information is extracted from the #{info} element of ${node
             <ul class="credits">
               <xsl:for-each select="$maintainers">
                 <li>
-                  <xsl:value-of select="mal:name"/>
+                  <xsl:apply-templates mode="mal2html.inline.mode" select="mal:name/node()"/>
                 </li>
               </xsl:for-each>
             </ul>
@@ -167,7 +167,27 @@ the #{page} element. Information is extracted from the #{info} element of ${node
             <ul class="credits">
               <xsl:for-each select="$translators">
                 <li>
-                  <xsl:value-of select="mal:name"/>
+                  <xsl:apply-templates mode="mal2html.inline.mode" select="mal:name/node()"/>
+                </li>
+              </xsl:for-each>
+            </ul>
+          </div>
+        </xsl:if>
+        <xsl:variable name="publishers"
+                      select="$node/mal:info/mal:credit[contains(concat(' ', @type, ' '), ' publisher ')]"/>
+        <xsl:if test="$publishers">
+          <div class="aboutblurb publishers">
+            <div class="title">
+              <span class="title">
+                <xsl:call-template name="l10n.gettext">
+                  <xsl:with-param name="msgid" select="'Published By'"/>
+                </xsl:call-template>
+              </span>
+            </div>
+            <ul class="credits">
+              <xsl:for-each select="$publishers">
+                <li>
+                  <xsl:apply-templates mode="mal2html.inline.mode" select="mal:name/node()"/>
                 </li>
               </xsl:for-each>
             </ul>
@@ -175,7 +195,7 @@ the #{page} element. Information is extracted from the #{info} element of ${node
         </xsl:if>
         <xsl:variable name="others"
                       select="set:difference($node/mal:info/mal:credit,
-                              $copyrights | $authors | $editors | $maintainers | $translators)"/>
+                              $copyrights | $authors | $editors | $maintainers | $translators | $publishers)"/>
         <xsl:if test="$others">
           <div class="aboutblurb othercredits">
             <div class="title">
@@ -188,7 +208,7 @@ the #{page} element. Information is extracted from the #{info} element of ${node
             <ul class="credits">
               <xsl:for-each select="$others">
                 <li>
-                  <xsl:value-of select="mal:name"/>
+                  <xsl:apply-templates mode="mal2html.inline.mode" select="mal:name/node()"/>
                 </li>
               </xsl:for-each>
             </ul>



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