factorize/locales
Some checks failed
/ arch (push) Failing after 8s
/ alpine (push) Failing after 8s
/ fedora (push) Failing after 7s
/ opensuse (push) Failing after 8s
/ alma (push) Failing after 8s
/ rocky (push) Failing after 7s
/ ubuntu (push) Failing after 8s
/ debian (push) Failing after 6s

This commit is contained in:
Marc Beninca 2024-09-03 18:32:48 +02:00
parent a0122d5ea3
commit 7d61b7c431
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 15 additions and 21 deletions

View file

@ -229,8 +229,6 @@ Handle project workflows in a unified way:
* selected * selected
* available * available
* effective * effective
* factorize
* locales
* handle errors * handle errors
* packages * packages
* configure * configure

View file

@ -411,37 +411,33 @@ spcd_txt_locales() {
set -- \ set -- \
"${SPCD_TXT_LOCALE_ENGLISH}" \ "${SPCD_TXT_LOCALE_ENGLISH}" \
"${SPCD_TXT_LOCALE_FRENCH}" "${SPCD_TXT_LOCALE_FRENCH}"
local locale local language locale text
for locale in "${@}"; do
case "${1}" in case "${1}" in
"glibc-langpack-") "glibc-langpack-")
local language
for locale in "${@}"; do
language="$(echo "${locale}" | cut -d _ -f 1)" language="$(echo "${locale}" | cut -d _ -f 1)"
spcd_install_package "glibc-langpack-${language}" spcd_install_package "glibc-langpack-${language}"
done
;; ;;
"LANGUAGE") "LANGUAGE")
local text
for locale in "${@}"; do
if [ -n "${text}" ]; then if [ -n "${text}" ]; then
text="${text}:${locale}" text="${text}:${locale}"
else else
text="${locale}" text="${locale}"
fi fi
done
export LANGUAGE="${text}"
;; ;;
"locale.gen") "locale.gen")
local text
for locale in "${@}"; do
text="${text}\ text="${text}\
${locale}.${_SPCD_TXT_CHARSET} ${_SPCD_TXT_CHARSET} ${locale}.${_SPCD_TXT_CHARSET} ${_SPCD_TXT_CHARSET}
" "
done
spcd_os_write "/etc/locale.gen" "${text}"
;; ;;
*) ;; *) ;;
esac esac
done
case "${1}" in
"LANGUAGE") export LANGUAGE="${text}" ;;
"locale.gen") spcd_os_write "/etc/locale.gen" "${text}" ;;
*) ;;
esac
} }
# ╭──────╮ # ╭──────╮