summaryrefslogtreecommitdiff
path: root/officecfg/util/alllang.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'officecfg/util/alllang.xsl')
-rw-r--r--officecfg/util/alllang.xsl55
1 files changed, 50 insertions, 5 deletions
diff --git a/officecfg/util/alllang.xsl b/officecfg/util/alllang.xsl
index 252a0beefe66..31b53bccd853 100644
--- a/officecfg/util/alllang.xsl
+++ b/officecfg/util/alllang.xsl
@@ -34,6 +34,8 @@
<xsl:param name="schemaRoot">.</xsl:param>
<xsl:param name="fallback-locale">en-US</xsl:param>
+<xsl:param name="LIBO_SHARE_FOLDER"/>
+
<xsl:variable name="schemaRootURL">
<xsl:value-of select="$schemaRoot"/>
</xsl:variable>
@@ -91,7 +93,7 @@
<xsl:if test="@xml:lang=$locale and not(@install:module)">
<xsl:copy>
<xsl:apply-templates select = "@*" mode="locale"/>
- <xsl:copy-of select="node()"/>
+ <xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:if>
</xsl:template>
@@ -265,8 +267,7 @@
<xsl:when test="not($module) and ancestor-or-self::*/@install:module"/>
<xsl:otherwise>
<xsl:copy>
- <xsl:apply-templates select = "@*"/>
- <xsl:copy-of select="node()"/>
+ <xsl:apply-templates select = "@*|node()"/>
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
@@ -275,12 +276,17 @@
<xsl:template match="value" mode="fallback-locale">
<xsl:if test="@xml:lang=$fallback-locale and not(@install:module)">
<xsl:copy>
- <xsl:apply-templates select = "@*"/>
- <xsl:copy-of select="node()"/>
+ <xsl:apply-templates select = "@*|node()"/>
</xsl:copy>
</xsl:if>
</xsl:template>
+ <xsl:template match ="it|unicode">
+ <xsl:copy>
+ <xsl:apply-templates select = "@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+
<xsl:template match = "@*">
<xsl:copy/>
</xsl:template>
@@ -333,4 +339,43 @@
<xsl:value-of select="$fileURL"/>
</xsl:template>
+ <xsl:template match="@oor:name">
+ <xsl:attribute name="oor:name">
+ <xsl:call-template name="replace">
+ <xsl:with-param name="input" select="current()"/>
+ <xsl:with-param name="pattern" select="'@LIBO_SHARE_FOLDER@'"/>
+ <xsl:with-param name="replace" select="$LIBO_SHARE_FOLDER"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="text()">
+ <xsl:call-template name="replace">
+ <xsl:with-param name="input" select="current()"/>
+ <xsl:with-param name="pattern" select="'@LIBO_SHARE_FOLDER@'"/>
+ <xsl:with-param name="replace" select="$LIBO_SHARE_FOLDER"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="replace">
+ <xsl:param name="input"/>
+ <xsl:param name="pattern"/>
+ <xsl:param name="replace"/>
+ <xsl:choose>
+ <xsl:when test="contains($input, $pattern)">
+ <xsl:value-of select="substring-before($input, $pattern)"/>
+ <xsl:value-of select="$replace"/>
+ <xsl:call-template name="replace">
+ <xsl:with-param
+ name="input" select="substring-after($input, $pattern)"/>
+ <xsl:with-param name="pattern" select="$pattern"/>
+ <xsl:with-param name="replace" select="$replace"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$input"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
</xsl:transform>