[Libreoffice-commits] core.git: officecfg/util

Stephan Bergmann sbergman at redhat.com
Sun Feb 11 14:31:14 UTC 2018


 officecfg/util/data_val.xsl |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

New commits:
commit 381d116290f6bfbb0106db29a33d51f56e4b8f08
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Feb 8 10:04:31 2018 +0100

    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 at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

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>


More information about the Libreoffice-commits mailing list