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
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:
parent
7c181c84fb
commit
18de897329
1 changed files with 21 additions and 18 deletions
|
@ -378,15 +378,6 @@ spcd_txt_get() {
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_txt_locale() {
|
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 -- \
|
set -- \
|
||||||
"LANG" \
|
"LANG" \
|
||||||
"LC_CTYPE" \
|
"LC_CTYPE" \
|
||||||
|
@ -401,18 +392,30 @@ spcd_txt_locale() {
|
||||||
"LC_TELEPHONE" \
|
"LC_TELEPHONE" \
|
||||||
"LC_MEASUREMENT" \
|
"LC_MEASUREMENT" \
|
||||||
"LC_IDENTIFICATION"
|
"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
|
for name in "${@}"; do
|
||||||
export "${name}=${value}"
|
case "${1}" in
|
||||||
|
"list") spcd_os_printenv "${name}" ;;
|
||||||
|
"set") export "${name}=${value}" ;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
spcd_split
|
if [ "${1}" = "set" ]; then
|
||||||
locale
|
spcd_txt_locale "list"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_txt_locales_echo() {
|
spcd_txt_locales_echo() {
|
||||||
case "${1}" in
|
spcd_os_printenv "LANGUAGE"
|
||||||
"LANGUAGE") spcd_os_printenv "LANGUAGE" ;;
|
locale --all-locales
|
||||||
*) locale -a ;;
|
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_txt_locales() {
|
spcd_txt_locales() {
|
||||||
|
@ -1257,7 +1260,7 @@ spcd_step__packages_install_locales() {
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
spcd_txt_locales "LANGUAGE"
|
spcd_txt_locales "LANGUAGE"
|
||||||
spcd_txt_locale "${SPCD_TXT_LOCALE}"
|
spcd_txt_locale "set" "${SPCD_TXT_LOCALE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_step__packages_upgrade_system() {
|
spcd_step__packages_upgrade_system() {
|
||||||
|
@ -1459,7 +1462,7 @@ ${SPCD_PYTHON_ALIAS} / ${name}"
|
||||||
|
|
||||||
spcd_main() {
|
spcd_main() {
|
||||||
# environment
|
# environment
|
||||||
spcd_txt_locale
|
spcd_txt_locale "set"
|
||||||
#
|
#
|
||||||
spcd_step_in "Environment"
|
spcd_step_in "Environment"
|
||||||
spcd_step_in "Defaults"
|
spcd_step_in "Defaults"
|
||||||
|
|
Loading…
Reference in a new issue