[gimp-help-2/roman_links_to_translations_168256: 3/4] Housekeeping
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-help-2/roman_links_to_translations_168256: 3/4] Housekeeping
- Date: Thu, 20 Sep 2012 05:56:44 +0000 (UTC)
commit a760624fbf0778bbb2f85c4866282529cf41fff6
Author: Roman Joost <roman bromeco de>
Date: Thu Sep 20 15:38:47 2012 +1000
Housekeeping
stylesheets/plainhtml.xsl.in | 2 +-
stylesheets/tokenize.xsl | 36 ++++++++++++++++--------------------
2 files changed, 17 insertions(+), 21 deletions(-)
---
diff --git a/stylesheets/plainhtml.xsl.in b/stylesheets/plainhtml.xsl.in
index de77e9d..1f3b15e 100644
--- a/stylesheets/plainhtml.xsl.in
+++ b/stylesheets/plainhtml.xsl.in
@@ -180,7 +180,7 @@
<xsl:variable name="filename">
<xsl:call-template name="href.target" />
</xsl:variable>
- <xsl:call-template name="tokenize">
+ <xsl:call-template name="gimp.help.tokenize">
<xsl:with-param name="linguas" select="$all_linguas" />
<xsl:with-param name="filename" select="$filename" />
</xsl:call-template>
diff --git a/stylesheets/tokenize.xsl b/stylesheets/tokenize.xsl
index 4f243f4..a4386aa 100644
--- a/stylesheets/tokenize.xsl
+++ b/stylesheets/tokenize.xsl
@@ -7,7 +7,11 @@
<xsl:variable name="vocab" select="document('vocab.xml')" />
<xsl:variable name="splitstr" select="' '" />
- <xsl:template name="tokenize">
+ <!-- The tokenizer splits all languages and creates for each language
+ a link element with the href pointing to the concatenated result
+ of the language id and the given filename paramenter.
+ -->
+ <xsl:template name="gimp.help.tokenize">
<xsl:param name="linguas" />
<xsl:param name="filename" />
<xsl:param name="tail">
@@ -20,25 +24,17 @@
<xsl:value-of select="concat('../', $lang, '/', $filename)" />
</xsl:param>
- <xsl:choose>
- <xsl:when test="contains($tail, $splitstr)">
- <xsl:call-template name="create_link">
- <xsl:with-param name="href" select="$uri" />
- <xsl:with-param name="title" select="$vocab/vocab/item[ value=$lang]" />
- </xsl:call-template>
-
- <xsl:call-template name="tokenize">
- <xsl:with-param name="linguas" select="$tail" />
- <xsl:with-param name="filename" select="$filename" />
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="create_link">
- <xsl:with-param name="href" select="$uri" />
- <xsl:with-param name="title" select="$vocab/vocab/item[ value=$tail]" />
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:call-template name="create_link">
+ <xsl:with-param name="href" select="$uri" />
+ <xsl:with-param name="title" select="$vocab/vocab/item[ value=$lang]" />
+ </xsl:call-template>
+
+ <xsl:if test="contains($tail, $splitstr)">
+ <xsl:call-template name="gimp.help.tokenize">
+ <xsl:with-param name="linguas" select="$tail" />
+ <xsl:with-param name="filename" select="$filename" />
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
<xsl:template name="create_link">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]