diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-07-21 11:11:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-07-21 12:30:17 +0100 |
commit | 8b11c3e8443ab7d0ba5f4fdc754dcdc8c2ca07be (patch) | |
tree | 98a0c69ec9d8fc787fdee4fc8289aff03332b4bf /solenv | |
parent | 4d1b35423537544a44d6265d985065caa340f956 (diff) |
replace localestr with a script for the supported translation targets
Change-Id: Ia0c00f6f978428d68b3c53051e26e1913b207dbe
Diffstat (limited to 'solenv')
-rwxr-xr-x | solenv/bin/localestr | 17 | ||||
-rw-r--r-- | solenv/gbuild/AllLangMoTarget.mk | 9 |
2 files changed, 20 insertions, 6 deletions
diff --git a/solenv/bin/localestr b/solenv/bin/localestr new file mode 100755 index 000000000000..07eab968b908 --- /dev/null +++ b/solenv/bin/localestr @@ -0,0 +1,17 @@ +#!/bin/sh + +case "$1" in + ca-valencia) + echo ca@valencia + ;; + kmr-Latn) + echo kmr@latin + ;; + sr-Latn) + echo sr@latin + ;; + *) + echo $1 | tr '-' '_' + ;; +esac + diff --git a/solenv/gbuild/AllLangMoTarget.mk b/solenv/gbuild/AllLangMoTarget.mk index 9772e8c8d1e6..c5cf2cf1005d 100644 --- a/solenv/gbuild/AllLangMoTarget.mk +++ b/solenv/gbuild/AllLangMoTarget.mk @@ -23,9 +23,6 @@ # AllLangMoTarget nothing MoTarget for all active langs # MoTarget running msgfmt -gb_MoTarget_LOCALESTRDEPS := $(call gb_Executable_get_runtime_dependencies,localestr) -gb_MoTarget_LOCALESTRCOMMAND := $(call gb_Executable_get_command,localestr) - # MoTarget $(call gb_MoTarget_get_clean_target,%) : @@ -39,7 +36,7 @@ $(call gb_MoTarget_get_clean_target,%) : #and minimize msgctxt #eventually instead can do something like #msgfmt $(gb_POLOCATION)/$(LANGUAGE)/$(LIBRARY)/messages.po -o $@) -$(call gb_MoTarget_get_target,%) : $(gb_Helper_MISCDUMMY) $(gb_MoTarget_LOCALESTRDEPS) +$(call gb_MoTarget_get_target,%) : $(gb_Helper_MISCDUMMY) $(call gb_Output_announce,$*,$(true),MO,2) $(call gb_Helper_abbreviate_dirs,\ mkdir -p $(dir $@) && \ @@ -71,7 +68,7 @@ $(call gb_AllLangMoTarget_get_clean_target,%) : $(call gb_Helper_abbreviate_dirs,\ rm -f $(call gb_AllLangMoTarget_get_target,$*)) -$(call gb_AllLangMoTarget_get_target,%) : $(gb_MoTarget_LOCALESTRDEPS) +$(call gb_AllLangMoTarget_get_target,%) : $(call gb_Helper_abbreviate_dirs,\ mkdir -p $(dir $@) && touch $@) @@ -87,7 +84,7 @@ $(foreach lang,$(gb_AllLangMoTarget_LANGS),\ $(foreach lang,$(gb_AllLangMoTarget_LANGS),\ $(call gb_Helper_install,$(call gb_AllLangMoTarget_get_target,$(1)), \ - $(call gb_MoTarget_get_install_target,$(shell $(SRCDIR)/bin/run localestr $(lang))/LC_MESSAGES/$(1)), \ + $(call gb_MoTarget_get_install_target,$(shell $(SRCDIR)/solenv/bin/localestr $(lang))/LC_MESSAGES/$(1)), \ $(call gb_MoTarget_get_target,$(1)$(lang)))) $$(eval $$(call gb_Module_register_target,$(call gb_AllLangMoTarget_get_target,$(1)),$(call gb_AllLangMoTarget_get_clean_target,$(1)))) |