summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-06-27 16:13:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-09-28 08:48:33 +0100
commit941436645a3222ee07a7e348e38a34eca763eaea (patch)
treee582787c316ada91543d6a5da16808a6f4a872e7 /solenv
parent3752a7c1ada87c744d5b3fa5c4ceac05e477e1c5 (diff)
add a plausible .ui to .sdf extraction tool
Change-Id: Icd45e901ea9dd664fcbc0db0c71f555c4cc24a34
Diffstat (limited to 'solenv')
-rw-r--r--solenv/bin/uilangfilter.xslt36
1 files changed, 36 insertions, 0 deletions
diff --git a/solenv/bin/uilangfilter.xslt b/solenv/bin/uilangfilter.xslt
new file mode 100644
index 000000000000..f19888677a33
--- /dev/null
+++ b/solenv/bin/uilangfilter.xslt
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ <xsl:output method="xml" encoding="UTF-8"/>
+
+<xsl:template match="/">
+ <l><xsl:text>&#10;</xsl:text>
+ <xsl:apply-templates select="//*[*[not(self::col)]/@translatable='yes']" />
+ <xsl:apply-templates select="interface/object[data/row/col[@translatable='yes']]" />
+ </l>
+</xsl:template>
+
+<xsl:template match="*/*[not(self::col)][@translatable]">
+ <xsl:text> </xsl:text>
+ <t r="string" g="{../@id}" l="{@name}">
+ <xsl:copy-of select="text()" />
+ </t><xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="col">
+ <xsl:text> </xsl:text>
+ <t r="stringlist" g="{../../../@id}" l="{count(preceding::col)}">
+ <xsl:copy-of select="text()" />
+ </t><xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="text()"/>
+
+</xsl:stylesheet>