diff options
author | Holger Wansing <hwansing@mailbox.org> | 2024-01-02 23:16:25 +0100 |
---|---|---|
committer | Holger Wansing <hwansing@mailbox.org> | 2024-01-02 23:16:25 +0100 |
commit | e59bdd1ee162d9d1eb2faca9b587eac151c478a4 (patch) | |
tree | 91f509411801e24d6d30849dbf1df81ee10f29d1 /english/international | |
parent | 2fe0ede433d7d3cafe0ec1a9829f240144acb55b (diff) |
Today I added a new script strip-langs.sh to english/international/l10n/scripts, which removes unwanted entries from the language list in data/langs. While my first approach was, to call this new script in english/international/l10n/po/Makefile after the gen-files.sh run, I now realize that the correct way is, to call strip-langs.sh in webmaster's cron repo in lessoften-parts/1l10n-data, where the data/langs file is created. While both approaches worked so far, it's the cleaner (and more obvious) way, to call strip-langs.sh via the cron script. Thus changing it that way. See also commit 9fdc0e49 in cron repo.
Diffstat (limited to 'english/international')
-rw-r--r-- | english/international/l10n/po/Makefile | 4 | ||||
-rwxr-xr-x | english/international/l10n/scripts/strip-langs.sh | 8 |
2 files changed, 4 insertions, 8 deletions
diff --git a/english/international/l10n/po/Makefile b/english/international/l10n/po/Makefile index db6d0da4600..2058a11b95b 100644 --- a/english/international/l10n/po/Makefile +++ b/english/international/l10n/po/Makefile @@ -45,10 +45,6 @@ $(ENGLISHDIR)/$(CUR_DIR)/gen/main.exc $(ENGLISHDIR)/$(CUR_DIR)/gen/rank.inc $(L1 $(L10N_DIR)/scripts/isoquery.pl # This is effectively the only place, where gen-files.pl is executed. The other ones in ../podebconf and ../po4a are not called. perl $(L10N_DIR)/scripts/gen-files.pl --sort=$(SORT_PKGS) --dist=$(DIST) --l10ndir=$(L10N_DIR) --langs --po --podebconf --po4a -# In the following we strip out wrong or unwanted language entries (to be defined in strip-langs.sh): - $(L10N_DIR)/scripts/strip-langs.sh -# Variable LANGS_PO has to be refreshed here, since it has been modified by strip-langs.sh: -LANGS_PO := $(shell grep 'po:' $(L10N_DIR)/data/langs | sed -e 's/po: *//') clean:: -rm -rf gen diff --git a/english/international/l10n/scripts/strip-langs.sh b/english/international/l10n/scripts/strip-langs.sh index 1197b81bc38..ae88f8d392e 100755 --- a/english/international/l10n/scripts/strip-langs.sh +++ b/english/international/l10n/scripts/strip-langs.sh @@ -1,17 +1,17 @@ #! /bin/sh # Strip out wrong or unwanted language entries from language list -# (in ../english/international/l10n/langs). +# (in ../english/international/l10n/data/langs). -# Usage: strip-langs.sh ../english/international/l10n/langs +# Usage: strip-langs.sh ../english/international/l10n/data/langs unwanted='api app apt aym ber bos_DE bos_ES bos_FI bos_FR bos_HU bos_IT bos_LT bos_NL bos_SV bos_TR bos_NG bwr_NG ckl_NG cpf cz dcc_DE dcc_ES dcc_FR dcc_HU dcc_HR dcc_NL dcc_IT dcc_PL dcc_PT dcc_RU dcc_SR dcc_TR dk doc en en_BR en_DE en_FR en_HK en_PR en@arabic en@boldquot en@cyrillic en@greek en@hebrew en@piglatin en@quot en@shaw en@truecase en_AU en_CA en_GB en_IE en_NZ en_US en_ZA fil_PH gui hia_NG ibo kde log log_DE log_ES log_FI log_FR log_HR log_HU log_IT log_NL log_PL log_PT log_RU log_SR log_TR mac map mfi_NG mnw_MM mrt_NG nah new_DE new_ES new_FR new_IT raw tag xml' -cp ../data/langs ../data/langs_saved +cp ./data/langs ./data/langs_saved for l in $unwanted do - sed -i s/\ $l\ /\ / ../data/langs + sed -i s/\ $l\ /\ / ./data/langs done |