summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Repository.mk1
-rw-r--r--extras/CustomTarget_gallsystem.mk36
-rw-r--r--extras/Module_extras.mk2
-rw-r--r--extras/Package_gallsystem.mk35
-rw-r--r--extras/Package_gallsystemstr.mk18
-rw-r--r--extras/source/gallery/gallery_system/dummy.str2
6 files changed, 64 insertions, 30 deletions
diff --git a/Repository.mk b/Repository.mk
index e19cc40c9062..09bb53d7f903 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -878,6 +878,7 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
extras_gallmytheme \
extras_gallroot \
extras_gallsystem \
+ extras_gallsystemstr \
extras_glade \
extras_labels \
$(if $(filter WNT,$(OS)),extras_newfiles) \
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"