diff options
Diffstat (limited to 'officecfg/util/alllang.xsl')
-rw-r--r-- | officecfg/util/alllang.xsl | 52 |
1 files changed, 46 insertions, 6 deletions
diff --git a/officecfg/util/alllang.xsl b/officecfg/util/alllang.xsl index 31b53bccd853..f5d9ae103fc5 100644 --- a/officecfg/util/alllang.xsl +++ b/officecfg/util/alllang.xsl @@ -35,6 +35,7 @@ <xsl:param name="fallback-locale">en-US</xsl:param> <xsl:param name="LIBO_SHARE_FOLDER"/> +<xsl:param name="LIBO_SHARE_HELP_FOLDER"/> <xsl:variable name="schemaRootURL"> <xsl:value-of select="$schemaRoot"/> @@ -341,19 +342,23 @@ <xsl:template match="@oor:name"> <xsl:attribute name="oor:name"> - <xsl:call-template name="replace"> + <xsl:call-template name="replacetwo"> <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:with-param name="pattern1" select="'@LIBO_SHARE_FOLDER@'"/> + <xsl:with-param name="replace1" select="$LIBO_SHARE_FOLDER"/> + <xsl:with-param name="pattern2" select="'@LIBO_SHARE_HELP_FOLDER@'"/> + <xsl:with-param name="replace2" select="$LIBO_SHARE_HELP_FOLDER"/> </xsl:call-template> </xsl:attribute> </xsl:template> <xsl:template match="text()"> - <xsl:call-template name="replace"> + <xsl:call-template name="replacetwo"> <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:with-param name="pattern1" select="'@LIBO_SHARE_FOLDER@'"/> + <xsl:with-param name="replace1" select="$LIBO_SHARE_FOLDER"/> + <xsl:with-param name="pattern2" select="'@LIBO_SHARE_HELP_FOLDER@'"/> + <xsl:with-param name="replace2" select="$LIBO_SHARE_HELP_FOLDER"/> </xsl:call-template> </xsl:template> @@ -378,4 +383,39 @@ </xsl:choose> </xsl:template> + <xsl:template name="replacetwo"> + <xsl:param name="input"/> + <xsl:param name="pattern1"/> + <xsl:param name="replace1"/> + <xsl:param name="pattern2"/> + <xsl:param name="replace2"/> + <xsl:choose> + <xsl:when test="contains($input, $pattern1)"> + <xsl:call-template name="replace"> + <xsl:with-param + name="input" select="substring-before($input, $pattern1)"/> + <xsl:with-param name="pattern" select="$pattern2"/> + <xsl:with-param name="replace" select="$replace2"/> + </xsl:call-template> + <xsl:value-of select="$replace1"/> + <xsl:call-template name="replacetwo"> + <xsl:with-param + name="input" select="substring-after($input, $pattern1)"/> + <xsl:with-param name="pattern1" select="$pattern1"/> + <xsl:with-param name="replace1" select="$replace1"/> + <xsl:with-param name="pattern2" select="$pattern2"/> + <xsl:with-param name="replace2" select="$replace2"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="replace"> + <xsl:with-param + name="input" select="$input"/> + <xsl:with-param name="pattern" select="$pattern2"/> + <xsl:with-param name="replace" select="$replace2"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + </xsl:transform> |