spcd_txt_locale
Some checks failed
/ arch (push) Successful in 2m54s
/ alpine (push) Successful in 2m27s
/ fedora (push) Successful in 11m42s
/ opensuse (push) Successful in 3m41s
/ alma (push) Successful in 12m23s
/ rocky (push) Successful in 11m47s
/ ubuntu (push) Successful in 6m28s
/ debian (push) Failing after 3m37s

This commit is contained in:
Marc Beninca 2024-09-04 12:07:25 +02:00
parent 7c181c84fb
commit 18de897329
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -378,15 +378,6 @@ spcd_txt_get() {
}
spcd_txt_locale() {
locale
spcd_split
local value name
if [ -n "${1}" ]; then
value="${1}"
else
value="${_SPCD_TXT_LOCALE_DEFAULT}"
fi
value="${value}.${_SPCD_TXT_CHARSET}"
set -- \
"LANG" \
"LC_CTYPE" \
@ -401,18 +392,30 @@ spcd_txt_locale() {
"LC_TELEPHONE" \
"LC_MEASUREMENT" \
"LC_IDENTIFICATION"
local value name
if [ "${1}" = "set" ]; then
if [ -n "${2}" ]; then
value="${2}"
else
value="${_SPCD_TXT_LOCALE_DEFAULT}"
fi
value="${value}.${_SPCD_TXT_CHARSET}"
fi
for name in "${@}"; do
export "${name}=${value}"
case "${1}" in
"list") spcd_os_printenv "${name}" ;;
"set") export "${name}=${value}" ;;
*) ;;
esac
done
spcd_split
locale
if [ "${1}" = "set" ]; then
spcd_txt_locale "list"
fi
}
spcd_txt_locales_echo() {
case "${1}" in
"LANGUAGE") spcd_os_printenv "LANGUAGE" ;;
*) locale -a ;;
esac
spcd_os_printenv "LANGUAGE"
locale --all-locales
}
spcd_txt_locales() {
@ -1257,7 +1260,7 @@ spcd_step__packages_install_locales() {
*) ;;
esac
spcd_txt_locales "LANGUAGE"
spcd_txt_locale "${SPCD_TXT_LOCALE}"
spcd_txt_locale "set" "${SPCD_TXT_LOCALE}"
}
spcd_step__packages_upgrade_system() {
@ -1459,7 +1462,7 @@ ${SPCD_PYTHON_ALIAS} / ${name}"
spcd_main() {
# environment
spcd_txt_locale
spcd_txt_locale "set"
#
spcd_step_in "Environment"
spcd_step_in "Defaults"