net-misc/electrum: Migrate from LINGUAS to L10N.
authorUlrich Müller <ulm@gentoo.org>
Mon, 8 Jan 2018 22:02:45 +0000 (23:02 +0100)
committerUlrich Müller <ulm@gentoo.org>
Mon, 8 Jan 2018 22:03:21 +0000 (23:03 +0100)
Map all language_TERRITORRY codes (except pt_* and zh_*) to their
generic language equivalents. Add codes fa_IR, uk_UA, and zh_TW to
those ebuilds that were missing them.

Package-Manager: Portage-2.3.19, Repoman-2.3.6

net-misc/electrum/electrum-2.7.15.ebuild
net-misc/electrum/electrum-2.8.0-r1.ebuild
net-misc/electrum/electrum-2.8.2.ebuild
net-misc/electrum/electrum-2.8.3.ebuild
net-misc/electrum/electrum-2.9.3.ebuild
net-misc/electrum/electrum-3.0.3.ebuild

index 536d54d9c3969110173f2812320735d5064a671b..ef6c1839e5947864fed6116c805649a6416c7fec 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="5"
@@ -16,13 +16,22 @@ SRC_URI="https://download.electrum.org/${PV}/${MY_P}.tar.gz"
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="amd64 x86"
-LINGUAS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO ru_RU sk_SK sl_SI ta_IN th_TH tr_TR vi_VN zh_CN"
+MY_LANGS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO ru_RU sk_SK sl_SI ta_IN th_TH tr_TR vi_VN zh_CN"
+
+my_langs_to_l10n() {
+       # Map all except pt_* and zh_* to their generic codes
+       case $1 in
+               pt_*|zh_*) echo ${1/_/-} ;;
+               *) echo ${1%%_*} ;;
+       esac
+}
 
 IUSE="cli cosign email greenaddress_it ncurses qrcode +qt4 sync trustedcoin_com vkb"
 
-for lingua in ${LINGUAS}; do
-       IUSE+=" linguas_${lingua}"
+for lang in ${MY_LANGS}; do
+       IUSE+=" l10n_$(my_langs_to_l10n ${lang})"
 done
+unset lang
 
 REQUIRED_USE="
        || ( cli ncurses qt4 )
@@ -72,17 +81,18 @@ src_prepare() {
        sed -i '/icons/d' setup.py || die
 
        # Remove unrequested localization files:
-       for lang in ${LINGUAS}; do
-               use "linguas_${lang}" && continue
+       local lang
+       for lang in ${MY_LANGS}; do
+               use l10n_$(my_langs_to_l10n ${lang}) && continue
                rm -r "lib/locale/${lang}" || die
        done
 
        local wordlist=
        for wordlist in  \
-               $(usex linguas_ja_JP '' japanese) \
-               $(usex linguas_pt_BR '' $(usex linguas_pt_PT '' portuguese)) \
-               $(usex linguas_es_ES '' spanish) \
-               $(usex linguas_zh_CN '' chinese_simplified) \
+               $(usex l10n_ja    '' japanese) \
+               $(usex l10n_pt-BR '' $(usex l10n_pt-PT '' portuguese)) \
+               $(usex l10n_es    '' spanish) \
+               $(usex l10n_zh-CN '' chinese_simplified) \
        ; do
                rm -f "lib/wordlist/${wordlist}.txt" || die
                sed -i "/${wordlist}\\.txt/d" lib/mnemonic.py || die
index b005848321760b85624567a43105412c20c17212..85efdde7134f8d9d37ea9b7d4bb5f7d5f5963431 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -16,13 +16,22 @@ SRC_URI="https://download.electrum.org/${PV}/${MY_P}.tar.gz"
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-LINGUAS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO ru_RU sk_SK sl_SI ta_IN th_TH tr_TR vi_VN zh_CN"
+MY_LANGS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO ru_RU sk_SK sl_SI ta_IN th_TH tr_TR vi_VN zh_CN"
+
+my_langs_to_l10n() {
+       # Map all except pt_* and zh_* to their generic codes
+       case $1 in
+               pt_*|zh_*) echo ${1/_/-} ;;
+               *) echo ${1%%_*} ;;
+       esac
+}
 
 IUSE="audio_modem cli cosign digitalbitbox email greenaddress_it ncurses qrcode +qt4 sync trustedcoin_com vkb"
 
-for lingua in ${LINGUAS}; do
-       IUSE+=" linguas_${lingua}"
+for lang in ${MY_LANGS}; do
+       IUSE+=" l10n_$(my_langs_to_l10n ${lang})"
 done
+unset lang
 
 REQUIRED_USE="
        || ( cli ncurses qt4 )
@@ -74,17 +83,18 @@ src_prepare() {
        sed -i '/icons/d' setup.py || die
 
        # Remove unrequested localization files:
-       for lang in ${LINGUAS}; do
-               use "linguas_${lang}" && continue
+       local lang
+       for lang in ${MY_LANGS}; do
+               use l10n_$(my_langs_to_l10n ${lang}) && continue
                rm -r "lib/locale/${lang}" || die
        done
 
        local wordlist=
        for wordlist in  \
-               $(usex linguas_ja_JP '' japanese) \
-               $(usex linguas_pt_BR '' $(usex linguas_pt_PT '' portuguese)) \
-               $(usex linguas_es_ES '' spanish) \
-               $(usex linguas_zh_CN '' chinese_simplified) \
+               $(usex l10n_ja    '' japanese) \
+               $(usex l10n_pt-BR '' $(usex l10n_pt-PT '' portuguese)) \
+               $(usex l10n_es    '' spanish) \
+               $(usex l10n_zh-CN '' chinese_simplified) \
        ; do
                rm -f "lib/wordlist/${wordlist}.txt" || die
                sed -i "/${wordlist}\\.txt/d" lib/mnemonic.py || die
index 82aa0e5d8a49906efa053f878794ce0a434408ee..01a96e470f0534ebc8d0c15f4c14f1db1fcc6121 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -16,13 +16,22 @@ SRC_URI="https://download.electrum.org/${PV}/${MY_P}.tar.gz"
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-LINGUAS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO ru_RU sk_SK sl_SI ta_IN th_TH tr_TR vi_VN zh_CN"
+MY_LANGS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO ru_RU sk_SK sl_SI ta_IN th_TH tr_TR vi_VN zh_CN zh_TW"
+
+my_langs_to_l10n() {
+       # Map all except pt_* and zh_* to their generic codes
+       case $1 in
+               pt_*|zh_*) echo ${1/_/-} ;;
+               *) echo ${1%%_*} ;;
+       esac
+}
 
 IUSE="audio_modem cli cosign digitalbitbox email greenaddress_it ncurses qrcode +qt4 sync trustedcoin_com vkb"
 
-for lingua in ${LINGUAS}; do
-       IUSE+=" linguas_${lingua}"
+for lang in ${MY_LANGS}; do
+       IUSE+=" l10n_$(my_langs_to_l10n ${lang})"
 done
+unset lang
 
 REQUIRED_USE="
        || ( cli ncurses qt4 )
@@ -74,17 +83,18 @@ src_prepare() {
        sed -i '/icons/d' setup.py || die
 
        # Remove unrequested localization files:
-       for lang in ${LINGUAS}; do
-               use "linguas_${lang}" && continue
+       local lang
+       for lang in ${MY_LANGS}; do
+               use l10n_$(my_langs_to_l10n ${lang}) && continue
                rm -r "lib/locale/${lang}" || die
        done
 
        local wordlist=
        for wordlist in  \
-               $(usex linguas_ja_JP '' japanese) \
-               $(usex linguas_pt_BR '' $(usex linguas_pt_PT '' portuguese)) \
-               $(usex linguas_es_ES '' spanish) \
-               $(usex linguas_zh_CN '' chinese_simplified) \
+               $(usex l10n_ja    '' japanese) \
+               $(usex l10n_pt-BR '' $(usex l10n_pt-PT '' portuguese)) \
+               $(usex l10n_es    '' spanish) \
+               $(usex l10n_zh-CN '' chinese_simplified) \
        ; do
                rm -f "lib/wordlist/${wordlist}.txt" || die
                sed -i "/${wordlist}\\.txt/d" lib/mnemonic.py || die
index 82aa0e5d8a49906efa053f878794ce0a434408ee..312903f737a6e52af11c6cc99c8ee2e7078ed450 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -16,13 +16,22 @@ SRC_URI="https://download.electrum.org/${PV}/${MY_P}.tar.gz"
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-LINGUAS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO ru_RU sk_SK sl_SI ta_IN th_TH tr_TR vi_VN zh_CN"
+MY_LANGS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO ru_RU sk_SK sl_SI ta_IN th_TH tr_TR uk_UA vi_VN zh_CN zh_TW"
+
+my_langs_to_l10n() {
+       # Map all except pt_* and zh_* to their generic codes
+       case $1 in
+               pt_*|zh_*) echo ${1/_/-} ;;
+               *) echo ${1%%_*} ;;
+       esac
+}
 
 IUSE="audio_modem cli cosign digitalbitbox email greenaddress_it ncurses qrcode +qt4 sync trustedcoin_com vkb"
 
-for lingua in ${LINGUAS}; do
-       IUSE+=" linguas_${lingua}"
+for lang in ${MY_LANGS}; do
+       IUSE+=" l10n_$(my_langs_to_l10n ${lang})"
 done
+unset lang
 
 REQUIRED_USE="
        || ( cli ncurses qt4 )
@@ -74,17 +83,18 @@ src_prepare() {
        sed -i '/icons/d' setup.py || die
 
        # Remove unrequested localization files:
-       for lang in ${LINGUAS}; do
-               use "linguas_${lang}" && continue
+       local lang
+       for lang in ${MY_LANGS}; do
+               use l10n_$(my_langs_to_l10n ${lang}) && continue
                rm -r "lib/locale/${lang}" || die
        done
 
        local wordlist=
        for wordlist in  \
-               $(usex linguas_ja_JP '' japanese) \
-               $(usex linguas_pt_BR '' $(usex linguas_pt_PT '' portuguese)) \
-               $(usex linguas_es_ES '' spanish) \
-               $(usex linguas_zh_CN '' chinese_simplified) \
+               $(usex l10n_ja    '' japanese) \
+               $(usex l10n_pt-BR '' $(usex l10n_pt-PT '' portuguese)) \
+               $(usex l10n_es    '' spanish) \
+               $(usex l10n_zh-CN '' chinese_simplified) \
        ; do
                rm -f "lib/wordlist/${wordlist}.txt" || die
                sed -i "/${wordlist}\\.txt/d" lib/mnemonic.py || die
index 82aa0e5d8a49906efa053f878794ce0a434408ee..312903f737a6e52af11c6cc99c8ee2e7078ed450 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -16,13 +16,22 @@ SRC_URI="https://download.electrum.org/${PV}/${MY_P}.tar.gz"
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-LINGUAS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO ru_RU sk_SK sl_SI ta_IN th_TH tr_TR vi_VN zh_CN"
+MY_LANGS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL no_NO pl_PL pt_BR pt_PT ro_RO ru_RU sk_SK sl_SI ta_IN th_TH tr_TR uk_UA vi_VN zh_CN zh_TW"
+
+my_langs_to_l10n() {
+       # Map all except pt_* and zh_* to their generic codes
+       case $1 in
+               pt_*|zh_*) echo ${1/_/-} ;;
+               *) echo ${1%%_*} ;;
+       esac
+}
 
 IUSE="audio_modem cli cosign digitalbitbox email greenaddress_it ncurses qrcode +qt4 sync trustedcoin_com vkb"
 
-for lingua in ${LINGUAS}; do
-       IUSE+=" linguas_${lingua}"
+for lang in ${MY_LANGS}; do
+       IUSE+=" l10n_$(my_langs_to_l10n ${lang})"
 done
+unset lang
 
 REQUIRED_USE="
        || ( cli ncurses qt4 )
@@ -74,17 +83,18 @@ src_prepare() {
        sed -i '/icons/d' setup.py || die
 
        # Remove unrequested localization files:
-       for lang in ${LINGUAS}; do
-               use "linguas_${lang}" && continue
+       local lang
+       for lang in ${MY_LANGS}; do
+               use l10n_$(my_langs_to_l10n ${lang}) && continue
                rm -r "lib/locale/${lang}" || die
        done
 
        local wordlist=
        for wordlist in  \
-               $(usex linguas_ja_JP '' japanese) \
-               $(usex linguas_pt_BR '' $(usex linguas_pt_PT '' portuguese)) \
-               $(usex linguas_es_ES '' spanish) \
-               $(usex linguas_zh_CN '' chinese_simplified) \
+               $(usex l10n_ja    '' japanese) \
+               $(usex l10n_pt-BR '' $(usex l10n_pt-PT '' portuguese)) \
+               $(usex l10n_es    '' spanish) \
+               $(usex l10n_zh-CN '' chinese_simplified) \
        ; do
                rm -f "lib/wordlist/${wordlist}.txt" || die
                sed -i "/${wordlist}\\.txt/d" lib/mnemonic.py || die
index aca1ddb7cae8745ef3405cbee349e5001350e03b..2b62832e8ba6ef626d61bbe311afd66c1a6eaf3e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -16,13 +16,22 @@ SRC_URI="https://download.electrum.org/${PV}/${MY_P}.tar.gz"
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-LINGUAS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL pl_PL pt_BR pt_PT ro_RO ru_RU sk_SK sl_SI ta_IN th_TH tr_TR vi_VN zh_CN"
+MY_LANGS="ar_SA bg_BG cs_CZ da_DK de_DE el_GR eo_UY es_ES fa_IR fr_FR hu_HU hy_AM id_ID it_IT ja_JP ko_KR ky_KG lv_LV nb_NO nl_NL pl_PL pt_BR pt_PT ro_RO ru_RU sk_SK sl_SI ta_IN th_TH tr_TR uk_UA vi_VN zh_CN zh_TW"
+
+my_langs_to_l10n() {
+       # Map all except pt_* and zh_* to their generic codes
+       case $1 in
+               pt_*|zh_*) echo ${1/_/-} ;;
+               *) echo ${1%%_*} ;;
+       esac
+}
 
 IUSE="audio_modem cli cosign digitalbitbox email greenaddress_it ncurses qrcode +qt5 sync trustedcoin_com vkb"
 
-for lingua in ${LINGUAS}; do
-       IUSE+=" linguas_${lingua}"
+for lang in ${MY_LANGS}; do
+       IUSE+=" l10n_$(my_langs_to_l10n ${lang})"
 done
+unset lang
 
 REQUIRED_USE="
        || ( cli ncurses qt5 )
@@ -71,17 +80,18 @@ src_prepare() {
        sed -i '/icons/d' setup.py || die
 
        # Remove unrequested localization files:
-       for lang in ${LINGUAS}; do
-               use "linguas_${lang}" && continue
+       local lang
+       for lang in ${MY_LANGS}; do
+               use l10n_$(my_langs_to_l10n ${lang}) && continue
                rm -r "lib/locale/${lang}" || die
        done
 
        local wordlist=
        for wordlist in  \
-               $(usex linguas_ja_JP '' japanese) \
-               $(usex linguas_pt_BR '' $(usex linguas_pt_PT '' portuguese)) \
-               $(usex linguas_es_ES '' spanish) \
-               $(usex linguas_zh_CN '' chinese_simplified) \
+               $(usex l10n_ja    '' japanese) \
+               $(usex l10n_pt-BR '' $(usex l10n_pt-PT '' portuguese)) \
+               $(usex l10n_es    '' spanish) \
+               $(usex l10n_zh-CN '' chinese_simplified) \
        ; do
                rm -f "lib/wordlist/${wordlist}.txt" || die
                sed -i "/${wordlist}\\.txt/d" lib/mnemonic.py || die