Re: Links to other languages

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

 



On Fri, Oct 19, 2012 at 02:01:32PM +1000, Roman Joost wrote:
> On Wed, Oct 17, 2012 at 08:00:12PM +0200, Ulf-D. Ehlert wrote:
> > > The disadvantage of the current approach is, that the menu is
> > > rendered at 'compile time' not being aware of any other deployed
> > > translations.
> > 
> > Why is this a problem?
> What is built does not necessarily end up on the server.

But how many new languages do you add every year? ;-)

> > The menu is hard to read, but this can
> > be fixed with a proper CSS entry.
> Yes. I kept it that way to be able to test it on docs.gimp.org. I'll
> change the CSS to make it more useful.

There's another simple bug I found when I was playing with CSS:
"<div id=...>" should be replaced with "<div class=...>", since "id"
must be unique.

I have attached a patch with my changes.

Ulf

-- 
Die guten Christen sind am gefährlichsten - man verwechselt
sie mit dem Christentum.
		-- Karlheinz Deschner
--- stylesheets/languageMenu.xsl	2012-10-16 01:29:16.000000000 +0200
+++ stylesheets/languageMenu.xsl	2012-10-19 12:37:49.909059780 +0200
@@ -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" />
--- stylesheets/plainhtml.xsl.in	2012-10-16 01:29:16.000000000 +0200
+++ stylesheets/plainhtml.xsl.in	2012-10-19 12:15:44.680143619 +0200
@@ -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>
_______________________________________________
gimp-docs-list mailing list
gimp-docs-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gimp-docs-list

[Index of Archives]     [Video For Linux]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [Scanners]     [GEGL]     [Gimp's Home]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux