officecfg/util/alllang.xsl     |    5 +++++
 solenv/gbuild/Configuration.mk |    5 +++++
 2 files changed, 10 insertions(+)

New commits:
commit d9f4b2d7a2db5408f3709e369ef72d8a6a58a3af
Author:     Andras Timar <[email protected]>
AuthorDate: Mon Feb 16 15:56:21 2026 +0100
Commit:     Miklos Vajna <[email protected]>
CommitDate: Tue Feb 17 08:27:07 2026 +0100

    alllang.xsl: filter disabled install:module nodes in locale mode
    
    When LibreOffice is built with --disable-librelogo, per-locale registry
    XCD files (registry_sq.xcd, etc.) still contain translations for
    LibreLogo toolbar nodes, causing configmanager "unknown set member node"
    warnings at runtime because the module-specific registry_librelogo.xcd
    is absent.
    
    The root cause is that alllang.xsl processes XCU files in two modes:
    non-locale mode (with $module param) correctly filters install:module
    nodes, but locale mode (with $locale param) has no module filtering,
    so translations for all modules leak into per-locale XCDs.
    
    Add a disabled-modules parameter to alllang.xsl, populated from
    BUILD_TYPE in Configuration.mk. In locale mode, skip nodes whose
    install:module value is in the disabled list.
    
    Change-Id: Icd4f3942ea5455c85ead3fc0d1e48c6d9d2aeabc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199488
    Reviewed-by: Miklos Vajna <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/officecfg/util/alllang.xsl b/officecfg/util/alllang.xsl
index b9b2d1983551..2a1946ce8f72 100644
--- a/officecfg/util/alllang.xsl
+++ b/officecfg/util/alllang.xsl
@@ -34,6 +34,7 @@
 <xsl:param name="schemaRoot">.</xsl:param>
 <xsl:param name="fallback-locale">en-US</xsl:param>
 
+<xsl:param name="disabled-modules"/>
 <xsl:param name="LIBO_SHARE_FOLDER"/>
 <xsl:param name="LIBO_SHARE_HELP_FOLDER"/>
 
@@ -70,6 +71,9 @@
 
 <!-- locale dependent data -->
     <xsl:template match="node|prop" mode = "locale">
+        <xsl:if test="not(ancestor-or-self::*[@install:module and
+                      contains(concat(' ', $disabled-modules, ' '),
+                               concat(' ', @install:module, ' '))])">
         <xsl:choose>
             <xsl:when test="$locale=$fallback-locale">
                 <xsl:if 
test="descendant::value[@xml:lang=$locale]/../value[not (@xml:lang)]">
@@ -88,6 +92,7 @@
                 </xsl:if>
             </xsl:otherwise>
         </xsl:choose>
+        </xsl:if>
     </xsl:template>
 
     <xsl:template match="value" mode="locale">
diff --git a/solenv/gbuild/Configuration.mk b/solenv/gbuild/Configuration.mk
index 03f0f3ec3713..ff0cde0e5dec 100644
--- a/solenv/gbuild/Configuration.mk
+++ b/solenv/gbuild/Configuration.mk
@@ -63,6 +63,10 @@ endef
 
 gb_Configuration_LANGS := en-US $(filter-out en-US,$(gb_WITH_LANG))
 
+gb_Configuration_DISABLED_MODULES := \
+    $(if $(filter LIBRELOGO,$(BUILD_TYPE)),,librelogo) \
+    $(if $(filter REPORTBUILDER,$(BUILD_TYPE)),,reportbuilder)
+
 gb_XcsTarget_XSLT_SchemaVal := $(SRCDIR)/officecfg/util/schema_val.xsl
 gb_XcsTarget_XSLT_SchemaTrim := $(SRCDIR)/officecfg/util/schema_trim.xsl
 gb_XcsTarget_DTD_Schema := $(SRCDIR)/officecfg/registry/component-schema.dtd
@@ -261,6 +265,7 @@ $(call gb_Helper_abbreviate_dirs,\
                --stringparam xcs $(call gb_XcsTarget_for_XcuTarget,$(XCUFILE)) 
\
                $(gb_Configuration__stringparam_schemaRoot) \
                --stringparam locale $(word 2,$(subst /, ,$(2))) \
+               --stringparam disabled-modules "$(strip 
$(gb_Configuration_DISABLED_MODULES))" \
                --stringparam LIBO_SHARE_FOLDER $(LIBO_SHARE_FOLDER) \
                --stringparam LIBO_SHARE_HELP_FOLDER $(LIBO_SHARE_HELP_FOLDER) \
                --path $(SRCDIR)/officecfg/registry \

Reply via email to