summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-12-14 14:25:29 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-12-14 15:43:03 +0000
commitc60ef32a644a707bf7d8a1f0e8408771c48b0c46 (patch)
treec9cfeff8be7533ffd6ce94e82f6503d226c821dd /solenv
parentde5f128cb394baea1e4e67552b8c30709c596334 (diff)
add support for loading comboboxtext item strings from .ui
Change-Id: Ic7a43fceb455a119d5b5b17ae79357d92d9ccb3d
Diffstat (limited to 'solenv')
-rw-r--r--solenv/bin/uilangfilter.xslt15
1 files changed, 13 insertions, 2 deletions
diff --git a/solenv/bin/uilangfilter.xslt b/solenv/bin/uilangfilter.xslt
index 90abf11415ba..6d48974bccd2 100644
--- a/solenv/bin/uilangfilter.xslt
+++ b/solenv/bin/uilangfilter.xslt
@@ -20,7 +20,7 @@
<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
+ columns that that are translatable (the first one only)
-->
<xsl:apply-templates select="interface/object[data/row/col[@id='0'][@translatable='yes']]" />
</l>
@@ -29,7 +29,7 @@
<!--
Normal nodes
-->
-<xsl:template match="*/*[not(self::col)][@translatable='yes']">
+<xsl:template match="*/*[not(self::col|self::item)][@translatable='yes']">
<xsl:text> </xsl:text>
<t r="string" g="{str:tokenize(../@id,':')[1]}" l="{@name}">
<xsl:copy-of select="text()" />
@@ -37,6 +37,17 @@
</xsl:template>
<!--
+ Item nodes
+-->
+<xsl:template match="*/*[self::item][@translatable='yes']">
+ <xsl:text> </xsl:text>
+ <xsl:variable name="groupid" select="../../@id"/>
+ <t r="stringlist" g="{str:tokenize(../../@id,':')[1]}" l="{count(preceding::item[../../@id=$groupid])}">
+ <xsl:copy-of select="text()" />
+ </t><xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<!--
Column nodes
-->
<xsl:template match="col[@id='0'][@translatable='yes']">