diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-02-08 10:04:31 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-02-11 15:30:54 +0100 |
commit | 381d116290f6bfbb0106db29a33d51f56e4b8f08 (patch) | |
tree | 4017f617d1cf420816a456b2db95989c8840e996 /officecfg/util | |
parent | 3a86fcbafd3c497f224e743fc566f00a23b19bb4 (diff) |
Check for erroneously localized values of non-localized properties
See ffd8369b909c86653ef30593fddf67c9f5308583 "rhbz#1541486: Fix localized'ness
of ooSetupFactoryUIName props". Turns out adapting the XSLT was easier than
feared.
The two other incidents found are fixed with
c7ab472b47023c94c06de9e3479a2e0271084dfc
"/org.openoffice.Office.Writer/Layout/Other/TabStop should be localized" and
552bebc85d907748dcd72b7978a00a3eee7c4f34
"/org...Writer/Insert/Caption/CaptionOrderNumberingFirst should be localized".
Change-Id: Ic3b29a69d517440d133daed1f3b07d1f7510dab8
Reviewed-on: https://gerrit.libreoffice.org/49473
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'officecfg/util')
-rw-r--r-- | officecfg/util/data_val.xsl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/officecfg/util/data_val.xsl b/officecfg/util/data_val.xsl index abe7eb30090c..97508eb34a00 100644 --- a/officecfg/util/data_val.xsl +++ b/officecfg/util/data_val.xsl @@ -171,6 +171,14 @@ <xsl:message terminate="yes">ERROR: Property '<xsl:value-of select="$path"/>' has unexpected operation '<xsl:value-of select="@oor:op"/>' !</xsl:message> </xsl:if> + <xsl:if test="not($context/@oor:localized='true')"> + <xsl:for-each select="value"> + <xsl:if test="@xml:lang"> + <xsl:message terminate="yes">ERROR: Non-localized property '<xsl:value-of select="$path"/>' has value for xml:lang='<xsl:value-of select="@xml:lang"/>'!</xsl:message> + </xsl:if> + </xsl:for-each> + </xsl:if> + <xsl:call-template name="checkModule"/> <xsl:call-template name="checkDuplicates"/> @@ -237,6 +245,13 @@ </xsl:otherwise> </xsl:choose> + <!-- Extension properties are always non-localized: --> + <xsl:for-each select="value"> + <xsl:if test="@xml:lang"> + <xsl:message terminate="yes">ERROR: Non-localized extension property '<xsl:value-of select="$path"/>' has value for xml:lang='<xsl:value-of select="@xml:lang"/>'!</xsl:message> + </xsl:if> + </xsl:for-each> + <xsl:call-template name="checkModule"/> <xsl:call-template name="checkDuplicates"/> </xsl:template> |