Hi, I have submitted a patch for review:
https://gerrit.libreoffice.org/3225 To pull it, you can do: git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/25/3225/1 rename UI to UIConfig I plan to use it to deliver all */uiconfig files, not just .ui, as a preliminary step to get rid of postprocess/packconfig. Change-Id: Ie7b4434b2f247165e3ab69a4d0c193418720a149 --- M Makefile.in M basctl/Module_basctl.mk R basctl/UIConfig_basicide.mk M chart2/Module_chart2.mk R chart2/UIConfig_chart2.mk M cui/Module_cui.mk R cui/UIConfig_cui.mk M dbaccess/Module_dbaccess.mk R dbaccess/UIConfig_dbaccess.mk M desktop/Module_desktop.mk R desktop/UIConfig_deployment.mk M filter/Module_filter.mk R filter/UIConfig_xsltdlg.mk M padmin/Module_padmin.mk R padmin/UIConfig_spa.mk M sc/Module_sc.mk R sc/UIConfig_scalc.mk M sd/Module_sd.mk R sd/UIConfig_sdraw.mk R sd/UIConfig_simpress.mk M sfx2/Module_sfx2.mk R sfx2/UIConfig_sfx.mk M solenv/gbuild/Postprocess.mk M solenv/gbuild/TargetLocations.mk D solenv/gbuild/UI.mk A solenv/gbuild/UIConfig.mk M solenv/gbuild/gbuild.mk M starmath/Module_starmath.mk R starmath/UIConfig_smath.mk M starmath/uiconfig/smath/menubar/menubar.xml M svtools/Module_svtools.mk R svtools/UIConfig_svt.mk M svx/Module_svx.mk R svx/UIConfig_svx.mk M sw/Module_sw.mk R sw/UIConfig_swriter.mk M tubes/Module_tubes.mk R tubes/UIConfig_tubes.mk M uui/Module_uui.mk R uui/UIConfig_uui.mk M vcl/Module_vcl.mk R vcl/UIConfig_vcl.mk M xmlsecurity/Module_xmlsecurity.mk R xmlsecurity/UIConfig_xmlsec.mk 44 files changed, 264 insertions(+), 261 deletions(-) diff --git a/Makefile.in b/Makefile.in index fd4cba6..56b3632 100644 --- a/Makefile.in +++ b/Makefile.in @@ -120,7 +120,7 @@ Pyuno \ Rdb \ StaticLibrary \ - UI \ + UIConfig \ UnoApi \ UnoApiMerge \ UnpackedTarball \ diff --git a/basctl/Module_basctl.mk b/basctl/Module_basctl.mk index 3542e2b..ddb86ab 100644 --- a/basctl/Module_basctl.mk +++ b/basctl/Module_basctl.mk @@ -39,7 +39,7 @@ $(eval $(call gb_Module_add_targets,basctl,\ Package_uiconfig \ - UI_basicide \ + UIConfig_basicide \ )) # vim: set noet sw=4 ts=4: diff --git a/basctl/UI_basicide.mk b/basctl/UIConfig_basicide.mk similarity index 78% rename from basctl/UI_basicide.mk rename to basctl/UIConfig_basicide.mk index a808d921..66dfb83 100644 --- a/basctl/UI_basicide.mk +++ b/basctl/UIConfig_basicide.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,modules/BasicIDE)) +$(eval $(call gb_UIConfig_UIConfig,modules/BasicIDE)) -$(eval $(call gb_UI_add_uifiles,modules/BasicIDE,\ +$(eval $(call gb_UIConfig_add_uifiles,modules/BasicIDE,\ basctl/uiconfig/basicide/ui/basicmacrodialog \ )) diff --git a/chart2/Module_chart2.mk b/chart2/Module_chart2.mk index 03fa54b..e8b8567 100644 --- a/chart2/Module_chart2.mk +++ b/chart2/Module_chart2.mk @@ -33,7 +33,7 @@ Library_chartcontroller \ Library_chartcore \ Package_uiconfig \ - UI_chart2 \ + UIConfig_chart2 \ )) $(eval $(call gb_Module_add_subsequentcheck_targets,chart2,\ diff --git a/chart2/UI_chart2.mk b/chart2/UIConfig_chart2.mk similarity index 78% rename from chart2/UI_chart2.mk rename to chart2/UIConfig_chart2.mk index e75f209..4c19d79 100644 --- a/chart2/UI_chart2.mk +++ b/chart2/UIConfig_chart2.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,modules/schart)) +$(eval $(call gb_UIConfig_UIConfig,modules/schart)) -$(eval $(call gb_UI_add_uifiles,modules/schart,\ +$(eval $(call gb_UIConfig_add_uifiles,modules/schart,\ chart2/uiconfig/ui/smoothlinesdlg \ )) diff --git a/cui/Module_cui.mk b/cui/Module_cui.mk index 895013e..12b3bee 100644 --- a/cui/Module_cui.mk +++ b/cui/Module_cui.mk @@ -30,7 +30,7 @@ $(eval $(call gb_Module_add_targets,cui,\ AllLangResTarget_cui \ Library_cui \ - UI_cui \ + UIConfig_cui \ )) # vim: set noet sw=4 ts=4: diff --git a/cui/UI_cui.mk b/cui/UIConfig_cui.mk similarity index 96% rename from cui/UI_cui.mk rename to cui/UIConfig_cui.mk index c5cf568..3fbdb23 100644 --- a/cui/UI_cui.mk +++ b/cui/UIConfig_cui.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,cui)) +$(eval $(call gb_UIConfig_UIConfig,cui)) -$(eval $(call gb_UI_add_uifiles,cui,\ +$(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/aboutdialog \ cui/uiconfig/ui/asiantypography \ cui/uiconfig/ui/backgroundpage \ diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk index 0e5fe13..598ec42 100644 --- a/dbaccess/Module_dbaccess.mk +++ b/dbaccess/Module_dbaccess.mk @@ -43,7 +43,7 @@ Library_sdbt \ Package_inc \ Package_uiconfig \ - UI_dbaccess \ + UIConfig_dbaccess \ )) $(eval $(call gb_Module_add_check_targets,dbaccess,\ diff --git a/dbaccess/UI_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk similarity index 83% rename from dbaccess/UI_dbaccess.mk rename to dbaccess/UIConfig_dbaccess.mk index 3468a40..eb97972 100644 --- a/dbaccess/UI_dbaccess.mk +++ b/dbaccess/UIConfig_dbaccess.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,dbaccess)) +$(eval $(call gb_UIConfig_UIConfig,dbaccess)) -$(eval $(call gb_UI_add_uifiles,dbaccess, \ +$(eval $(call gb_UIConfig_add_uifiles,dbaccess, \ dbaccess/uiconfig/ui/querypropertiesdialog \ dbaccess/uiconfig/ui/generalpagedialog \ dbaccess/uiconfig/ui/generalpagewizard \ diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk index 73bd229..a814604 100644 --- a/desktop/Module_desktop.mk +++ b/desktop/Module_desktop.mk @@ -38,7 +38,7 @@ Library_sofficeapp \ Library_spl \ Package_intro \ - UI_deployment \ + UIConfig_deployment \ Zip_brand \ Zip_brand_dev \ )) diff --git a/desktop/UI_deployment.mk b/desktop/UIConfig_deployment.mk similarity index 82% rename from desktop/UI_deployment.mk rename to desktop/UIConfig_deployment.mk index cf68089..f23136b 100644 --- a/desktop/UI_deployment.mk +++ b/desktop/UIConfig_deployment.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,desktop)) +$(eval $(call gb_UIConfig_UIConfig,desktop)) -$(eval $(call gb_UI_add_uifiles,desktop,\ +$(eval $(call gb_UIConfig_add_uifiles,desktop,\ desktop/uiconfig/ui/cmdlinehelp \ desktop/uiconfig/ui/extensionmanager \ )) diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk index b13407c..4f241d7 100644 --- a/filter/Module_filter.mk +++ b/filter/Module_filter.mk @@ -66,7 +66,7 @@ Package_inc \ Package_docbook \ Package_xslt \ - UI_xsltdlg \ + UIConfig_xsltdlg \ )) ifneq (,$(filter DESKTOP,$(BUILD_TYPE))) diff --git a/filter/UI_xsltdlg.mk b/filter/UIConfig_xsltdlg.mk similarity index 82% rename from filter/UI_xsltdlg.mk rename to filter/UIConfig_xsltdlg.mk index 6186789..0a9294d 100644 --- a/filter/UI_xsltdlg.mk +++ b/filter/UIConfig_xsltdlg.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,filter)) +$(eval $(call gb_UIConfig_UIConfig,filter)) -$(eval $(call gb_UI_add_uifiles,filter,\ +$(eval $(call gb_UIConfig_add_uifiles,filter,\ filter/uiconfig/ui/testxmlfilter \ filter/uiconfig/ui/xmlfiltersettings \ )) diff --git a/padmin/Module_padmin.mk b/padmin/Module_padmin.mk index c8d024d..9407b97 100644 --- a/padmin/Module_padmin.mk +++ b/padmin/Module_padmin.mk @@ -27,7 +27,7 @@ Library_spa \ AllLangResTarget_spa \ Package_inc \ - UI_spa \ + UIConfig_spa \ )) endif diff --git a/padmin/UI_spa.mk b/padmin/UIConfig_spa.mk similarity index 84% rename from padmin/UI_spa.mk rename to padmin/UIConfig_spa.mk index 6b1e011..565f0cc 100644 --- a/padmin/UI_spa.mk +++ b/padmin/UIConfig_spa.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,spa)) +$(eval $(call gb_UIConfig_UIConfig,spa)) -$(eval $(call gb_UI_add_uifiles,spa,\ +$(eval $(call gb_UIConfig_add_uifiles,spa,\ padmin/uiconfig/ui/printerdevicepage \ padmin/uiconfig/ui/printerpaperpage \ padmin/uiconfig/ui/printerpropertiesdialog \ diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk index 4a4fc41..2d8231f 100644 --- a/sc/Module_sc.mk +++ b/sc/Module_sc.mk @@ -31,7 +31,7 @@ Library_scfilt \ Library_scui \ Package_uiconfig \ - UI_scalc \ + UIConfig_scalc \ )) ifneq ($(DISABLE_SCRIPTING),TRUE) diff --git a/sc/UI_scalc.mk b/sc/UIConfig_scalc.mk similarity index 88% rename from sc/UI_scalc.mk rename to sc/UIConfig_scalc.mk index 9b8f7a4..224aa40 100644 --- a/sc/UI_scalc.mk +++ b/sc/UIConfig_scalc.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,modules/scalc)) +$(eval $(call gb_UIConfig_UIConfig,modules/scalc)) -$(eval $(call gb_UI_add_uifiles,modules/scalc,\ +$(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\ sc/uiconfig/scalc/ui/cellprotectionpage \ sc/uiconfig/scalc/ui/definename \ sc/uiconfig/scalc/ui/formatcellsdialog \ diff --git a/sd/Module_sd.mk b/sd/Module_sd.mk index 163e6ed..722bb13 100644 --- a/sd/Module_sd.mk +++ b/sd/Module_sd.mk @@ -38,8 +38,8 @@ Package_uiconfig \ Package_web \ Package_xml \ - UI_sdraw \ - UI_simpress \ + UIConfig_sdraw \ + UIConfig_simpress \ )) ifneq ($(OS),DRAGONFLY) diff --git a/sd/UI_sdraw.mk b/sd/UIConfig_sdraw.mk similarity index 78% rename from sd/UI_sdraw.mk rename to sd/UIConfig_sdraw.mk index c557e66..7000202 100644 --- a/sd/UI_sdraw.mk +++ b/sd/UIConfig_sdraw.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,modules/sdraw)) +$(eval $(call gb_UIConfig_UIConfig,modules/sdraw)) -$(eval $(call gb_UI_add_uifiles,modules/sdraw,\ +$(eval $(call gb_UIConfig_add_uifiles,modules/sdraw,\ sd/uiconfig/sdraw/ui/printeroptions \ )) diff --git a/sd/UI_simpress.mk b/sd/UIConfig_simpress.mk similarity index 81% rename from sd/UI_simpress.mk rename to sd/UIConfig_simpress.mk index d6cf6e0..00f2849 100644 --- a/sd/UI_simpress.mk +++ b/sd/UIConfig_simpress.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,modules/simpress)) +$(eval $(call gb_UIConfig_UIConfig,modules/simpress)) -$(eval $(call gb_UI_add_uifiles,modules/simpress,\ +$(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\ sd/uiconfig/simpress/ui/presentationdialog \ sd/uiconfig/simpress/ui/printeroptions \ sd/uiconfig/simpress/ui/photoalbum \ diff --git a/sfx2/Module_sfx2.mk b/sfx2/Module_sfx2.mk index 993ee47..4c852b7 100644 --- a/sfx2/Module_sfx2.mk +++ b/sfx2/Module_sfx2.mk @@ -24,7 +24,7 @@ Library_sfx \ Package_inc \ Package_sdi \ - UI_sfx \ + UIConfig_sfx \ )) $(eval $(call gb_Module_add_check_targets,sfx2,\ diff --git a/sfx2/UI_sfx.mk b/sfx2/UIConfig_sfx.mk similarity index 90% rename from sfx2/UI_sfx.mk rename to sfx2/UIConfig_sfx.mk index 0b59c7f..2a55193 100644 --- a/sfx2/UI_sfx.mk +++ b/sfx2/UIConfig_sfx.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,sfx)) +$(eval $(call gb_UIConfig_UIConfig,sfx)) -$(eval $(call gb_UI_add_uifiles,sfx,\ +$(eval $(call gb_UIConfig_add_uifiles,sfx,\ sfx2/uiconfig/ui/checkin \ sfx2/uiconfig/ui/custominfopage \ sfx2/uiconfig/ui/descriptioninfopage \ diff --git a/solenv/gbuild/Postprocess.mk b/solenv/gbuild/Postprocess.mk index 3e2a1cf..972a795 100644 --- a/solenv/gbuild/Postprocess.mk +++ b/solenv/gbuild/Postprocess.mk @@ -28,7 +28,7 @@ $(call gb_Postprocess_Postprocess,AllModulesButInstsetNative,All modules but instset,$(WORKDIR)/Module/) $(call gb_Postprocess_Postprocess,AllPackages,All packages,$(WORKDIR)/Package/) $(call gb_Postprocess_Postprocess,AllResources,All resources,$(WORKDIR)/AllLangRes/) -$(call gb_Postprocess_Postprocess,AllUIs,All UI files,$(WORKDIR)/UI/) +$(call gb_Postprocess_Postprocess,AllUIConfigs,All UI configuration files,$(WORKDIR)/UIConfig/) endef diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk index 7f50cf6..b379807 100644 --- a/solenv/gbuild/TargetLocations.mk +++ b/solenv/gbuild/TargetLocations.mk @@ -190,7 +190,7 @@ gb_SrsTemplateTarget_get_include_dir = $(WORKDIR)/SrsTemplatePartTarget/$(firstword $(subst /, ,$(1))) gb_SrsTemplateTarget_get_target = $(WORKDIR)/SrsTemplateTarget/$(1) gb_ThesaurusIndexTarget_get_target = $(WORKDIR)/ThesaurusIndexTarget/$(basename $(1)).idx -gb_UI_get_target = $(WORKDIR)/UI/$(1) +gb_UIConfig_get_target = $(WORKDIR)/UIConfig/$(1) gb_UILocalizeTarget_get_target = $(WORKDIR)/UILocalizeTarget/$(1).done gb_UILocalizeTarget_get_workdir = $(WORKDIR)/UILocalizeTarget/$(1) gb_UnoApiTarget_get_external_headers_target = $(WORKDIR)/UnoApiTarget/$(1).external @@ -304,7 +304,7 @@ CppunitTestFakeExecutable \ CustomTarget \ ExternalProject \ - UI \ + UIConfig \ UILocalizeTarget \ UnoApiHeadersTarget \ UnoApiTarget \ diff --git a/solenv/gbuild/UI.mk b/solenv/gbuild/UI.mk deleted file mode 100644 index 1cbb866..0000000 --- a/solenv/gbuild/UI.mk +++ /dev/null @@ -1,198 +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/. -# - -# 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=`$(gb_MKTEMP)` && \ -echo $(POFILES) > $${MERGEINPUT} && \ -$(call gb_Helper_abbreviate_dirs,\ - $(gb_UILocalizeTarget_COMMAND) \ - -i $(UI_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),$(wildcard $(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(patsubst %/,%,$(dir $(1))).po))) - -endef - -# gb_UILocalizeTarget__UILocalizeTarget_impl target pofiles -define gb_UILocalizeTarget__UILocalizeTarget_impl -$(call gb_UILocalizeTarget_get_target,$(1)) : POFILES := $(2) -$(call gb_UILocalizeTarget_get_target,$(1)) : UI_FILE := $(SRCDIR)/$(1).ui - -$(call gb_UILocalizeTarget_get_target,$(1)) : $(2) -$(call gb_UILocalizeTarget_get_target,$(1)) : $(SRCDIR)/$(1).ui -$(call gb_UILocalizeTarget_get_target,$(1)) :| \ - $(dir $(call gb_UILocalizeTarget_get_target,$(1))).dir \ - $(call gb_UILocalizeTarget_get_workdir,$(1))/.dir - -endef - -# class UI - -# Handles UI description files (suffix .ui) for the new layouting mechanism. - -# en-US is the default, so there is no translation for it -gb_UI_LANGS := $(filter-out en-US,$(gb_WITH_LANG)) - -$(dir $(call gb_UI_get_target,%)).dir : - $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@)) - -$(dir $(call gb_UI_get_target,%))%/.dir : - $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@)) - -$(call gb_UI_get_target,%) : - $(call gb_Output_announce,$*,$(true),UI ,2) - $(call gb_Helper_abbreviate_dirs,\ - touch $@ \ - ) - -.PHONY : $(call gb_UI_get_clean_target,%) -$(call gb_UI_get_clean_target,%) : - $(call gb_Output_announce,$*,$(false),UI ,2) - $(call gb_Helper_abbreviate_dirs,\ - rm -f $(call gb_UI_get_target,$*) \ - ) - -# Translates and delivers a set of .ui files -# -# gb_UI_UI modulename -define gb_UI_UI -$(call gb_Package_Package_internal,$(1)_ui,$(SRCDIR)) -$(call gb_UI_get_target,$(1)) :| $(dir $(call gb_UI_get_target,$(1))).dir -$(call gb_UI_get_target,$(1)) :| $(call gb_Package_get_target,$(1)_ui) -$(call gb_Postprocess_get_target,AllUIs) : $(call gb_UI_get_target,$(1)) -$(call gb_UI_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(1)_ui) - -ifneq ($(gb_UI_LANGS),) -$(call gb_Package_Package_internal,$(1)_ui_localized,$(gb_UILocalizeTarget_WORKDIR)) -$(call gb_UI_get_target,$(1)) :| $(call gb_Package_get_target,$(1)_ui_localized) -$(call gb_UI_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(1)_ui_localized) -endif - -$$(eval $$(call gb_Module_register_target,$(call gb_UI_get_target,$(1)),$(call gb_UI_get_clean_target,$(1)))) -$(call gb_Helper_make_userfriendly_targets,$(1),UI) - -endef - -# gb_UI__package_uifile target package destfile srcfile -define gb_UI__package_uifile -$(call gb_Package_add_file,$(2),xml/uiconfig/$(1)/ui/$(3),$(4)) - -endef - -# gb_UI__add_uifile target file -define gb_UI__add_uifile -$(call gb_UI__package_uifile,$(1),$(1)_ui,$(notdir $(2)).ui,$(2).ui) - -endef - -# gb_UI__add_uifile_for_lang target file lang -define gb_UI__add_uifile_for_lang -$(call gb_UI__package_uifile,$(1),$(1)_ui_localized,res/$(3)/$(notdir $(2)),$(2)/$(3).ui) - -endef - -# gb_UI__add_translations_impl target uifile langs -define gb_UI__add_translations_impl -$(call gb_UILocalizeTarget_UILocalizeTarget,$(2)) -$(call gb_UI_get_target,$(1)) : $(call gb_UILocalizeTarget_get_target,$(2)) -$(call gb_UI_get_clean_target,$(1)) : $(call gb_UILocalizeTarget_get_clean_target,$(2)) -$(call gb_Package_get_preparation_target,$(1)_ui_localized) : $(call gb_UILocalizeTarget_get_target,$(2)) -$(foreach lang,$(3),$(call gb_UI__add_uifile_for_lang,$(1),$(2),$(lang))) - -endef - -# gb_UI__add_translations target uifile langs qtz -define gb_UI__add_translations -$(if $(strip $(3) $(4)),$(call gb_UI__add_translations_impl,$(1),$(2),$(3))) -$(if $(strip $(4)),$(call gb_UI__add_uifile_for_lang,$(1),$(2),$(strip $(4)))) - -endef - -# Adds translations for languages that have corresponding .po file -# -# gb_UI__add_uifile_translations target uifile -define gb_UI__add_uifile_translations -$(call gb_UI__add_translations,$(1),$(2),\ - $(foreach lang,$(gb_UI_LANGS),\ - $(if $(wildcard $(gb_POLOCATION)/$(lang)/$(patsubst %/,%,$(dir $(2))).po),$(lang)) \ - ),\ - $(filter qtz,$(gb_UI_LANGS)) \ -) - -endef - -# Adds .ui file to the package -# -# The file is relative to $(SRCDIR) and without extension. -# -# gb_UI_add_uifile target uifile -define gb_UI_add_uifile -$(call gb_UI__add_uifile,$(1),$(2)) - -ifneq ($(gb_UI_LANGS),) -$(call gb_UI__add_uifile_translations,$(1),$(2)) -endif - -endef - -# Adds multiple .ui files to the package -# -# gb_UI_add_uifiles target uifile(s) -define gb_UI_add_uifiles -$(foreach uifile,$(2),$(call gb_UI_add_uifile,$(1),$(uifile))) - -endef - -# vim: set noet sw=4 ts=4: diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk new file mode 100644 index 0000000..1bd01be --- /dev/null +++ b/solenv/gbuild/UIConfig.mk @@ -0,0 +1,201 @@ +# -*- 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/. +# + +# 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=`$(gb_MKTEMP)` && \ +echo $(POFILES) > $${MERGEINPUT} && \ +$(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),$(wildcard $(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(patsubst %/,%,$(dir $(1))).po))) + +endef + +# gb_UILocalizeTarget__UILocalizeTarget_impl target pofiles +define gb_UILocalizeTarget__UILocalizeTarget_impl +$(call gb_UILocalizeTarget_get_target,$(1)) : POFILES := $(2) +$(call gb_UILocalizeTarget_get_target,$(1)) : UIConfig_FILE := $(SRCDIR)/$(1).ui + +$(call gb_UILocalizeTarget_get_target,$(1)) : $(2) +$(call gb_UILocalizeTarget_get_target,$(1)) : $(SRCDIR)/$(1).ui +$(call gb_UILocalizeTarget_get_target,$(1)) :| \ + $(dir $(call gb_UILocalizeTarget_get_target,$(1))).dir \ + $(call gb_UILocalizeTarget_get_workdir,$(1))/.dir + +endef + +# class UIConfig + +# Handles UI configuration files. +# +# This mostly means UI description files (suffix .ui) for the new layouting +# mechanism. + +# 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 $@)) + +$(dir $(call gb_UIConfig_get_target,%))%/.dir : + $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@)) + +$(call gb_UIConfig_get_target,%) : + $(call gb_Output_announce,$*,$(true),UIC,2) + $(call gb_Helper_abbreviate_dirs,\ + touch $@ \ + ) + +.PHONY : $(call gb_UIConfig_get_clean_target,%) +$(call gb_UIConfig_get_clean_target,%) : + $(call gb_Output_announce,$*,$(false),UIC,2) + $(call gb_Helper_abbreviate_dirs,\ + rm -f $(call gb_UIConfig_get_target,$*) \ + ) + +# Processes and delivers a set of UI configuration files. +# +# gb_UIConfig_UIConfig modulename +define gb_UIConfig_UIConfig +$(call gb_Package_Package_internal,$(1)_ui,$(SRCDIR)) +$(call gb_UIConfig_get_target,$(1)) :| $(dir $(call gb_UIConfig_get_target,$(1))).dir +$(call gb_UIConfig_get_target,$(1)) :| $(call gb_Package_get_target,$(1)_ui) +$(call gb_Postprocess_get_target,AllUIConfigs) : $(call gb_UIConfig_get_target,$(1)) +$(call gb_UIConfig_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(1)_ui) + +ifneq ($(gb_UIConfig_LANGS),) +$(call gb_Package_Package_internal,$(1)_ui_localized,$(gb_UILocalizeTarget_WORKDIR)) +$(call gb_UIConfig_get_target,$(1)) :| $(call gb_Package_get_target,$(1)_ui_localized) +$(call gb_UIConfig_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(1)_ui_localized) +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) + +endef + +# gb_UIConfig__package_uifile target package destfile srcfile +define gb_UIConfig__package_uifile +$(call gb_Package_add_file,$(2),xml/uiconfig/$(1)/ui/$(3),$(4)) + +endef + +# gb_UIConfig__add_uifile target file +define gb_UIConfig__add_uifile +$(call gb_UIConfig__package_uifile,$(1),$(1)_ui,$(notdir $(2)).ui,$(2).ui) + +endef + +# gb_UIConfig__add_uifile_for_lang target file lang +define gb_UIConfig__add_uifile_for_lang +$(call gb_UIConfig__package_uifile,$(1),$(1)_ui_localized,res/$(3)/$(notdir $(2)),$(2)/$(3).ui) + +endef + +# gb_UIConfig__add_translations_impl target uifile langs +define gb_UIConfig__add_translations_impl +$(call gb_UILocalizeTarget_UILocalizeTarget,$(2)) +$(call gb_UIConfig_get_target,$(1)) : $(call gb_UILocalizeTarget_get_target,$(2)) +$(call gb_UIConfig_get_clean_target,$(1)) : $(call gb_UILocalizeTarget_get_clean_target,$(2)) +$(call gb_Package_get_preparation_target,$(1)_ui_localized) : $(call gb_UILocalizeTarget_get_target,$(2)) +$(foreach lang,$(3),$(call gb_UIConfig__add_uifile_for_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 + +# Adds .ui file to the package +# +# The file is relative to $(SRCDIR) and without extension. +# +# gb_UIConfig_add_uifile target uifile +define gb_UIConfig_add_uifile +$(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 +# +# gb_UIConfig_add_uifiles target uifile(s) +define gb_UIConfig_add_uifiles +$(foreach uifile,$(2),$(call gb_UIConfig_add_uifile,$(1),$(uifile))) + +endef + +# vim: set noet sw=4 ts=4: diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk index cb374da..dcf08a6 100644 --- a/solenv/gbuild/gbuild.mk +++ b/solenv/gbuild/gbuild.mk @@ -319,7 +319,7 @@ JavaClassSet \ JunitTest \ Module \ - UI \ + UIConfig \ UnoApiTarget \ UnoApi \ UnoApiMerge \ diff --git a/starmath/Module_starmath.mk b/starmath/Module_starmath.mk index 95578de..897f2f2 100644 --- a/starmath/Module_starmath.mk +++ b/starmath/Module_starmath.mk @@ -28,7 +28,7 @@ Library_sm \ Library_smd \ Package_uiconfig \ - UI_smath \ + UIConfig_smath \ )) $(eval $(call gb_Module_add_check_targets,starmath,\ diff --git a/starmath/UI_smath.mk b/starmath/UIConfig_smath.mk similarity index 79% rename from starmath/UI_smath.mk rename to starmath/UIConfig_smath.mk index 6cbfb8d..a88475d 100644 --- a/starmath/UI_smath.mk +++ b/starmath/UIConfig_smath.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,modules/smath)) +$(eval $(call gb_UIConfig_UIConfig,modules/smath)) -$(eval $(call gb_UI_add_uifiles,modules/smath,\ +$(eval $(call gb_UIConfig_add_uifiles,modules/smath,\ starmath/uiconfig/smath/ui/printeroptions \ )) diff --git a/starmath/uiconfig/smath/menubar/menubar.xml b/starmath/uiconfig/smath/menubar/menubar.xml index 8a4d7c9..6358f0a 100644 --- a/starmath/uiconfig/smath/menubar/menubar.xml +++ b/starmath/uiconfig/smath/menubar/menubar.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="0.0" encoding="UTF-8"?> <!-- * This file is part of the LibreOffice project. * diff --git a/svtools/Module_svtools.mk b/svtools/Module_svtools.mk index c2d10c1..a7eb36c 100644 --- a/svtools/Module_svtools.mk +++ b/svtools/Module_svtools.mk @@ -24,7 +24,7 @@ Library_hatchwindowfactory \ Library_svt \ Package_inc \ - UI_svt \ + UIConfig_svt \ )) ifneq ($(CROSS_COMPILING),YES) diff --git a/svtools/UI_svt.mk b/svtools/UIConfig_svt.mk similarity index 86% rename from svtools/UI_svt.mk rename to svtools/UIConfig_svt.mk index 54d72a7..ddca431 100644 --- a/svtools/UI_svt.mk +++ b/svtools/UIConfig_svt.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,svt)) +$(eval $(call gb_UIConfig_UIConfig,svt)) -$(eval $(call gb_UI_add_uifiles,svt,\ +$(eval $(call gb_UIConfig_add_uifiles,svt,\ svtools/uiconfig/ui/graphicexport \ svtools/uiconfig/ui/placeedit \ svtools/uiconfig/ui/printersetupdialog \ diff --git a/svx/Module_svx.mk b/svx/Module_svx.mk index d5aceb8..a8b69ad 100644 --- a/svx/Module_svx.mk +++ b/svx/Module_svx.mk @@ -30,7 +30,7 @@ Package_globlmn_hrc \ Package_inc \ Package_sdi \ - UI_svx \ + UIConfig_svx \ )) ifneq (,$(filter DESKTOP,$(BUILD_TYPE))) diff --git a/svx/UI_svx.mk b/svx/UIConfig_svx.mk similarity index 88% rename from svx/UI_svx.mk rename to svx/UIConfig_svx.mk index f7e28ae..e9bc814 100644 --- a/svx/UI_svx.mk +++ b/svx/UIConfig_svx.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,svx)) +$(eval $(call gb_UIConfig_UIConfig,svx)) -$(eval $(call gb_UI_add_uifiles,svx,\ +$(eval $(call gb_UIConfig_add_uifiles,svx,\ svx/uiconfig/ui/acceptrejectchangesdialog \ svx/uiconfig/ui/asianphoneticguidedialog \ svx/uiconfig/ui/chineseconversiondialog \ diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk index d11f167..0c8b6e9 100644 --- a/sw/Module_sw.mk +++ b/sw/Module_sw.mk @@ -26,7 +26,7 @@ Library_swd \ Library_swui \ Package_uiconfig \ - UI_swriter \ + UIConfig_swriter \ )) ifneq ($(DISABLE_SCRIPTING),TRUE) diff --git a/sw/UI_swriter.mk b/sw/UIConfig_swriter.mk similarity index 94% rename from sw/UI_swriter.mk rename to sw/UIConfig_swriter.mk index 40d427c..125707e 100644 --- a/sw/UI_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,modules/swriter)) +$(eval $(call gb_UIConfig_UIConfig,modules/swriter)) -$(eval $(call gb_UI_add_uifiles,modules/swriter,\ +$(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/autoformattable \ sw/uiconfig/swriter/ui/autotext \ sw/uiconfig/swriter/ui/bibliographyentry \ diff --git a/tubes/Module_tubes.mk b/tubes/Module_tubes.mk index dc0bba8..703df3c 100644 --- a/tubes/Module_tubes.mk +++ b/tubes/Module_tubes.mk @@ -33,7 +33,7 @@ Executable_liboapprover \ Library_tubes \ Package_inc \ - UI_tubes \ + UIConfig_tubes \ )) $(eval $(call gb_Module_add_subsequentcheck_targets,tubes,\ diff --git a/tubes/UI_tubes.mk b/tubes/UIConfig_tubes.mk similarity index 81% rename from tubes/UI_tubes.mk rename to tubes/UIConfig_tubes.mk index 59801da..43a0feb 100644 --- a/tubes/UI_tubes.mk +++ b/tubes/UIConfig_tubes.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,tubes)) +$(eval $(call gb_UIConfig_UIConfig,tubes)) -$(eval $(call gb_UI_add_uifiles,tubes,\ +$(eval $(call gb_UIConfig_add_uifiles,tubes,\ tubes/uiconfig/ui/contacts \ )) diff --git a/uui/Module_uui.mk b/uui/Module_uui.mk index e70e94e..0f60a5b 100644 --- a/uui/Module_uui.mk +++ b/uui/Module_uui.mk @@ -31,7 +31,7 @@ $(eval $(call gb_Module_add_targets,uui,\ AllLangResTarget_uui \ Library_uui \ - UI_uui \ + UIConfig_uui \ )) # vim: set noet sw=4 ts=4: diff --git a/uui/UI_uui.mk b/uui/UIConfig_uui.mk similarity index 83% rename from uui/UI_uui.mk rename to uui/UIConfig_uui.mk index 826b4ed..3b34479 100644 --- a/uui/UI_uui.mk +++ b/uui/UIConfig_uui.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,uui)) +$(eval $(call gb_UIConfig_UIConfig,uui)) -$(eval $(call gb_UI_add_uifiles,uui,\ +$(eval $(call gb_UIConfig_add_uifiles,uui,\ uui/uiconfig/ui/masterpassworddlg \ uui/uiconfig/ui/setmasterpassworddlg \ )) diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index 116e815..1218904 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -27,7 +27,7 @@ $(if $(filter DESKTOP,$(BUILD_TYPE)), \ StaticLibrary_vclmain \ Executable_ui-previewer) \ - UI_vcl \ + UIConfig_vcl \ )) ifeq ($(GUIBASE),unx) diff --git a/vcl/UI_vcl.mk b/vcl/UIConfig_vcl.mk similarity index 81% rename from vcl/UI_vcl.mk rename to vcl/UIConfig_vcl.mk index b39bb78..ff6db5b 100644 --- a/vcl/UI_vcl.mk +++ b/vcl/UIConfig_vcl.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,vcl)) +$(eval $(call gb_UIConfig_UIConfig,vcl)) -$(eval $(call gb_UI_add_uifiles,vcl,\ +$(eval $(call gb_UIConfig_add_uifiles,vcl,\ vcl/uiconfig/ui/printdialog \ )) diff --git a/xmlsecurity/Module_xmlsecurity.mk b/xmlsecurity/Module_xmlsecurity.mk index d6f66ba..88dee89 100644 --- a/xmlsecurity/Module_xmlsecurity.mk +++ b/xmlsecurity/Module_xmlsecurity.mk @@ -33,7 +33,7 @@ Library_xmlsecurity \ Library_xsec_fw \ $(if $(filter-out IOS ANDROID,$(OS)),Library_xsec_xmlsec) \ - UI_xmlsec \ + UIConfig_xmlsec \ )) #FIXME: ^^^, get nss&libxmlsec building on ios and android diff --git a/xmlsecurity/UI_xmlsec.mk b/xmlsecurity/UIConfig_xmlsec.mk similarity index 86% rename from xmlsecurity/UI_xmlsec.mk rename to xmlsecurity/UIConfig_xmlsec.mk index e07a558..5bc39e9 100644 --- a/xmlsecurity/UI_xmlsec.mk +++ b/xmlsecurity/UIConfig_xmlsec.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_UI_UI,xmlsec)) +$(eval $(call gb_UIConfig_UIConfig,xmlsec)) -$(eval $(call gb_UI_add_uifiles,xmlsec,\ +$(eval $(call gb_UIConfig_add_uifiles,xmlsec,\ xmlsecurity/uiconfig/ui/digitalsignaturesdialog \ xmlsecurity/uiconfig/ui/securitylevelpage \ xmlsecurity/uiconfig/ui/securitytrustpage \ -- To view, visit https://gerrit.libreoffice.org/3225 To unsubscribe, visit https://gerrit.libreoffice.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7b4434b2f247165e3ab69a4d0c193418720a149 Gerrit-PatchSet: 1 Gerrit-Project: core Gerrit-Branch: master Gerrit-Owner: David Tardon <dtar...@redhat.com> _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice