summaryrefslogtreecommitdiff
path: root/eclass/l10n.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-19 20:11:46 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-19 20:11:46 +0000
commit5b5df25227111ef465caf5c52bcfb66dac3219cd (patch)
tree31b713cac6188358125cbb66b8804030328740f0 /eclass/l10n.eclass
parent02e2208f46f4e2c00fb9743cbc47350bdd233bfa (diff)
gentoo resync : 19.01.2018
Diffstat (limited to 'eclass/l10n.eclass')
-rw-r--r--eclass/l10n.eclass26
1 files changed, 11 insertions, 15 deletions
diff --git a/eclass/l10n.eclass b/eclass/l10n.eclass
index 4b0111934d72..82f4ab113f52 100644
--- a/eclass/l10n.eclass
+++ b/eclass/l10n.eclass
@@ -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
# @ECLASS: l10n.eclass
@@ -102,26 +102,22 @@ l10n_find_plocales_changes() {
# are selected, fall back on PLOCALE_BACKUP. When the disabled argument
# is given, return the disabled locales instead of the enabled ones.
l10n_get_locales() {
- local disabled_locales enabled_locales loc locs
+ local loc locs
if [[ -z ${LINGUAS+set} ]]; then
# enable all if unset
- enabled_locales=${PLOCALES}
- elif [[ -z ${LINGUAS} ]]; then
- # disable all if empty
- disabled_locales=${PLOCALES}
+ locs=${PLOCALES}
else
- for loc in ${PLOCALES}; do
- if has ${loc} ${LINGUAS}; then
- enabled_locales+="${loc} "
- else
- disabled_locales+="${loc} "
- fi
+ for loc in ${LINGUAS}; do
+ has ${loc} ${PLOCALES} && locs+="${loc} "
done
fi
+ [[ -z ${locs} ]] && locs=${PLOCALE_BACKUP}
if [[ ${1} == disabled ]]; then
- locs=${disabled_locales}
- else
- locs=${enabled_locales:-${PLOCALE_BACKUP}}
+ local disabled_locs
+ for loc in ${PLOCALES}; do
+ has ${loc} ${locs} || disabled_locs+="${loc} "
+ done
+ locs=${disabled_locs}
fi
printf "%s" "${locs}"
}