diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2020-07-14 15:30:42 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2020-07-15 12:06:24 +0200 |
commit | 610e68f8cda888f2739881f75900130ce0a5a74e (patch) | |
tree | 78d9a096b191c2c1c7d73da9278b5602d448ebc1 /extras | |
parent | b170c159c8b77a81dafd98d825af9e503348ec8c (diff) |
tdf#133788 Missing pieces for Gallery localization
Change-Id: Id11227b4a271351b50c43f6b5a531b47261c6fc5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98544
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
(cherry picked from commit 244de1fc0f3f201f56e739401ee3cc52f35deab4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98768
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'extras')
-rw-r--r-- | extras/CustomTarget_gallsystem.mk | 36 | ||||
-rw-r--r-- | extras/Module_extras.mk | 2 | ||||
-rw-r--r-- | extras/Package_gallsystem.mk | 35 | ||||
-rw-r--r-- | extras/Package_gallsystemstr.mk | 18 | ||||
-rw-r--r-- | extras/source/gallery/gallery_system/dummy.str | 2 |
5 files changed, 63 insertions, 30 deletions
diff --git a/extras/CustomTarget_gallsystem.mk b/extras/CustomTarget_gallsystem.mk new file mode 100644 index 000000000000..271c7332ac6c --- /dev/null +++ b/extras/CustomTarget_gallsystem.mk @@ -0,0 +1,36 @@ +# -*- 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/. +# + +$(eval $(call gb_CustomTarget_CustomTarget,extras/gallsysstr)) + +# bullets, fontwork symbolshapes not listed in ulf/not currently enabled for translation +$(eval $(call gb_CustomTarget_register_targets,extras/gallsysstr,\ + $(addsuffix .str,$(filter-out bullets fontwork symbolshapes,$(system_galleries))) \ +)) + +$(eval $(call gb_CustomTarget_ulfex_rule,\ + $(call gb_CustomTarget_get_workdir,extras/gallsysstr)/extras_gallsystem.ulf,\ + $(SRCDIR)/extras/source/gallery/share/gallery_names.ulf,\ + $(foreach lang,$(gb_TRANS_LANGS),\ + $(gb_POLOCATION)/$(lang)/extras/source/gallery/share.po))) + +# desktop-translate.py is ugly af/doesn't play nice with make dependencies. +# It expects the target filename to exist and modifies it, so do the hack with own +# temporary dir +$(call gb_CustomTarget_get_workdir,extras/gallsysstr)/%.str : \ + $(call gb_CustomTarget_get_workdir,extras/gallsysstr)/extras_gallsystem.ulf \ + $(SRCDIR)/extras/source/gallery/gallery_system/dummy.str \ + $(call gb_ExternalExecutable_get_dependencies,python) \ + $(SRCDIR)/solenv/bin/desktop-translate.py + mkdir -p $(@D)/$* && cp $(SRCDIR)/extras/source/gallery/gallery_system/dummy.str $(@D)/$*/$*.str && \ + $(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/solenv/bin/desktop-translate.py \ + --ext "str" --key "name" -d $(@D)/$*/ $(@D)/extras_gallsystem.ulf && \ + mv $(@D)/$*/$*.str $@ + +# vim: set noet sw=4 ts=4: diff --git a/extras/Module_extras.mk b/extras/Module_extras.mk index bb14928f9971..cf7177c21180 100644 --- a/extras/Module_extras.mk +++ b/extras/Module_extras.mk @@ -13,6 +13,7 @@ $(eval $(call gb_Module_add_targets,extras,\ CustomTarget_autocorr \ CustomTarget_autotextuser \ CustomTarget_glade \ + CustomTarget_gallsystem \ CustomTarget_tplofficorr \ CustomTarget_tploffimisc \ CustomTarget_tplpersonal \ @@ -31,6 +32,7 @@ $(eval $(call gb_Module_add_targets,extras,\ Package_gallmytheme \ Package_gallroot \ Package_gallsystem \ + Package_gallsystemstr \ Package_glade \ Package_labels \ $(if $(filter WNT,$(OS)),Package_newfiles) \ diff --git a/extras/Package_gallsystem.mk b/extras/Package_gallsystem.mk index c17099ce7050..4ff2774ef202 100644 --- a/extras/Package_gallsystem.mk +++ b/extras/Package_gallsystem.mk @@ -7,39 +7,14 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # +system_galleries := arrows bpmn bullets diagrams flowchart fontwork icons network shapes symbolshapes + $(eval $(call gb_Package_Package,extras_gallsystem,$(SRCDIR)/extras/source/gallery/gallery_system)) $(eval $(call gb_Package_add_files,extras_gallsystem,$(LIBO_SHARE_FOLDER)/gallery,\ - arrows.sdg \ - arrows.sdv \ - arrows.thm \ - bpmn.sdg \ - bpmn.sdv \ - bpmn.thm \ - bullets.sdg \ - bullets.sdv \ - bullets.thm \ - diagrams.sdg \ - diagrams.sdv \ - diagrams.thm \ - flowchart.sdg \ - flowchart.sdv \ - flowchart.thm \ - fontwork.sdg \ - fontwork.sdv \ - fontwork.thm \ - icons.sdg \ - icons.sdv \ - icons.thm \ - network.sdg \ - network.sdv \ - network.thm \ - shapes.sdg \ - shapes.sdv \ - shapes.thm \ - symbolshapes.sdg \ - symbolshapes.sdv \ - symbolshapes.thm \ + $(addsuffix .sdg,$(system_galleries)) \ + $(addsuffix .sdv,$(system_galleries)) \ + $(addsuffix .thm,$(system_galleries)) \ )) # vim: set noet sw=4 ts=4: diff --git a/extras/Package_gallsystemstr.mk b/extras/Package_gallsystemstr.mk new file mode 100644 index 000000000000..548b5fd91120 --- /dev/null +++ b/extras/Package_gallsystemstr.mk @@ -0,0 +1,18 @@ +# -*- 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/. +# + +# defining extra package for that is a little hacky - maybe use PackageSet instead? +$(eval $(call gb_Package_Package,extras_gallsystemstr,$(call gb_CustomTarget_get_workdir,extras/gallsysstr))) +$(eval $(call gb_Package_use_customtarget,extras_gallsystemstr,extras/gallsysstr)) + +$(eval $(call gb_Package_add_files,extras_gallsystemstr,$(LIBO_SHARE_FOLDER)/gallery,\ + $(addsuffix .str,$(filter-out bullets fontwork symbolshapes,$(system_galleries))) \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/extras/source/gallery/gallery_system/dummy.str b/extras/source/gallery/gallery_system/dummy.str new file mode 100644 index 000000000000..bae770e142d2 --- /dev/null +++ b/extras/source/gallery/gallery_system/dummy.str @@ -0,0 +1,2 @@ +# Translated by desktop-translate and ulfex +name = "see extras/source/gallery/share/gallery_names.ulf" |