diff options
author | David Tardon <dtardon@redhat.com> | 2012-12-27 16:11:29 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2012-12-27 17:16:52 +0100 |
commit | f45a07d6f4eefc75d983d7aca2b57d075749b4e7 (patch) | |
tree | 56f109114a4ca3ce5050d3a6740ea3d8f9ea0237 /solenv | |
parent | 4faaf5579937e2e2fc91aef28ba4974020d2fa9f (diff) |
fix delivery of qtz "translations"
Change-Id: I2f0ae1eff5bd009a7cb467b38c1743eff51dc563
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/UI.mk | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/solenv/gbuild/UI.mk b/solenv/gbuild/UI.mk index 08a38517863c..f46fb1d6dff4 100644 --- a/solenv/gbuild/UI.mk +++ b/solenv/gbuild/UI.mk @@ -17,6 +17,19 @@ gb_UILocalizeTarget_TARGET := $(call gb_Executable_get_target_for_build,uiex) gb_UILocalizeTarget_COMMAND := $(gb_Helper_set_ld_path) $(gb_UILocalizeTarget_TARGET) gb_UILocalizeTarget_LANGS := $(filter-out qtz,$(filter-out en-US,$(gb_WITH_LANG))) +# If translatable strings from a .ui file are not merged into the +# respective .po file yet, the produced translated files are empty (that +# is, they only contain the root element), but qtz is not created at all +# which breaks delivery. This hack avoids the problem by creating a +# dummy translation file. +define gb_UILocalizeTarget__fix_missing_qtz +$(if $(filter qtz,$(gb_WITH_LANG)),\ + && if [ ! -f $(1)/qtz.ui ]; then \ + echo '<?xml version="1.0"?><t></t>' > $(1)/qtz.ui; \ + fi \ +) +endef + define gb_UILocalizeTarget__command $(call gb_Output_announce,$(2),$(true),UIX,1) MERGEINPUT=`$(gb_MKTEMP)` && \ @@ -27,6 +40,7 @@ $(call gb_Helper_abbreviate_dirs,\ -o $(call gb_UILocalizeTarget_get_workdir,$(2)) \ -l all \ -m $${MERGEINPUT} \ + $(call gb_UILocalizeTarget__fix_missing_qtz,$(call gb_UILocalizeTarget_get_workdir,$(2))) \ && touch $(1) \ ) && \ rm -rf $${MERGEINPUT} |