summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-11-14 13:02:29 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-11-14 13:18:11 +0000
commitf23df687f6975e9ebd4545366fa6d7f76766918f (patch)
tree406cc7583c16f72271122f91e3a3c250a542048c
parent18f08d180db8e821f5c39359e08c177bcfecb58b (diff)
Resolves: fdo#57107 processing translatable child nodes twice
I'm rubbish with xslt. Change-Id: Idc92a602aca7dc2a96cf185b1904e1373435a8a9
-rw-r--r--solenv/bin/uilangfilter.xslt20
1 files changed, 17 insertions, 3 deletions
diff --git a/solenv/bin/uilangfilter.xslt b/solenv/bin/uilangfilter.xslt
index 42d066faee63..90abf11415ba 100644
--- a/solenv/bin/uilangfilter.xslt
+++ b/solenv/bin/uilangfilter.xslt
@@ -13,19 +13,33 @@
<xsl:template match="/">
<l><xsl:text>&#10;</xsl:text>
- <xsl:apply-templates select="//*[*[not(self::col)]/@translatable='yes']" />
+ <!--
+ What I want to do here is to extract all nodes that are translatable
+ except the columns of list and tree stores
+ -->
+ <xsl:apply-templates select="//*[not(self::col)][@translatable='yes']" />
+ <!--
+ What I want to do here is to extract just the list and tree store
+ columns that that are translatable
+ -->
<xsl:apply-templates select="interface/object[data/row/col[@id='0'][@translatable='yes']]" />
</l>
</xsl:template>
-<xsl:template match="*/*[not(self::col)][@translatable]">
+<!--
+ Normal nodes
+-->
+<xsl:template match="*/*[not(self::col)][@translatable='yes']">
<xsl:text> </xsl:text>
<t r="string" g="{str:tokenize(../@id,':')[1]}" l="{@name}">
<xsl:copy-of select="text()" />
</t><xsl:text>&#10;</xsl:text>
</xsl:template>
-<xsl:template match="col[@id='0']">
+<!--
+ Column nodes
+-->
+<xsl:template match="col[@id='0'][@translatable='yes']">
<xsl:text> </xsl:text>
<xsl:variable name="groupid" select="../../../@id"/>
<t r="stringlist" g="{str:tokenize($groupid,':')[1]}" l="{count(preceding::col[@id='0'][../../../@id=$groupid])}">