summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-06-11 20:56:30 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-07-21 08:20:50 +0100
commit00657aef09d854c74fb426a935a3e8b1fc390bb0 (patch)
treefd1a9bb264fe15dcc129498e62060ecd256b1ee7 /solenv
parentfa987cbb813cfd729fe490f2f1258b7c8d7fb174 (diff)
migrate to boost::gettext
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
Diffstat (limited to 'solenv')
-rwxr-xr-xsolenv/bin/hrcex35
-rwxr-xr-xsolenv/bin/uiex35
-rw-r--r--solenv/bin/uilangfilter.xslt63
-rw-r--r--solenv/doc/gbuild/solenv/gbuild/alllangres.mk108
-rw-r--r--solenv/doc/gbuild/solenv/gbuild/types.mk9
-rw-r--r--solenv/gbuild/AllLangMoTarget.mk105
-rw-r--r--solenv/gbuild/AllLangResTarget.mk346
-rw-r--r--solenv/gbuild/CppunitTest.mk1
-rw-r--r--solenv/gbuild/Helper.mk5
-rw-r--r--solenv/gbuild/Library.mk1
-rw-r--r--solenv/gbuild/LinkTarget.mk11
-rw-r--r--solenv/gbuild/Module.mk7
-rw-r--r--solenv/gbuild/TargetLocations.mk8
-rw-r--r--solenv/gbuild/UIConfig.mk144
-rw-r--r--solenv/gbuild/extensions/post_GbuildToJson.mk1
-rw-r--r--solenv/gbuild/extensions/post_PackageInfo.mk7
-rw-r--r--solenv/gbuild/extensions/pre_BuildTools.mk3
-rw-r--r--solenv/gbuild/gbuild.help.txt2
-rw-r--r--solenv/gbuild/gbuild.mk2
-rw-r--r--solenv/qa/python/gbuildtojson.py2
20 files changed, 193 insertions, 702 deletions
diff --git a/solenv/bin/hrcex b/solenv/bin/hrcex
new file mode 100755
index 000000000000..2a657290ed88
--- /dev/null
+++ b/solenv/bin/hrcex
@@ -0,0 +1,35 @@
+#!/usr/bin/python
+
+import polib
+import binascii
+import getopt
+import sys
+import os.path
+from subprocess import check_output
+
+try:
+ myopts, args = getopt.getopt(sys.argv[1:], "i:o:")
+except getopt.GetoptError as e:
+ print(" Syntax: hrcex -i FileIn -o FileOut")
+ print(" FileIn: Source files (*.ui)")
+ print(" FileOut: Destination file (*.*)")
+ sys.exit(2)
+
+for o, a in myopts:
+ if o == '-i':
+ ifile = a
+ elif o == '-o':
+ ofile = a
+
+with open(ofile, "a") as output:
+ input = check_output(["xgettext", "-C", "--add-comments", "--keyword=NC_:1c,2", "--from-code=UTF-8", "--no-wrap", ifile, "-o", "-"])
+ po = polib.pofile(input)
+ if len(po) != 0:
+ print >> output, ""
+ for entry in po:
+ keyid = entry.msgctxt + '|' + entry.msgid
+ print >> output, '#. ' + polib.genKeyId(keyid)
+ location = entry.occurrences[0][0]
+ location = os.path.basename(location)
+ entry.occurrences[0] = location, entry.occurrences[0][1]
+ print >> output, entry
diff --git a/solenv/bin/uiex b/solenv/bin/uiex
new file mode 100755
index 000000000000..0f086a20c6c7
--- /dev/null
+++ b/solenv/bin/uiex
@@ -0,0 +1,35 @@
+#!/usr/bin/python
+
+import polib
+import binascii
+import getopt
+import sys
+import os.path
+from subprocess import check_output
+
+try:
+ myopts, args = getopt.getopt(sys.argv[1:], "i:o:")
+except getopt.GetoptError as e:
+ print(" Syntax: uiex -i FileIn -o FileOut")
+ print(" FileIn: Source files (*.ui)")
+ print(" FileOut: Destination file (*.*)")
+ sys.exit(2)
+
+for o, a in myopts:
+ if o == '-i':
+ ifile = a
+ elif o == '-o':
+ ofile = a
+
+with open(ofile, "a") as output:
+ input = check_output(["xgettext", "--add-comments", "--no-wrap", ifile, "-o", "-"])
+ po = polib.pofile(input)
+ if len(po) != 0:
+ print >> output, ""
+ for entry in po:
+ keyid = entry.msgctxt + '|' + entry.msgid
+ print >> output, '#. ' + polib.genKeyId(keyid)
+ location = entry.occurrences[0][0]
+ location = os.path.basename(location)
+ entry.occurrences[0] = location, entry.occurrences[0][1]
+ print >> output, entry
diff --git a/solenv/bin/uilangfilter.xslt b/solenv/bin/uilangfilter.xslt
deleted file mode 100644
index 7eb3557fa7a2..000000000000
--- a/solenv/bin/uilangfilter.xslt
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
--->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:str="http://exslt.org/strings">
- <xsl:output method="xml" encoding="UTF-8"/>
-
-<xsl:template match="/">
- <l><xsl:text>&#10;</xsl:text>
- <!--
- What I want to do here is to extract all nodes that are translatable
- except the columns of list and tree stores
- -->
- <xsl:apply-templates select="//*[not(self::col)][@translatable='yes']" />
- <!--
- What I want to do here is to extract just the list and tree store
- columns that are translatable (the first one only)
- -->
- <xsl:apply-templates select="interface/object[data/row/col[@id='0'][@translatable='yes']]" />
- </l>
-</xsl:template>
-
-<!--
- Normal nodes
--->
-<xsl:template match="*/*[not(self::col|self::item)][@translatable='yes']">
- <xsl:text> </xsl:text>
- <t r="string" g="{str:tokenize(../@id,':')[1]}" l="{@name}">
- <xsl:copy-of select="text()" />
- </t><xsl:text>&#10;</xsl:text>
-</xsl:template>
-
-<!--
- Item nodes
--->
-<xsl:template match="*/*[self::item][@translatable='yes']">
- <xsl:text> </xsl:text>
- <xsl:variable name="groupid" select="../../@id"/>
- <t r="stringlist" g="{str:tokenize(../../@id,':')[1]}" l="{count(preceding::item[../../@id=$groupid])}">
- <xsl:copy-of select="text()" />
- </t><xsl:text>&#10;</xsl:text>
-</xsl:template>
-
-<!--
- Column nodes
--->
-<xsl:template match="col[@id='0'][@translatable='yes']">
- <xsl:text> </xsl:text>
- <xsl:variable name="groupid" select="../../../@id"/>
- <t r="stringlist" g="{str:tokenize($groupid,':')[1]}" l="{count(preceding::col[@id='0'][../../../@id=$groupid])}">
- <xsl:copy-of select="text()" />
- </t><xsl:text>&#10;</xsl:text>
-</xsl:template>
-
-<xsl:template match="text()"/>
-
-</xsl:stylesheet>
diff --git a/solenv/doc/gbuild/solenv/gbuild/alllangres.mk b/solenv/doc/gbuild/solenv/gbuild/alllangres.mk
deleted file mode 100644
index 45482a92420d..000000000000
--- a/solenv/doc/gbuild/solenv/gbuild/alllangres.mk
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <types.h>
-
-namespace gb
-{
- class SrsTarget;
- class ResTarget;
- class AllLangResTarget;
-
- class SrsPartTarget : public Target, public HasDependencies, public UsesRsc
- {
- private:
- /// SrsPartTarget s do not need to be explicitly constructed.
-
- /// They are a helper class for the SrsTarget class.
- /// They are named after the path of their source file (without
- /// file extension) from the root of their source repository.
- SrsPartTarget(String name);
- friend class SrsTarget;
-
- /// Platformdependent command to generate the dependencies for the srs target.
- static const Command command_dep(
- String srsname,
- Path sourcefile,
- List<Path> include,
- List<String> defs);
- };
-
- class SrsTarget : public Target, public HasDependencies, public IsCleanable
- {
- public:
- /// Sets defines for srs processing.
- /// \$\$(DEFS) contains the current flags and can be used, if
- /// just a few need to be modified.
- void set_defs(List<String> defs);
- /// Sets the include paths for srs processing.
- /// \$\$(INCLUDE) contains the current paths and can be used, if
- /// just a few need to be modified.
- void set_include(List<String> include);
- /// Adds a SrsPartTarget to be processed.
- void add_file(SrsPartTarget part);
- /// Adds multiple SrsPartTarget s to be processed.
- void add_files(List<SrsPartTarget> parts);
- private:
- /// SrsTarget s do not need to be explicitly constructed.
-
- /// They are a helper class for the ResTarget class.
- SrsTarget(String name);
- friend class ResTarget;
-
- List<String> DEFS;
- List<String> INCLUDE
- List<SrsPartTarget> PARTS;
- static const List<String> DEFAULTDEFS;
- };
-
- class ResTarget : public Target, public IsCleanable, public HasSrs
- {
- public:
- void add_file(Path file);
- void add_files(List<Path> files);
- private:
- /// ResTarget do not need to be explicitly constructed.
-
- /// They are a helper class for the AllLangResTarget class.
- ResTarget(String name, String library, Language lang, Path reslocation);
- friend class AllLangResTarget;
-
- String LIBRARY;
- Language LANGUAGE;
- Path RESLOCATION;
- };
-
- class AllLangResTarget : public Target, public IsCleanable, public HasSrs
- {
- public:
- AllLangResTarget(String name);
- /// Sets the location where resources are to be found. reslocation is a path relative to the icon-themes/galaxy directory.
- /// Resources will be found in reslocation itself and in the subdirectories res/ of it and again in subdirectories
- /// of those named as the language of the processed resource. In addition, resources are found in the res/ directory directly
- /// below icon-themes/galaxy and the subdirectory of it named as the language of the processed resource.
- void set_reslocation(Path reslocation);
- private:
- /// Sets the languages for which to create resources.
- static void set_langs(List<Language> langs);
-
- /// The list of languages that need to be build.
- static List<Language> LANGS;
- };
-}
-/* vim: set filetype=cpp : */
diff --git a/solenv/doc/gbuild/solenv/gbuild/types.mk b/solenv/doc/gbuild/solenv/gbuild/types.mk
index cf10d4db8bdf..7e606bd02731 100644
--- a/solenv/doc/gbuild/solenv/gbuild/types.mk
+++ b/solenv/doc/gbuild/solenv/gbuild/types.mk
@@ -158,15 +158,6 @@ namespace gb { namespace types
/// just a few need to be modified.
void set_include(List<Path> include);
};
- /// A target using the resource compiler
- class UsesRsc
- {
- public:
- /// The command to execute rsc.
- static const Command RSCCOMMAND;
- /// The target on with to depend to make sure the rsc executable is available.
- static const Path RSCTARGET;
- };
/// A target processing a set of srs files
class HasSrs
{
diff --git a/solenv/gbuild/AllLangMoTarget.mk b/solenv/gbuild/AllLangMoTarget.mk
new file mode 100644
index 000000000000..e94ba29057be
--- /dev/null
+++ b/solenv/gbuild/AllLangMoTarget.mk
@@ -0,0 +1,105 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+# Overview of dependencies and tasks of AllLangMoTarget
+#
+# target task depends on
+# AllLangMoTarget nothing MoTarget for all active langs
+# MoTarget running msgfmt
+
+gb_MoTarget_LOCALESTRDEPS := $(call gb_Executable_get_runtime_dependencies,localestr)
+gb_MoTarget_LOCALESTRCOMMAND := $(call gb_Executable_get_command,localestr)
+
+# MoTarget
+
+$(call gb_MoTarget_get_clean_target,%) :
+ $(call gb_Output_announce,$*,$(false),RES,2)
+ $(call gb_Helper_abbreviate_dirs,\
+ rm -f \
+ $(call gb_MoTarget_get_target,$*) \
+ $(call gb_MoTarget_get_install_target,$*))
+
+#for the moment merge existing source and ui translations into a single .po,
+#and minimize msgctxt
+#eventually instead can do something like
+#msgfmt $(gb_POLOCATION)/$(LANGUAGE)/$(LIBRARY)/messages.po -o $@)
+$(call gb_MoTarget_get_target,%) : $(gb_Helper_MISCDUMMY) $(gb_MoTarget_LOCALESTRDEPS)
+ $(call gb_Output_announce,$*,$(true),MO,2)
+ $(call gb_Helper_abbreviate_dirs,\
+ mkdir -p $(dir $@) && \
+ $(MSGUNIQ) $(gb_POLOCATION)/$(LANGUAGE)/$(POLOCATION)/messages.po | $(MSGFMT) - -o $@)
+
+#$(info $(call gb_MoTarget_get_target,$(1)))
+define gb_MoTarget_MoTarget
+$(call gb_MoTarget_get_target,$(1)) : LIBRARY = $(2)
+$(call gb_MoTarget_get_target,$(1)) : LANGUAGE = $(3)
+$(call gb_MoTarget_get_target,$(1)) : POLOCATION = $(2)
+$(call gb_AllLangMoTarget_get_clean_target,$(2)) : $(call gb_MoTarget_get_clean_target,$(1))
+
+endef
+
+define gb_MoTarget_set_polocation
+$(call gb_MoTarget_get_target,$(1)) : POLOCATION = $(2)
+
+endef
+
+# AllLangMoTarget
+
+gb_AllLangMoTarget_LANGS := $(filter-out qtz,$(filter-out en-US,$(gb_WITH_LANG)))
+
+define gb_AllLangMoTarget_set_langs
+gb_AllLangMoTarget_LANGS := $(1)
+endef
+
+$(call gb_AllLangMoTarget_get_clean_target,%) :
+ $(call gb_Helper_abbreviate_dirs,\
+ rm -f $(call gb_AllLangMoTarget_get_target,$*))
+
+$(call gb_AllLangMoTarget_get_target,%) : $(gb_MoTarget_LOCALESTRDEPS)
+ $(call gb_Helper_abbreviate_dirs,\
+ mkdir -p $(dir $@) && touch $@)
+
+gb_MoTarget_get_install_target = $(INSTROOT)/$(LIBO_SHARE_RESOURCE_FOLDER)/$(1).mo
+
+define gb_AllLangMoTarget_AllLangMoTarget
+ifeq (,$$(filter $(1),$$(gb_AllLangMoTarget_REGISTERED)))
+$$(eval $$(call gb_Output_info,Currently known AllLangMoTargets are: $(sort $(gb_AllLangMoTarget_REGISTERED)),ALL))
+$$(eval $$(call gb_Output_error,AllLangMoTarget $(1) must be registered in Repository.mk))
+endif
+$(foreach lang,$(gb_AllLangMoTarget_LANGS),\
+ $(call gb_MoTarget_MoTarget,$(1)$(lang),$(1),$(lang)))
+
+$(foreach lang,$(gb_AllLangMoTarget_LANGS),\
+$(call gb_Helper_install,$(call gb_AllLangMoTarget_get_target,$(1)), \
+ $(call gb_MoTarget_get_install_target,$(shell $(SRCDIR)/bin/run localestr $(lang))/LC_MESSAGES/$(1)), \
+ $(call gb_MoTarget_get_target,$(1)$(lang))))
+
+$$(eval $$(call gb_Module_register_target,$(call gb_AllLangMoTarget_get_target,$(1)),$(call gb_AllLangMoTarget_get_clean_target,$(1))))
+$(call gb_Helper_make_userfriendly_targets,$(1),AllLangMoTarget)
+$(call gb_Postprocess_register_target,AllResources,AllLangMoTarget,$(1))
+
+endef
+
+define gb_AllLangMoTarget_set_polocation
+$(foreach lang,$(gb_AllLangMoTarget_LANGS),\
+ $(call gb_MoTarget_set_polocation,$(1)$(lang),$(2)))
+
+endef
+
+# vim: set noet sw=4:
diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk
deleted file mode 100644
index 3976ecc002ff..000000000000
--- a/solenv/gbuild/AllLangResTarget.mk
+++ /dev/null
@@ -1,346 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This file incorporates work covered by the following license notice:
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed
-# with this work for additional information regarding copyright
-# ownership. The ASF licenses this file to you under the Apache
-# License, Version 2.0 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.apache.org/licenses/LICENSE-2.0 .
-#
-
-
-# Overview of dependencies and tasks of SrsTarget
-#
-# target task depends on
-# SrsTarget joining the parts SrsPartTarget
-# SrsPartTarget preprocessing SrsPartMergeTarget (with l10n)
-# source file (without l10n)
-# SrsPartMergeTarget merging/transex source file (only needed with l10n)
-
-# Overview of dependencies and tasks of AllLangResTarget
-#
-# target task depends on
-# AllLangResTarget nothing ResTarget for all active langs
-# ResTarget running rsc SrsTarget, resources
-
-
-# SrsPartMergeTarget class
-
-gb_SrsPartMergeTarget_TRANSEXDEPS := $(call gb_Executable_get_runtime_dependencies,transex3)
-gb_SrsPartMergeTarget_TRANSEXCOMMAND = $(call gb_Executable_get_command,transex3)
-
-define gb_SrsPartMergeTarget__command
-MERGEINPUT=$(call var2file,$(shell $(gb_MKTEMP)),100,$(POFILES)) && \
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) && \
- $(gb_SrsPartMergeTarget_TRANSEXCOMMAND) \
- -i $(3) \
- -o $(1) \
- -m $${MERGEINPUT} \
- -l all \
- $(if $(filter MSC,$(COM)),$(if $(strip $(gb_WITH_LANG)),-b))) && \
-rm -rf $${MERGEINPUT}
-
-endef
-
-$(call gb_SrsPartMergeTarget_get_target,%) : $(SRCDIR)/% $(gb_Helper_MISCDUMMY) $(gb_SrsPartMergeTarget_TRANSEXDEPS)
- $(call gb_Output_announce,$*,$(true),SRS,1)
- $(if $(filter $(words $(POFILES)),$(words $(wildcard $(POFILES)))),\
- $(call gb_SrsPartMergeTarget__command,$@,$*,$<),\
- mkdir -p $(dir $@) && cp $< $@)
-
-# translations are optional - use "wildcard" to avoid spurious re-builds
-# when they don't exist
-define gb_SrsPartMergeTarget_SrsPartMergeTarget
-$(call gb_SrsPartMergeTarget__SrsPartMergeTarget_impl,$(1),$(wildcard $(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(patsubst %/,%,$(dir $(1))).po)))
-endef
-
-define gb_SrsPartMergeTarget__SrsPartMergeTarget_impl
-$(call gb_SrsPartMergeTarget_get_target,$(1)) : POFILES := $(2)
-$(call gb_SrsPartMergeTarget_get_target,$(1)) : $(2)
-$(2) :
-endef
-
-# SrsPartTarget class
-
-# defined by platform
-# gb_SrsPartTarget__command_dep
-
-gb_ResTarget_RSCDEPS := $(call gb_Executable_get_runtime_dependencies,rsc)
-gb_ResTarget_RSCCOMMAND = $(call gb_Executable_get_command,rsc)
-
-define gb_SrsPartTarget__command
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) && \
- RESPONSEFILE=`$(gb_MKTEMP)` && \
- echo "-s \
- $(INCLUDE) \
- -I$(dir $(3)) \
- $(DEFS) \
- -D__RSC \
- -fp=$(1) \
- $(if $(MERGEDFILE),$(MERGEDFILE),$<)" > $${RESPONSEFILE} && \
- $(gb_ResTarget_RSCCOMMAND) -presponse @$${RESPONSEFILE} && \
- rm -rf $${RESPONSEFILE})
-
-endef
-
-$(call gb_SrsPartTarget_get_target,%) : $(SRCDIR)/% $(gb_Helper_MISCDUMMY) \
- $(gb_ResTarget_RSCDEPS) $(gb_SrsPartTarget__command_target)
- $(call gb_SrsPartTarget__command_dep,$*,$<)
- $(call gb_SrsPartTarget__command,$@,$*,$<)
-
-ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_SrsPartTarget_get_dep_target,%) : $(SRCDIR)/% $(gb_Helper_MISCDUMMY)
- $(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $@))
-endif
-
-
-define gb_SrsPartTarget_SrsPartTarget
-ifeq ($(strip $(gb_WITH_LANG)),)
-$(call gb_SrsPartTarget_get_target,$(1)) : MERGEDFILE :=
-else
-$(call gb_SrsPartTarget_get_target,$(1)) : MERGEDFILE := $(call gb_SrsPartMergeTarget_get_target,$(1))
-$(call gb_SrsPartTarget_get_target,$(1)) : $(call gb_SrsPartMergeTarget_get_target,$(1))
-$(call gb_SrsPartMergeTarget_SrsPartMergeTarget,$(1))
-endif
-
-endef
-
-# SrsTarget class
-
-gb_SrsTarget_DEFAULTDEFS := $(gb_GLOBALDEFS)
-
-.PHONY : $(call gb_SrsTarget_get_clean_target,%)
-$(call gb_SrsTarget_get_clean_target,%) :
- $(call gb_Output_announce,$*,$(false),SRS,1)
- -$(call gb_Helper_abbreviate_dirs,\
- rm -f $(call gb_SrsTarget_get_target,$*) \
- $(call gb_SrsTarget_get_dep_target,$*) \
- $(foreach part,$(PARTS),$(call gb_SrsPartTarget_get_target,$(part))) \
- $(foreach part,$(PARTS),$(call gb_SrsPartTarget_get_dep_target,$(part))) \
- $(foreach part,$(PARTS),$(call gb_SrsPartMergeTarget_get_target,$(part))))
-
-ifeq ($(gb_FULLDEPS),$(true))
-define gb_SrsTarget__command_dep
-$(call gb_Output_announce,SRS:$(2),$(true),DEP,1)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) && \
- RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),200,\
- $(foreach part,$(PARTS),$(call gb_SrsPartTarget_get_dep_target,$(part)))) && \
- $(call gb_Executable_get_command,concat-deps) $${RESPONSEFILE} > $(1)) && \
- rm -f $${RESPONSEFILE}
-endef
-endif
-
-$(call gb_SrsTarget_get_headers_target,%) :
- $(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $@) && touch $@)
-
-# This recipe actually also builds the dep-target as a side-effect, which
-# is an optimization to reduce incremental build time.
-$(call gb_SrsTarget_get_target,%) :
-ifeq ($(gb_FULLDEPS),$(true))
- $(call gb_SrsTarget__command_dep,$(call gb_SrsTarget_get_dep_target,$*),$*)
-endif
- $(call gb_Output_announce,$*,$(true),SRS,1)
- $(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $@) && \
- cat $^ > $@)
-
-ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_SrsTarget_get_dep_target,%) : \
- $(call gb_Executable_get_runtime_dependencies,concat-deps)
- $(call gb_SrsTarget__command_dep,$@,$*)
-endif
-
-define gb_SrsTarget_SrsTarget
-$(call gb_SrsTarget_get_target,$(1)) : DEFS := $(gb_SrsTarget_DEFAULTDEFS)
-$(call gb_SrsTarget_get_target,$(1)) : INCLUDE := $(SOLARINC)
-$(call gb_SrsTarget_get_clean_target,$(1)) : PARTS :=
-$(call gb_SrsTarget_get_target,$(1)) : PARTS :=
-ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_SrsTarget_get_dep_target,$(1)) : PARTS :=
--include $(call gb_SrsTarget_get_dep_target,$(1))
-endif
-
-endef
-
-define gb_SrsTarget_set_defs
-$(call gb_SrsTarget_get_target,$(1)) : DEFS := $(2)
-ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_SrsTarget_get_dep_target,$(1)) : DEFS := $(2)
-endif
-
-endef
-
-define gb_SrsTarget_set_include
-$(call gb_SrsTarget_get_target,$(1)) : INCLUDE := $(2)
-ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_SrsTarget_get_dep_target,$(1)) : INCLUDE := $(2)
-endif
-
-endef
-
-define gb_SrsTarget__add_file
-ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_SrsTarget_get_dep_target,$(1)) : $(call gb_SrsPartTarget_get_dep_target,$(2))
-endif
-$(call gb_SrsPartTarget_SrsPartTarget,$(2))
-$(call gb_SrsTarget_get_target,$(1)) : $(call gb_SrsPartTarget_get_target,$(2))
-$(call gb_SrsPartTarget_get_target,$(2)) :| $(call gb_SrsTarget_get_headers_target,$(1))
-$(call gb_SrsTarget_get_clean_target,$(1)) : PARTS += $(2)
-$(call gb_SrsTarget_get_target,$(1)) : PARTS += $(2)
-ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_SrsTarget_get_dep_target,$(1)) : PARTS += $(2)
-endif
-
-endef
-
-define gb_SrsTarget_add_file
-$(call gb_SrsTarget__add_file,$(1),$(2))
-
-endef
-
-define gb_SrsTarget_add_files
-$(foreach file,$(2),$(call gb_SrsTarget_add_file,$(1),$(file)))
-
-endef
-
-# ResTarget
-
-gb_ResTarget_DEFIMAGESLOCATION := $(SRCDIR)/icon-themes/galaxy/
-
-$(call gb_ResTarget_get_clean_target,%) :
- $(call gb_Output_announce,$*,$(false),RES,2)
- $(call gb_Helper_abbreviate_dirs,\
- rm -f \
- $(call gb_ResTarget_get_target,$*) \
- $(call gb_ResTarget_get_install_target,$*))
-
-$(call gb_ResTarget_get_target,%) : $(gb_Helper_MISCDUMMY) \
- $(gb_ResTarget_RSCDEPS)
- $(call gb_Output_announce,$*,$(true),RES,2)
- $(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $@) && \
- RESPONSEFILE=`$(gb_MKTEMP)` && \
- echo "-r -p \
- -lg$(LANGUAGE) \
- -fs=$@ \
- -lip=$(gb_ResTarget_DEFIMAGESLOCATION)$(RESLOCATION)/$(LIBRARY) \
- -lip=$(gb_ResTarget_DEFIMAGESLOCATION)$(RESLOCATION)/res/$(LANGUAGE) \
- -lip=$(gb_ResTarget_DEFIMAGESLOCATION)$(RESLOCATION)/res \
- -lip=$(gb_ResTarget_DEFIMAGESLOCATION)$(RESLOCATION) \
- -lip=$(gb_ResTarget_DEFIMAGESLOCATION)res/$(LANGUAGE) \
- -lip=$(gb_ResTarget_DEFIMAGESLOCATION)res \
- -subMODULE=$(gb_ResTarget_DEFIMAGESLOCATION) \
- -subGLOBALRES=$(gb_ResTarget_DEFIMAGESLOCATION)res \
- $(filter-out $(gb_Helper_MISCDUMMY) $(gb_ResTarget_RSCDEPS),$^)" \
- > $${RESPONSEFILE} && \
- $(gb_ResTarget_RSCCOMMAND) @$${RESPONSEFILE} && \
- rm -f $${RESPONSEFILE})
-
-#$(info $(call gb_ResTarget_get_target,$(1)))
-define gb_ResTarget_ResTarget
-$(call gb_ResTarget_get_target,$(1)) : LIBRARY = $(2)
-$(call gb_ResTarget_get_target,$(1)) : LANGUAGE = $(3)
-$(call gb_ResTarget_get_target,$(1)) : RESLOCATION = $(2)
-$(call gb_AllLangResTarget_get_clean_target,$(2)) : $(call gb_ResTarget_get_clean_target,$(1))
-
-endef
-
-define gb_ResTarget_add_file
-$(call gb_ResTarget_get_target,$(1)) : $(2)
-
-endef
-
-define gb_ResTarget_add_one_srs
-$(call gb_ResTarget_add_file,$(1),$(call gb_SrsTarget_get_target,$(2)))
-$(call gb_ResTarget_get_clean_target,$(1)) : $(call gb_SrsTarget_get_clean_target,$(2))
-
-endef
-
-define gb_ResTarget_add_files
-$(foreach file,$(2),\
- $(call gb_ResTarget_add_file,$(1),$(file)))
-
-endef
-
-define gb_ResTarget_add_srs
-$(foreach srs,$(2),\
- $(call gb_ResTarget_add_one_srs,$(1),$(srs)))
-
-endef
-
-define gb_ResTarget_set_reslocation
-$(call gb_ResTarget_get_target,$(1)) : RESLOCATION = $(2)
-
-endef
-
-
-# AllLangResTarget
-
-gb_AllLangResTarget_LANGS := en-US $(filter-out en-US,$(gb_WITH_LANG))
-
-define gb_AllLangResTarget_set_langs
-gb_AllLangResTarget_LANGS := $(1)
-endef
-
-$(call gb_AllLangResTarget_get_clean_target,%) :
- $(call gb_Helper_abbreviate_dirs,\
- rm -f $(call gb_AllLangResTarget_get_target,$*))
-
-$(call gb_AllLangResTarget_get_target,%) :
- $(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $@) && touch $@)
-
-gb_ResTarget_get_install_target = $(INSTROOT)/$(LIBO_SHARE_RESOURCE_FOLDER)/$(1).res
-
-define gb_AllLangResTarget_AllLangResTarget
-ifeq (,$$(filter $(1),$$(gb_AllLangResTarget_REGISTERED)))
-$$(eval $$(call gb_Output_info,Currently known AllLangResTargets are: $(sort $(gb_AllLangResTarget_REGISTERED)),ALL))
-$$(eval $$(call gb_Output_error,AllLangResTarget $(1) must be registered in Repository.mk))
-endif
-$(foreach lang,$(gb_AllLangResTarget_LANGS),\
- $(call gb_ResTarget_ResTarget,$(1)$(lang),$(1),$(lang)))
-
-$(foreach lang,$(gb_AllLangResTarget_LANGS),\
-$(call gb_Helper_install,$(call gb_AllLangResTarget_get_target,$(1)), \
- $(call gb_ResTarget_get_install_target,$(1)$(lang)), \
- $(call gb_ResTarget_get_target,$(1)$(lang))))
-
-$$(eval $$(call gb_Module_register_target,$(call gb_AllLangResTarget_get_target,$(1)),$(call gb_AllLangResTarget_get_clean_target,$(1))))
-$(call gb_Helper_make_userfriendly_targets,$(1),AllLangResTarget)
-$(call gb_Postprocess_register_target,AllResources,AllLangResTarget,$(1))
-
-endef
-
-define gb_AllLangResTarget_add_one_srs
-$(foreach lang,$(gb_AllLangResTarget_LANGS),\
- $(call gb_ResTarget_add_one_srs,$(1)$(lang),$(2)))
-
-endef
-
-define gb_AllLangResTarget_add_srs
-$(foreach srs,$(2),\
- $(call gb_AllLangResTarget_add_one_srs,$(1),$(srs)))
-
-endef
-
-define gb_AllLangResTarget_set_reslocation
-$(foreach lang,$(gb_AllLangResTarget_LANGS),\
- $(call gb_ResTarget_set_reslocation,$(1)$(lang),$(2)))
-
-endef
-
-# vim: set noet sw=4:
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 5883ead35a9b..cc6a70d1b5e1 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -77,6 +77,7 @@ define gb_CppunitTest__make_args
$(HEADLESS) \
"-env:BRAND_BASE_DIR=$(call gb_Helper_make_url,$(INSTROOT))" \
"-env:BRAND_SHARE_SUBDIR=$(LIBO_SHARE_FOLDER)" \
+"-env:BRAND_SHARE_RESOURCE_SUBDIR=$(LIBO_SHARE_RESOURCE_FOLDER)" \
"-env:UserInstallation=$(call gb_Helper_make_url,$(call gb_CppunitTest_get_target,$*).user)" \
$(if $(URE),\
$(if $(strip $(CONFIGURATION_LAYERS)),\
diff --git a/solenv/gbuild/Helper.mk b/solenv/gbuild/Helper.mk
index 0d45f071826e..688f5963a1f5 100644
--- a/solenv/gbuild/Helper.mk
+++ b/solenv/gbuild/Helper.mk
@@ -257,9 +257,8 @@ gb_Package_MODULE_$(1) += $(2)
endef
-# TODO: this should be extended to handle auto-installation.
-define gb_Helper_register_resources
-gb_AllLangResTarget_REGISTERED += $(1)
+define gb_Helper_register_mos
+gb_AllLangMoTarget_REGISTERED += $(1)
endef
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index 9f94b8d6fcad..a38e163db7ea 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -217,7 +217,6 @@ $(eval $(foreach method,\
use_package \
use_packages \
use_unpacked \
- use_restarget \
add_sdi_headers \
set_precompiled_header \
export_objects_list \
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 23d0999112af..d75b7fe1e355 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -978,7 +978,6 @@ gb_BUILD_HELPER_LIBS := basegfx \
# tools libmerged depends on, so they link against gb_BUILD_HELPER_LIBS
gb_BUILD_HELPER_TOOLS := $(foreach exe,\
cppumaker \
- rsc \
svidl \
unoidl-check \
unoidl-write \
@@ -1494,16 +1493,6 @@ $(call gb_LinkTarget_get_headers_target,$(1)) :| \
endef
-# Delay linking until a res target has been built. This is needed so that
-# unit tests using libraries do not fail if the res target is not yet built.
-#
-# call gb_LinkTarget_use_restarget,linktarget,restarget(s)
-define gb_LinkTarget_use_restarget
-$(call gb_LinkTarget_get_target,$(1)) :| \
- $(foreach res,$(2),$(call gb_AllLangResTarget_get_target,$(res)))
-
-endef
-
# this forwards to functions that must be defined in RepositoryExternal.mk.
# Automatically forward for libmerged library too when linktarget is merged.
#
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index 4073dcfd9bf5..bd1873544f91 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -228,8 +228,7 @@ showmodules :
translations : $(WORKDIR)/pot.done
-$(WORKDIR)/pot.done : $(foreach exec,cfgex helpex localize transex3 \
- propex uiex ulfex xrmex treex, \
+$(WORKDIR)/pot.done : $(foreach exec,cfgex helpex localize propex ulfex xrmex treex, \
$(call gb_Executable_get_target_for_build,$(exec)))
$(call gb_Output_announce,$(subst .pot,,$(subst $(WORKDIR)/,,$@)),$(true),POT,1)
$(call gb_Helper_abbreviate_dirs,\
@@ -292,7 +291,7 @@ endif
endef
define gb_Module_add_target
-$(if $(filter AllLang% Dictionary% UIConfig% Package_registry,$(2)),$(warning target $(2) should be a l10n target))
+$(if $(filter AllLang% Dictionary% Package_registry,$(2)),$(warning target $(2) should be a l10n target))
$(call gb_Module__read_targetfile,$(1),$(2),target)
$(call gb_Module_get_nonl10n_target,$(1)) : $$(gb_Module_CURRENTTARGET)
@@ -301,7 +300,7 @@ $(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET)
endef
define gb_Module_add_l10n_target
-$(if $(filter AllLang% CustomTarget_autotextshare Dictionary% UIConfig% Package_registry,$(2)),,$(warning target $(2) should not be a l10n target))
+$(if $(filter AllLang% CustomTarget_autotextshare Dictionary% Package_registry,$(2)),,$(warning target $(2) should not be a l10n target))
$(call gb_Module__read_targetfile,$(1),$(2),target)
$(call gb_Module_get_l10n_target,$(1)) : $$(gb_Module_CURRENTTARGET)
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index 8ec6c4610ca3..4518b00b5d69 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -35,7 +35,7 @@ gb_UnoApi_get_target = $(INSTROOT)/$(if $(filter udkapi,$(1)),$(LIBO_URE_MISC_FO
gb_AutoInstall_get_target = $(WORKDIR)/AutoInstall/$(1)
gb_AllLangHelp_get_target = $(WORKDIR)/AllLangHelp/$(1)
gb_AllLangPackage_get_target = $(WORKDIR)/AllLangPackage/$(1)
-gb_AllLangResTarget_get_target = $(WORKDIR)/AllLangRes/$(1)
+gb_AllLangMoTarget_get_target = $(WORKDIR)/AllLangMo/$(1)
gb_AsmObject_get_target = $(WORKDIR)/AsmObject/$(1).o
gb_CObject_get_target = $(WORKDIR)/CObject/$(1).o
gb_GenCObject_get_target = $(WORKDIR)/GenCObject/$(1).o
@@ -145,6 +145,7 @@ gb_Pyuno_get_target = $(WORKDIR)/Pyuno/$(1).done
gb_Rdb_get_target = $(WORKDIR)/Rdb/$(1).rdb
gb_Rdb_get_target_for_build = $(WORKDIR_FOR_BUILD)/Rdb/$(1).rdb
gb_ResTarget_get_target = $(WORKDIR)/ResTarget/$(1).res
+gb_MoTarget_get_target = $(WORKDIR)/MoTarget/$(1).mo
gb_ScpMergeTarget_get_target = $(WORKDIR)/ScpMergeTarget/$(1).ulf
gb_ScpPreprocessTarget_get_target = $(WORKDIR)/ScpPreprocessTarget/$(1).pre
gb_ScpTarget_get_external_target = $(WORKDIR)/ScpTarget/$(1).external
@@ -160,8 +161,6 @@ gb_ThesaurusIndexTarget_get_target = $(WORKDIR)/ThesaurusIndexTarget/$(basename
gb_UIConfig_get_imagelist_target = $(WORKDIR)/UIConfig/$(1).ilst
gb_UIConfig_get_target = $(WORKDIR)/UIConfig/$(1).done
gb_UIImageListTarget_get_target = $(WORKDIR)/UIImageListTarget/$(1).ilst
-gb_UILocalizeTarget_get_target = $(WORKDIR)/UILocalizeTarget/$(1).done
-gb_UILocalizeTarget_get_workdir = $(WORKDIR)/UILocalizeTarget/$(1)
gb_UIMenubarTarget_get_target = $(WORKDIR)/UIMenubarTarget/$(1).xml
gb_UITest_get_target = $(WORKDIR)/UITest/$(1)/done
gb_UnoApiTarget_get_target = $(WORKDIR)/UnoApiTarget/$(1).rdb
@@ -227,7 +226,7 @@ $(eval $(call gb_Helper_make_clean_targets,\
AutoInstall \
AllLangHelp \
AllLangPackage \
- AllLangResTarget \
+ AllLangMoTarget \
CliAssembly \
CliAssemblyTarget \
CliConfigTarget \
@@ -287,7 +286,6 @@ $(eval $(call gb_Helper_make_clean_targets,\
ExternalProject \
UIConfig \
UIImageListTarget \
- UILocalizeTarget \
UIMenubarTarget \
UITest \
UnoApi \
diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index 55446a31851d..01bfdbaea5b6 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -7,76 +7,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-# class UILocalizeTarget
-
-# Produces translations for one .ui file.
-
-gb_UILocalizeTarget_WORKDIR := $(WORKDIR)/UILocalizeTarget
-
-gb_UILocalizeTarget_DEPS := $(call gb_Executable_get_runtime_dependencies,uiex)
-gb_UILocalizeTarget_COMMAND := $(call gb_Executable_get_command,uiex)
-
-# If translatable strings from a .ui file are not merged into the
-# respective .po file yet, the produced translated files are empty,
-# which breaks delivery. This hack avoids the problem by creating a
-# dummy translation file.
-$(call gb_UILocalizeTarget_get_workdir,%).ui :
- $(if $(wildcard $@) \
- ,touch $@ \
- ,echo '<?xml version="1.0"?><t></t>' > $@ \
- )
-
-define gb_UILocalizeTarget__command
-$(call gb_Output_announce,$(2),$(true),UIX,1)
-MERGEINPUT=$(call var2file,$(shell $(gb_MKTEMP)),100,$(POFILES)) && \
-$(call gb_Helper_abbreviate_dirs,\
- $(gb_UILocalizeTarget_COMMAND) \
- -i $(UIConfig_FILE) \
- -o $(call gb_UILocalizeTarget_get_workdir,$(2)) \
- -l all \
- -m $${MERGEINPUT} \
- && touch $(1) \
-) && \
-rm -rf $${MERGEINPUT}
-endef
-
-$(dir $(call gb_UILocalizeTarget_get_target,%)).dir :
- $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
-
-$(dir $(call gb_UILocalizeTarget_get_target,%))%/.dir :
- $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
-
-$(call gb_UILocalizeTarget_get_target,%) : $(gb_UILocalizeTarget_DEPS)
- $(call gb_UILocalizeTarget__command,$@,$*)
-
-.PHONY : $(call gb_UILocalizeTarget_get_clean_target,%)
-$(call gb_UILocalizeTarget_get_clean_target,%) :
- $(call gb_Output_announce,$*,$(false),UIX,1)
- $(call gb_Helper_abbreviate_dirs,\
- rm -rf $(call gb_UILocalizeTarget_get_target,$*) $(call gb_UILocalizeTarget_get_workdir,$*) \
- )
-
-# Produce translations for one .ui file
-#
-# gb_UILocalizeTarget_UILocalizeTarget target
-define gb_UILocalizeTarget_UILocalizeTarget
-$(call gb_UILocalizeTarget__UILocalizeTarget_impl,$(1),$(2),$(wildcard $(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(patsubst %/,%,$(dir $(2))).po)))
-
-endef
-
-# gb_UILocalizeTarget__UILocalizeTarget_impl target pofiles
-define gb_UILocalizeTarget__UILocalizeTarget_impl
-$(call gb_UILocalizeTarget_get_target,$(1)) : POFILES := $(3)
-$(call gb_UILocalizeTarget_get_target,$(1)) : UIConfig_FILE := $(SRCDIR)/$(2).ui
-
-$(call gb_UILocalizeTarget_get_target,$(1)) : $(3)
-$(call gb_UILocalizeTarget_get_target,$(1)) : $(SRCDIR)/$(2).ui
-$(call gb_UILocalizeTarget_get_target,$(1)) :| \
- $(dir $(call gb_UILocalizeTarget_get_target,$(1))).dir \
- $(call gb_UILocalizeTarget_get_workdir,$(1))/.dir
-
-endef
-
# class UIMenubarTarget
# Handles platform-specific processing of menubar config files.
@@ -162,13 +92,8 @@ endef
#
# This class provides the following filelists:
# * UIConfig/<name> containing all nontranslatable files
-# * UIConfig/<name>_<lang> for each active lang, containing translations
-# of .ui files. This filelist only exists if the UIConfig contains any
-# .ui files.
gb_UIConfig_INSTDIR := $(LIBO_SHARE_FOLDER)/config/soffice.cfg
-# en-US is the default, so there is no translation for it
-gb_UIConfig_LANGS := $(filter-out en-US,$(gb_WITH_LANG))
$(dir $(call gb_UIConfig_get_target,%)).dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
@@ -194,7 +119,6 @@ $(call gb_UIConfig_get_clean_target,%) :
gb_UIConfig_get_packagename = UIConfig/$(1)
gb_UIConfig_get_packagesetname = UIConfig/$(1)
-gb_UIConfig_get_zipname_for_lang = UIConfig/$(1)/$(2)
# Processes and delivers a set of UI configuration files.
#
@@ -217,26 +141,12 @@ $(call gb_UIConfig_get_imagelist_target,$(1)) :| $(dir $(call gb_UIConfig_get_im
$(call gb_UIConfig_get_target,$(1)) : $(call gb_PackageSet_get_target,$(call gb_UIConfig_get_packagesetname,$(1)))
$(call gb_UIConfig_get_clean_target,$(1)) : $(call gb_PackageSet_get_clean_target,$(call gb_UIConfig_get_packagesetname,$(1)))
-ifneq ($(gb_UIConfig_LANGS),)
-$(foreach lang,$(gb_UIConfig_LANGS),$(call gb_UIConfig__UIConfig_for_lang,$(1),$(lang)))
-endif
-
$$(eval $$(call gb_Module_register_target,$(call gb_UIConfig_get_target,$(1)),$(call gb_UIConfig_get_clean_target,$(1))))
$(call gb_Helper_make_userfriendly_targets,$(1),UIConfig)
$(call gb_Postprocess_register_target,AllUIConfigs,UIConfig,$(1))
endef
-define gb_UIConfig__UIConfig_for_lang
-$(call gb_UIConfig_get_target,$(1)) : $(call gb_Zip_get_target,$(call gb_UIConfig_get_zipname_for_lang,$(1),$(2)))
-$(call gb_UIConfig_get_clean_target,$(1)) : $(call gb_Zip_get_clean_target,$(call gb_UIConfig_get_zipname_for_lang,$(1),$(2)))
-$(call gb_Zip_Zip_internal,$(call gb_UIConfig_get_zipname_for_lang,$(1),$(2)),$(gb_UILocalizeTarget_WORKDIR)/$(1))
-$(call gb_Zip_add_commandoptions,$(call gb_UIConfig_get_zipname_for_lang,$(1),$(2)),--suffixes .ui)
-$(call gb_Zip_get_target,$(call gb_UIConfig_get_zipname_for_lang,$(1),$(2))) : $(SRCDIR)/solenv/gbuild/UIConfig.mk
-$(call gb_Zip_set_install_name,$(call gb_UIConfig_get_zipname_for_lang,$(1),$(2)),$(INSTROOT)/$(gb_UIConfig_INSTDIR)/$(1)/ui/res/$(2).zip)
-
-endef
-
# gb_UIConfig__package_file target package type destfile srcfile
define gb_UIConfig__package_file
$(call gb_Package_add_file,$(2),$(gb_UIConfig_INSTDIR)/$(1)/$(3)/$(4),$(5))
@@ -260,56 +170,6 @@ $(call gb_UIConfig_get_clean_target,$(1)) : $(call gb_UIImageListTarget_get_clea
endef
-# Add a l10n for an .ui file to respective lang package.
-#
-# gb_UIConfig__add_uifile_for_lang target file lang
-define gb_UIConfig__add_uifile_for_lang
-$(call gb_Zip_add_file,$(call gb_UIConfig_get_zipname_for_lang,$(1),$(3)),$(notdir $(2))/$(3).ui)
-$(call gb_Zip_add_dependency,$(call gb_UIConfig_get_zipname_for_lang,$(1),$(3)),$(call gb_UILocalizeTarget_get_target,$(1)/$(notdir $(2))))
-
-endef
-
-# Add a l10n for an .ui file to respective lang package.
-#
-# This is only for "real" languages, i.e., everything except qtz.
-#
-# gb_UIConfig__add_uifile_for_real_lang target file lang
-define gb_UIConfig__add_uifile_for_real_lang
-$(if $(filter qtz,$(3)),$(call gb_Output_error,gb_UIConfig__add_uifile_for_real_lang called with qtz))
-$(call gb_UIConfig__add_uifile_for_lang,$(1),$(2),$(3))
-
-endef
-
-# gb_UIConfig__add_translations_impl target uifile langs
-define gb_UIConfig__add_translations_impl
-$(call gb_UILocalizeTarget_UILocalizeTarget,$(1)/$(notdir $(2)),$(2))
-$(call gb_UIConfig_get_target,$(1)) : $(call gb_UILocalizeTarget_get_target,$(1)/$(notdir $(2)))
-$(call gb_UIConfig_get_clean_target,$(1)) : $(call gb_UILocalizeTarget_get_clean_target,$(1)/$(notdir $(2)))
-$(foreach lang,$(3),$(call gb_UIConfig__add_uifile_for_real_lang,$(1),$(2),$(lang)))
-
-endef
-
-# gb_UIConfig__add_translations target uifile langs qtz
-define gb_UIConfig__add_translations
-$(if $(strip $(3) $(4)),$(call gb_UIConfig__add_translations_impl,$(1),$(2),$(3)))
-$(if $(strip $(4)),$(call gb_UIConfig__add_uifile_for_lang,$(1),$(2),$(strip $(4))))
-
-endef
-
-# Adds translations for languages that have corresponding .po file
-#
-# gb_UIConfig__add_uifile_translations target uifile
-define gb_UIConfig__add_uifile_translations
-$(call gb_UIConfig__add_translations,$(1),$(2),\
- $(foreach lang,$(gb_UIConfig_LANGS),\
- $(if $(wildcard $(gb_POLOCATION)/$(lang)/$(patsubst %/,%,$(dir $(2))).po),$(lang)) \
- ),\
- $(filter qtz,$(gb_UIConfig_LANGS)) \
-)
-
-endef
-
-
gb_UIConfig_ALLFILES:=
# Adds .ui file to the package
#
@@ -320,10 +180,6 @@ define gb_UIConfig_add_uifile
gb_UIConfig_ALLFILES+=$(1):$(notdir $(2))
$(call gb_UIConfig__add_uifile,$(1),$(2))
-ifneq ($(gb_UIConfig_LANGS),)
-$(call gb_UIConfig__add_uifile_translations,$(1),$(2))
-endif
-
endef
# Adds multiple .ui files to the package
diff --git a/solenv/gbuild/extensions/post_GbuildToJson.mk b/solenv/gbuild/extensions/post_GbuildToJson.mk
index 29bdf8d78f8c..e2da5726479d 100644
--- a/solenv/gbuild/extensions/post_GbuildToJson.mk
+++ b/solenv/gbuild/extensions/post_GbuildToJson.mk
@@ -146,7 +146,6 @@ gb_WinResTarget_add_defs =
gb_LinkTarget_set_nativeres =
gb_LinkTarget_add_nativeres =
gb_Library_set_componentfile =
-gb_LinkTarget_use_restarget =
#$(call gb_Library_get_exports_target,%):
$(WORKDIR)/LinkTarget/Library/%.exports:
diff --git a/solenv/gbuild/extensions/post_PackageInfo.mk b/solenv/gbuild/extensions/post_PackageInfo.mk
index 1b05e9cc6a74..09d596ec2955 100644
--- a/solenv/gbuild/extensions/post_PackageInfo.mk
+++ b/solenv/gbuild/extensions/post_PackageInfo.mk
@@ -59,6 +59,11 @@ define gb_PackageInfo_emit_l10n_for_one_resource
endef
+define gb_PackageInfo_emit_l10n_for_one_mo
+@echo "$(patsubst $(INSTDIR)/%,%,$(call gb_MoTarget_get_install_target,$(1)$(2)))" >> $(gb_PackageInfo_get_target)/l10n-$(2).files
+
+endef
+
define gb_PackageInfo_emit_l10n_for_one_uizip
@echo "$(gb_UIConfig_INSTDIR)/$(2)/ui/res/$(1).zip" >> $(gb_PackageInfo_get_target)/l10n-$(1).files
@@ -72,7 +77,7 @@ endef
define gb_PackageInfo_emit_l10n_for_one_lang
@touch $(foreach suf,executables libraries files,$(gb_PackageInfo_get_target)/l10n-$(1).$(suf))
$(if $(filter-out qtz en-US,$(1)),$(foreach packagedir,$(patsubst %/,%,$(gb_AllLangPackage_ALLDIRS)),$(call gb_PackageInfo_emit_l10n_for_one_alllangpackage,$(packagedir),$(1))))
-$(if $(filter $(gb_AllLangResTarget_LANGS),$(1)),$(foreach target,$(gb_AllLangResTarget_REGISTERED),$(call gb_PackageInfo_emit_l10n_for_one_resource,$(target),$(1))))
+$(if $(filter $(gb_AllLangMoTarget_LANGS),$(1)),$(foreach target,$(gb_AllLangMoTarget_REGISTERED),$(call gb_PackageInfo_emit_l10n_for_one_mo,$(target),$(1))))
$(foreach uizip,\
$(sort $(foreach uifile,$(gb_UIConfig_ALLFILES),$(firstword $(subst :,$(WHITESPACE),$(uifile))))),\
$(call gb_PackageInfo_emit_l10n_for_one_uizip,$(1),$(uizip)))
diff --git a/solenv/gbuild/extensions/pre_BuildTools.mk b/solenv/gbuild/extensions/pre_BuildTools.mk
index 5daf671e082b..9e5b8df11814 100644
--- a/solenv/gbuild/extensions/pre_BuildTools.mk
+++ b/solenv/gbuild/extensions/pre_BuildTools.mk
@@ -24,12 +24,9 @@ gb_BUILD_TOOLS = \
javamaker \
makedepend \
propex \
- rsc \
saxparser \
svidl \
- transex3 \
treex \
- uiex \
ulfex \
unoidl-check \
unoidl-write \
diff --git a/solenv/gbuild/gbuild.help.txt b/solenv/gbuild/gbuild.help.txt
index 0b11b3698a2e..51094b42ae50 100644
--- a/solenv/gbuild/gbuild.help.txt
+++ b/solenv/gbuild/gbuild.help.txt
@@ -65,7 +65,7 @@ AVAILABLE TARGETS
CppunitTest_sw_macros_test)
<target>.clean clean gbuild target
<class>_<target> for all targets and for the following classes:
- o AllLangResTarget
+ o AllLangMoTarget
o AllLangZip
o CliLibrary
o CliNativeLibrary
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 31183b012ac4..b29b15e82d8b 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -266,7 +266,7 @@ $(eval $(call gb_Deliver_init))
include $(foreach class, \
ComponentTarget \
Postprocess \
- AllLangResTarget \
+ AllLangMoTarget \
WinResTarget \
LinkTarget \
Library \
diff --git a/solenv/qa/python/gbuildtojson.py b/solenv/qa/python/gbuildtojson.py
index 8866c52c4e05..98c49ebb8d70 100644
--- a/solenv/qa/python/gbuildtojson.py
+++ b/solenv/qa/python/gbuildtojson.py
@@ -123,7 +123,7 @@ class CheckGbuildToJsonModules(unittest.TestCase):
shutil.rmtree(self.tempwork)
def test_gbuildtojson(self):
- modules = ['accessibility', 'android', 'animations', 'apple_remote', 'avmedia', 'basctl', 'basegfx', 'basic', 'bean', 'canvas', 'chart2', 'codemaker', 'comphelper', 'cppcanvas', 'cui', 'dbaccess', 'desktop', 'drawinglayer', 'dtrans', 'editeng', 'embeddedobj', 'embedserv', 'eventattacher', 'extras', 'filter', 'forms', 'formula', 'fpicker', 'framework', 'hwpfilter', 'i18nlangtag', 'i18nutil', 'idl', 'idlc', 'instsetoo_native', 'io', 'ios', 'jvmaccess', 'jvmfwk', 'l10ntools', 'librelogo', 'libreofficekit', 'linguistic', 'lotuswordpro', 'mysqlc', 'nlpsolver', 'o3tl', 'offapi', 'officecfg', 'onlineupdate', 'oovbaapi', 'oox', 'opencl', 'package', 'postprocess', 'pyuno', 'registry', 'remotebridges', 'reportbuilder', 'reportdesign', 'ridljar', 'rsc', 'salhelper', 'sax', 'sc', 'sccomp', 'scp2', 'scripting', 'sd', 'sdext', 'setup_native', 'sfx2', 'slideshow', 'smoketest', 'soltools', 'sot', 'starmath', 'store', 'svgio', 'emfio', 'svl', 'svtools', 'svx', 'sw', 'swext', 'sysui', 'test', 'testtools', 'toolkit', 'ucb', 'ucbhelper', 'udkapi', 'uitest', 'UnoControls', 'unodevtools', 'unoidl', 'unoil', 'unotest', 'unotools', 'unoxml', 'ure', 'uui', 'vbahelper', 'vcl', 'winaccessibility', 'wizards', 'writerperfect', 'xmerge', 'xmlhelp', 'xmloff', 'xmlreader', 'xmlscript', 'xmlsecurity']
+ modules = ['accessibility', 'android', 'animations', 'apple_remote', 'avmedia', 'basctl', 'basegfx', 'basic', 'bean', 'canvas', 'chart2', 'codemaker', 'comphelper', 'cppcanvas', 'cui', 'dbaccess', 'desktop', 'drawinglayer', 'dtrans', 'editeng', 'embeddedobj', 'embedserv', 'eventattacher', 'extras', 'filter', 'forms', 'formula', 'fpicker', 'framework', 'hwpfilter', 'i18nlangtag', 'i18nutil', 'idl', 'idlc', 'instsetoo_native', 'io', 'ios', 'jvmaccess', 'jvmfwk', 'l10ntools', 'librelogo', 'libreofficekit', 'linguistic', 'lotuswordpro', 'mysqlc', 'nlpsolver', 'o3tl', 'offapi', 'officecfg', 'onlineupdate', 'oovbaapi', 'oox', 'opencl', 'package', 'postprocess', 'pyuno', 'registry', 'remotebridges', 'reportbuilder', 'reportdesign', 'ridljar', 'salhelper', 'sax', 'sc', 'sccomp', 'scp2', 'scripting', 'sd', 'sdext', 'setup_native', 'sfx2', 'slideshow', 'smoketest', 'soltools', 'sot', 'starmath', 'store', 'svgio', 'emfio', 'svl', 'svtools', 'svx', 'sw', 'swext', 'sysui', 'test', 'testtools', 'toolkit', 'ucb', 'ucbhelper', 'udkapi', 'uitest', 'UnoControls', 'unodevtools', 'unoidl', 'unoil', 'unotest', 'unotools', 'unoxml', 'ure', 'uui', 'vbahelper', 'vcl', 'winaccessibility', 'wizards', 'writerperfect', 'xmerge', 'xmlhelp', 'xmloff', 'xmlreader', 'xmlscript', 'xmlsecurity']
if os.environ['OS'] == 'WNT':
# for now, use a limited subset for testing on windows as it is so annoyingly slow on this
modules = ['chart2', 'cui', 'dbaccess', 'framework', 'oox', 'sfx2', 'svl', 'svtools', 'svx', 'toolkit', 'vcl', 'xmloff']