[Libreoffice-commits] core.git: 4 commits - officecfg/registry officecfg/util solenv/gbuild

Stephan Bergmann sbergman at redhat.com
Sat Oct 5 09:55:15 PDT 2013


 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |   38 +++++-----
 officecfg/registry/data/org/openoffice/Office/Embedding.xcu    |    8 +-
 officecfg/util/data_val.xsl                                    |   35 +++++----
 solenv/gbuild/Configuration.mk                                 |    3 
 4 files changed, 47 insertions(+), 37 deletions(-)

New commits:
commit be67dc7e3a916855f106536c5c0e4ccea1d8a48a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sat Oct 5 18:51:49 2013 +0200

    Add back xsltproc --path arguments
    
    ...that 1f82c0a46529ee056e99fd7031b5d569de522359 "gbuild: kill
    gb_XcsTarget_get_outdir_target" had disposed of, to avoid "failed to load
    external entity" warnings when .xcs/.xcu files reference DTDs in
    officecfg/registry/.
    
    Change-Id: I99b99a798782be6ad779b3f9d1951a37b1477926

diff --git a/solenv/gbuild/Configuration.mk b/solenv/gbuild/Configuration.mk
index 49864a5..ae671b7 100644
--- a/solenv/gbuild/Configuration.mk
+++ b/solenv/gbuild/Configuration.mk
@@ -113,12 +113,14 @@ $(call gb_Helper_abbreviate_dirs,\
 		--noout \
 		--stringparam xcs $(call gb_XcsTarget_for_XcuTarget,$(XCUFILE)) \
 		$(gb_Configuration__stringparam_schemaRoot) \
+		--path $(SRCDIR)/officecfg/registry \
 		$(gb_XcuDataTarget_XSLT_DataVal) \
 		$(3) && \
 	$(gb_Configuration_XSLTCOMMAND) --nonet \
 		-o $(1) \
 		--stringparam xcs $(call gb_XcsTarget_for_XcuTarget,$(XCUFILE)) \
 		$(gb_Configuration__stringparam_schemaRoot) \
+		--path $(SRCDIR)/officecfg/registry \
 		$(gb_XcuTarget_XSLT_AllLang) \
 		$(3))
 endef
@@ -249,6 +251,7 @@ $(call gb_Helper_abbreviate_dirs,\
 		--stringparam xcs $(call gb_XcsTarget_for_XcuTarget,$(XCUFILE)) \
 		$(gb_Configuration__stringparam_schemaRoot) \
 		--stringparam locale $(word 2,$(subst /, ,$(2))) \
+		--path $(SRCDIR)/officecfg/registry \
 		$(gb_XcuTarget_XSLT_AllLang) \
 		$(3))
 endef
commit 30fd40e42305069eb52eb4b47acf869d91c21ee5
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sat Oct 5 17:29:05 2013 +0200

    Improve prop value checks
    
    Change-Id: Iee877c5d4ca384a19302fe2a1fc2837325bfd604

diff --git a/officecfg/util/data_val.xsl b/officecfg/util/data_val.xsl
index fcd7a16..cd2f10e 100644
--- a/officecfg/util/data_val.xsl
+++ b/officecfg/util/data_val.xsl
@@ -182,21 +182,28 @@
 <!-- ****************************************** -->
 	<xsl:template match="value">
         <xsl:call-template name="checkModule"/>
-
-        <xsl:if test="@install:module">
-            <xsl:variable name = "path">
-                <xsl:call-template name="collectPath"/>
-            </xsl:variable>
-            <xsl:variable name = "module" select="@install:module"/>
-            <xsl:variable name = "lang" select="@xml:lang"/>
-
-            <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="not(preceding-sibling::value/@install:module)">
-                <xsl:message>ATTENTION: Property '<xsl:value-of select="$path"/>' has different values for different modules. Make sure the modules are mutually exclusive!</xsl:message>
-            </xsl:if>
+        <xsl:variable name="path">
+          <xsl:call-template name="collectPath"/>
+        </xsl:variable>
+        <xsl:variable name="lang" select="@xml:lang"/>
+        <xsl:variable name="module" select="@install:module"/>
+        <xsl:if test="$module and $lang='x-no-translate'">
+          <xsl:message terminate="yes">ERROR: Property '<xsl:value-of select="$path"/>' has value for special xml:lang="x-no-translate" in module <xsl:value-of select="$module"/>.</xsl:message>
         </xsl:if>
+        <xsl:choose>
+          <xsl:when
+              test="preceding-sibling::value[($lang and not(@xml:lang)) or (not($lang) and @xml:lang)]">
+            <xsl:message terminate="yes">ERROR: Property '<xsl:value-of select="$path"/>' has values with and without xml:lang attributes.</xsl:message>
+          </xsl:when>
+          <xsl:when
+              test="preceding-sibling::value[((not($lang) and not(@xml:lang)) or $lang=@xml:lang) and ((not($module) and not(@install:module)) or $module=@install:module)]">
+            <xsl:message terminate="yes">ERROR: Property '<xsl:value-of select="$path"/>' has values with matching xml:lang attribute <xsl:value-of select="$lang"/> and inconsistent install:module attributes.</xsl:message>
+          </xsl:when>
+          <xsl:when
+              test="preceding-sibling::value[((not($lang) and not(@xml:lang)) or $lang=@xml:lang) and (($module and not(@install:module)) or (not($module) and @install:module) or $module!=@install:module)]">
+            <xsl:message>ATTENTION: Property '<xsl:value-of select="$path"/>' has different values for different modules. Make sure the modules are mutually exclusive!</xsl:message>
+          </xsl:when>
+        </xsl:choose>
 	</xsl:template>
 
 <!-- ****************************************** -->
commit aced29f305a25fba8f8a968599f4b4ba226b7098
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sat Oct 5 17:27:25 2013 +0200

    No need to hide xml:lang="x-no-translate" in dummy install:module
    
    Change-Id: Id9e3c40c14b43924467c23fad11e97951121d17d

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index 0e488b3..2c86382 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -642,7 +642,7 @@
         </node>
         <node oor:name="F11" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="en-US" install:module="unxwnt">.uno:DesignerDialog</value>
           </prop>
         </node>
@@ -1083,7 +1083,7 @@
         </node>
         <node oor:name="T_MOD1" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="de" install:module="unxwnt">.uno:SubScript</value>
             <value xml:lang="es" install:module="unxwnt">.uno:AlignHorizontalCenter</value>
             <value xml:lang="en-US" install:module="macosx">.uno:DesignerDialog</value>
@@ -1393,7 +1393,7 @@
         </node>
         <node oor:name="F11" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="en-US" install:module="unxwnt">.uno:DesignerDialog</value>
           </prop>
         </node>
@@ -1637,7 +1637,7 @@
         </node>
         <node oor:name="T_MOD1" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="de" install:module="unxwnt">.uno:SubScript</value>
             <value xml:lang="es" install:module="unxwnt">.uno:CenterPara</value>
             <value xml:lang="en-US" install:module="macosx">.uno:DesignerDialog</value>
@@ -1933,7 +1933,7 @@
         </node>
         <node oor:name="F11" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="en-US" install:module="unxwnt">.uno:DesignerDialog</value>
           </prop>
         </node>
@@ -2386,7 +2386,7 @@
         </node>
         <node oor:name="T_MOD1" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="de" install:module="unxwnt">.uno:SubScript</value>
             <value xml:lang="es" install:module="unxwnt">.uno:CenterPara</value>
             <value xml:lang="en-US" install:module="macosx">.uno:DesignerDialog</value>
@@ -2616,7 +2616,7 @@
         </node>
         <node oor:name="F11" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="en-US" install:module="unxwnt">.uno:DesignerDialog</value>
           </prop>
         </node>
@@ -2890,7 +2890,7 @@
         </node>
         <node oor:name="T_MOD1" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="de" install:module="unxwnt">.uno:SubScript</value>
             <value xml:lang="es" install:module="unxwnt">.uno:CenterPara</value>
             <value xml:lang="en-US" install:module="macosx">.uno:DesignerDialog</value>
@@ -3254,7 +3254,7 @@
         </node>
         <node oor:name="F11" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="en-US" install:module="unxwnt">.uno:DesignerDialog</value>
           </prop>
         </node>
@@ -3707,7 +3707,7 @@
         </node>
         <node oor:name="T_MOD1" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="de" install:module="unxwnt">.uno:SubScript</value>
             <value xml:lang="es" install:module="unxwnt">.uno:CenterPara</value>
             <value xml:lang="en-US" install:module="macosx">.uno:DesignerDialog</value>
@@ -4015,7 +4015,7 @@
         </node>
         <node oor:name="F11" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="en-US" install:module="unxwnt">.uno:DesignerDialog</value>
           </prop>
         </node>
@@ -4492,7 +4492,7 @@
         </node>
         <node oor:name="T_MOD1" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="de" install:module="unxwnt">.uno:SubScript</value>
             <value xml:lang="es" install:module="unxwnt">.uno:CenterPara</value>
             <value xml:lang="en-US" install:module="macosx">.uno:DesignerDialog</value>
@@ -4776,7 +4776,7 @@
         </node>
         <node oor:name="F11" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="en-US" install:module="unxwnt">.uno:DesignerDialog</value>
           </prop>
         </node>
@@ -5229,7 +5229,7 @@
         </node>
         <node oor:name="T_MOD1" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="de" install:module="unxwnt">.uno:SubScript</value>
             <value xml:lang="es" install:module="unxwnt">.uno:CenterPara</value>
             <value xml:lang="en-US" install:module="macosx">.uno:DesignerDialog</value>
@@ -5549,7 +5549,7 @@
         </node>
         <node oor:name="F11" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="en-US" install:module="unxwnt">.uno:DesignerDialog</value>
           </prop>
         </node>
@@ -6002,7 +6002,7 @@
         </node>
         <node oor:name="T_MOD1" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="de" install:module="unxwnt">.uno:SubScript</value>
             <value xml:lang="es" install:module="unxwnt">.uno:CenterPara</value>
             <value xml:lang="en-US" install:module="macosx">.uno:DesignerDialog</value>
@@ -6322,7 +6322,7 @@
         </node>
         <node oor:name="F11" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="en-US" install:module="unxwnt">.uno:DesignerDialog</value>
           </prop>
         </node>
@@ -6775,7 +6775,7 @@
         </node>
         <node oor:name="T_MOD1" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="de" install:module="unxwnt">.uno:SubScript</value>
             <value xml:lang="es" install:module="unxwnt">.uno:CenterPara</value>
             <value xml:lang="en-US" install:module="macosx">.uno:DesignerDialog</value>
@@ -7247,7 +7247,7 @@
         </node>
         <node oor:name="T_MOD1" oor:op="replace">
           <prop oor:name="Command">
-            <value xml:lang="x-no-translate" install:module="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
             <value xml:lang="de" install:module="unxwnt">.uno:SubScript</value>
             <value xml:lang="es" install:module="unxwnt">.uno:AlignHorizontalCenter</value>
             <value xml:lang="en-US" install:module="macosx">.uno:DesignerDialog</value>
commit c6f8def934bc6019692b51ffcd0fc1634db23056
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sat Oct 5 15:28:21 2013 +0200

    Fix misuses of xml:lang="x-comment" in non-localized props
    
    Change-Id: I22eae40f740e4454a83f55aed0dd4cf08a0f4492

diff --git a/officecfg/registry/data/org/openoffice/Office/Embedding.xcu b/officecfg/registry/data/org/openoffice/Office/Embedding.xcu
index 1d15bb4..e39af5d 100644
--- a/officecfg/registry/data/org/openoffice/Office/Embedding.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Embedding.xcu
@@ -22,7 +22,7 @@
     <node oor:name="PRIMARY" oor:op="replace">
       <prop oor:name="VerbUIName">
         <value>Primary</value>
-        <value xml:lang="x-comment">Is not shown in UI. No translation is required.</value>
+        <!-- Is not shown in UI. No translation is required. -->
       </prop>
       <prop oor:name="VerbID">
         <value>0</value>
@@ -65,7 +65,7 @@
     <node oor:name="HIDE" oor:op="replace">
       <prop oor:name="VerbUIName">
         <value>Hide</value>
-        <value xml:lang="x-comment">Is not shown in UI. No translation is required.</value>
+        <!-- Is not shown in UI. No translation is required. -->
       </prop>
       <prop oor:name="VerbID">
         <value>-3</value>
@@ -80,7 +80,7 @@
     <node oor:name="UIACTIVATE" oor:op="replace">
       <prop oor:name="VerbUIName">
         <value>UI activate</value>
-        <value xml:lang="x-comment">Is not shown in UI. No translation is required.</value>
+        <!-- Is not shown in UI. No translation is required. -->
       </prop>
       <prop oor:name="VerbID">
         <value>-4</value>
@@ -95,7 +95,7 @@
     <node oor:name="IPACTIVATE" oor:op="replace">
       <prop oor:name="VerbUIName">
         <value>Activate inplace</value>
-        <value xml:lang="x-comment">Is not shown in UI. No translation is required.</value>
+        <!-- Is not shown in UI. No translation is required. -->
       </prop>
       <prop oor:name="VerbID">
         <value>-5</value>


More information about the Libreoffice-commits mailing list