[gimp-help-2] Applied patch contributed by Ulf-D. Ehlert.



commit 4b8fc4368431e5b6f1bef9024e00984439f5a54c
Author: Roman Joost <roman bromeco de>
Date:   Tue Dec 4 13:45:28 2012 +1000

    Applied patch contributed by Ulf-D. Ehlert.
    
    This patch fixes the tokenizers condition to also include a last token
    in a list.

 stylesheets/languageMenu.xsl |   11 +++++++++--
 stylesheets/plainhtml.xsl.in |    4 ++--
 2 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/stylesheets/languageMenu.xsl b/stylesheets/languageMenu.xsl
index 558a3fd..62864b5 100644
--- a/stylesheets/languageMenu.xsl
+++ b/stylesheets/languageMenu.xsl
@@ -18,7 +18,14 @@
       <xsl:value-of select="substring-after($linguas, $splitstr)" />
     </xsl:param>
     <xsl:param name="lang">
-      <xsl:value-of select="substring-before($linguas, $splitstr)" />
+      <xsl:choose>
+        <xsl:when test="contains($linguas, $splitstr)">
+          <xsl:value-of select="substring-before($linguas, $splitstr)"/>
+        </xsl:when>
+        <xsl:when test="$linguas != ''">
+          <xsl:value-of select="$linguas"/>
+        </xsl:when>
+      </xsl:choose>
     </xsl:param>
     <xsl:param name="uri">
       <xsl:value-of select="concat('../', $lang, '/', $filename)" />
@@ -29,7 +36,7 @@
       <xsl:with-param name="title" select="$vocab/vocab/item[ value=$lang]" />
     </xsl:call-template>
 
-    <xsl:if test="contains($tail, $splitstr)">
+    <xsl:if test="$tail != ''">
       <xsl:call-template name="gimp.help.linguas.tokenize">
         <xsl:with-param name="linguas" select="$tail" />
         <xsl:with-param name="filename" select="$filename" />
diff --git a/stylesheets/plainhtml.xsl.in b/stylesheets/plainhtml.xsl.in
index 835feb6..e6c4497 100644
--- a/stylesheets/plainhtml.xsl.in
+++ b/stylesheets/plainhtml.xsl.in
@@ -178,12 +178,12 @@
           <hr/>
         </xsl:if>
         <xsl:if test="$gimp.help.languageselector != 0">
-          <div id="show_other_language">
+          <div class="show_other_language">
             <xsl:variable name="filename">
               <xsl:call-template name="href.target" />
             </xsl:variable>
             <xsl:call-template name="gimp.help.linguas.tokenize">
-              <xsl:with-param name="linguas" select="$gimp.help.all_linguas" />
+              <xsl:with-param name="linguas" select="normalize-space($gimp.help.all_linguas)"/>
               <xsl:with-param name="filename" select="$filename" />
             </xsl:call-template>
           </div>



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