Skip to content

Commit 244de1f

Browse files
committed
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 <[email protected]>
1 parent 4fcd42a commit 244de1f

File tree

6 files changed

+64
-30
lines changed

6 files changed

+64
-30
lines changed

Repository.mk

+1
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,7 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
878878
extras_gallmytheme \
879879
extras_gallroot \
880880
extras_gallsystem \
881+
extras_gallsystemstr \
881882
extras_glade \
882883
extras_labels \
883884
$(if $(filter WNT,$(OS)),extras_newfiles) \

extras/CustomTarget_gallsystem.mk

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
2+
#
3+
# This file is part of the LibreOffice project.
4+
#
5+
# This Source Code Form is subject to the terms of the Mozilla Public
6+
# License, v. 2.0. If a copy of the MPL was not distributed with this
7+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
8+
#
9+
10+
$(eval $(call gb_CustomTarget_CustomTarget,extras/gallsysstr))
11+
12+
# bullets, fontwork symbolshapes not listed in ulf/not currently enabled for translation
13+
$(eval $(call gb_CustomTarget_register_targets,extras/gallsysstr,\
14+
$(addsuffix .str,$(filter-out bullets fontwork symbolshapes,$(system_galleries))) \
15+
))
16+
17+
$(eval $(call gb_CustomTarget_ulfex_rule,\
18+
$(call gb_CustomTarget_get_workdir,extras/gallsysstr)/extras_gallsystem.ulf,\
19+
$(SRCDIR)/extras/source/gallery/share/gallery_names.ulf,\
20+
$(foreach lang,$(gb_TRANS_LANGS),\
21+
$(gb_POLOCATION)/$(lang)/extras/source/gallery/share.po)))
22+
23+
# desktop-translate.py is ugly af/doesn't play nice with make dependencies.
24+
# It expects the target filename to exist and modifies it, so do the hack with own
25+
# temporary dir
26+
$(call gb_CustomTarget_get_workdir,extras/gallsysstr)/%.str : \
27+
$(call gb_CustomTarget_get_workdir,extras/gallsysstr)/extras_gallsystem.ulf \
28+
$(SRCDIR)/extras/source/gallery/gallery_system/dummy.str \
29+
$(call gb_ExternalExecutable_get_dependencies,python) \
30+
$(SRCDIR)/solenv/bin/desktop-translate.py
31+
mkdir -p $(@D)/$* && cp $(SRCDIR)/extras/source/gallery/gallery_system/dummy.str $(@D)/$*/$*.str && \
32+
$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/solenv/bin/desktop-translate.py \
33+
--ext "str" --key "name" -d $(@D)/$*/ $(@D)/extras_gallsystem.ulf && \
34+
mv $(@D)/$*/$*.str $@
35+
36+
# vim: set noet sw=4 ts=4:

extras/Module_extras.mk

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ $(eval $(call gb_Module_add_targets,extras,\
1313
CustomTarget_autocorr \
1414
CustomTarget_autotextuser \
1515
CustomTarget_glade \
16+
CustomTarget_gallsystem \
1617
CustomTarget_tplofficorr \
1718
CustomTarget_tploffimisc \
1819
CustomTarget_tplpersonal \
@@ -31,6 +32,7 @@ $(eval $(call gb_Module_add_targets,extras,\
3132
Package_gallmytheme \
3233
Package_gallroot \
3334
Package_gallsystem \
35+
Package_gallsystemstr \
3436
Package_glade \
3537
Package_labels \
3638
$(if $(filter WNT,$(OS)),Package_newfiles) \

extras/Package_gallsystem.mk

+5-30
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,14 @@
77
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
88
#
99

10+
system_galleries := arrows bpmn bullets diagrams flowchart fontwork icons network shapes symbolshapes
11+
1012
$(eval $(call gb_Package_Package,extras_gallsystem,$(SRCDIR)/extras/source/gallery/gallery_system))
1113

1214
$(eval $(call gb_Package_add_files,extras_gallsystem,$(LIBO_SHARE_FOLDER)/gallery,\
13-
arrows.sdg \
14-
arrows.sdv \
15-
arrows.thm \
16-
bpmn.sdg \
17-
bpmn.sdv \
18-
bpmn.thm \
19-
bullets.sdg \
20-
bullets.sdv \
21-
bullets.thm \
22-
diagrams.sdg \
23-
diagrams.sdv \
24-
diagrams.thm \
25-
flowchart.sdg \
26-
flowchart.sdv \
27-
flowchart.thm \
28-
fontwork.sdg \
29-
fontwork.sdv \
30-
fontwork.thm \
31-
icons.sdg \
32-
icons.sdv \
33-
icons.thm \
34-
network.sdg \
35-
network.sdv \
36-
network.thm \
37-
shapes.sdg \
38-
shapes.sdv \
39-
shapes.thm \
40-
symbolshapes.sdg \
41-
symbolshapes.sdv \
42-
symbolshapes.thm \
15+
$(addsuffix .sdg,$(system_galleries)) \
16+
$(addsuffix .sdv,$(system_galleries)) \
17+
$(addsuffix .thm,$(system_galleries)) \
4318
))
4419

4520
# vim: set noet sw=4 ts=4:

extras/Package_gallsystemstr.mk

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
2+
#
3+
# This file is part of the LibreOffice project.
4+
#
5+
# This Source Code Form is subject to the terms of the Mozilla Public
6+
# License, v. 2.0. If a copy of the MPL was not distributed with this
7+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
8+
#
9+
10+
# defining extra package for that is a little hacky - maybe use PackageSet instead?
11+
$(eval $(call gb_Package_Package,extras_gallsystemstr,$(call gb_CustomTarget_get_workdir,extras/gallsysstr)))
12+
$(eval $(call gb_Package_use_customtarget,extras_gallsystemstr,extras/gallsysstr))
13+
14+
$(eval $(call gb_Package_add_files,extras_gallsystemstr,$(LIBO_SHARE_FOLDER)/gallery,\
15+
$(addsuffix .str,$(filter-out bullets fontwork symbolshapes,$(system_galleries))) \
16+
))
17+
18+
# vim: set noet sw=4 ts=4:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Translated by desktop-translate and ulfex
2+
name = "see extras/source/gallery/share/gallery_names.ulf"

0 commit comments

Comments
 (0)