diff options
Diffstat (limited to 'officecfg/util')
-rw-r--r-- | officecfg/util/alllang.xsl | 12 | ||||
-rw-r--r-- | officecfg/util/data_val.xsl | 8 |
2 files changed, 9 insertions, 11 deletions
diff --git a/officecfg/util/alllang.xsl b/officecfg/util/alllang.xsl index 53f488066e2e..47ae08165928 100644 --- a/officecfg/util/alllang.xsl +++ b/officecfg/util/alllang.xsl @@ -101,7 +101,7 @@ </xsl:template> <xsl:template match="value" mode="locale"> - <xsl:if test="@xml:lang = $locale"> + <xsl:if test="@xml:lang=$locale and not(@install:module)"> <xsl:copy> <xsl:apply-templates select = "@*" mode="locale"/> <xsl:value-of select="."/> @@ -198,7 +198,7 @@ <xsl:param name = "context"/> <xsl:param name = "component-schema"/> - <xsl:variable name="applicable-values" select="descendant::value[not (@xml:lang) or (@xml:lang=$fallback-locale)]"/> + <xsl:variable name="applicable-values" select="descendant::value[not (@xml:lang) or (@xml:lang=$fallback-locale) or (@install:module=$module)]"/> <xsl:variable name="substantive-nodes" select="descendant-or-self::*[(@oor:finalized='true') or (@oor:mandatory='true') or (@oor:op!='modify')]"/> <xsl:choose> @@ -245,13 +245,13 @@ <xsl:apply-templates select = "value"/> </xsl:copy> </xsl:when> - <xsl:when test="value[not (@xml:lang)]"> + <xsl:when test="value[not (@xml:lang) or @install:module]"> <xsl:if test="value[not(@install:module) or @install:module=$module]"> <!-- copy locale independent values only, if the values differ --> <xsl:variable name="isRedundant"> <xsl:call-template name="isRedundant"> <xsl:with-param name="schemaval" select="$context/value"/> - <xsl:with-param name="dataval" select="value[not (@xml:lang) and (not(@install:module) or @install:module=$module)]"/> + <xsl:with-param name="dataval" select="value[(not(@xml:lang) or @install:module) and (not(@install:module) or @install:module=$module)]"/> </xsl:call-template> </xsl:variable> <xsl:if test="$isRedundant ='false'"> @@ -273,7 +273,7 @@ <xsl:template match="value"> <xsl:choose> - <xsl:when test="@xml:lang"/> + <xsl:when test="@xml:lang and not(@install:module)"/> <xsl:when test="$module and not(ancestor-or-self::*/@install:module=$module)"/> <xsl:when test="not($module) and ancestor-or-self::*/@install:module"/> <xsl:otherwise> @@ -286,7 +286,7 @@ </xsl:template> <xsl:template match="value" mode="fallback-locale"> - <xsl:if test="@xml:lang = $fallback-locale"> + <xsl:if test="@xml:lang=$fallback-locale and not(@install:module)"> <xsl:copy> <xsl:apply-templates select = "@*"/> <xsl:value-of select="."/> diff --git a/officecfg/util/data_val.xsl b/officecfg/util/data_val.xsl index 994664376325..bdf7c1ba2546 100644 --- a/officecfg/util/data_val.xsl +++ b/officecfg/util/data_val.xsl @@ -201,12 +201,10 @@ <xsl:call-template name="collectPath"/> </xsl:variable> <xsl:variable name = "module" select="@install:module"/> + <xsl:variable name = "lang" select="@xml:lang"/> - <xsl:if test="@oor:lang"> - <xsl:message terminate="yes">ERROR: Value in property '<xsl:value-of select="$path"/>' has module and locale!</xsl:message> - </xsl:if> - <xsl:if test="following-sibling::value[@install:module=$module]"> - <xsl:message terminate="yes">ERROR: Property '<xsl:value-of select="$path"/>' has multiple values for module <xsl:value-of select="$module"/>!</xsl:message> + <xsl:if test="following-sibling::value[@install:module=$module and @xml:lang=$lang]"> + <xsl:message terminate="yes">ERROR: Property '<xsl:value-of select="$path"/>' has multiple values for module <xsl:value-of select="$module"/> and locale <xsl:value-of select="$lang"/>!</xsl:message> </xsl:if> <xsl:if test="../value[not(@install:module)]"> <xsl:message terminate="yes">ERROR: Property '<xsl:value-of select="$path"/>' has values both with and without module. This is currently not supported. Please contact jb@openoffice.org, if you need this!</xsl:message> |