Compare commits

..

3 commits

Author SHA1 Message Date
7c181c84fb
locale/effective
Some checks failed
/ arch (push) Successful in 2m55s
/ alpine (push) Failing after 8s
/ fedora (push) Successful in 11m11s
/ opensuse (push) Successful in 3m41s
/ alma (push) Successful in 12m43s
/ rocky (push) Successful in 13m27s
/ ubuntu (push) Successful in 6m29s
/ debian (push) Failing after 3m30s
2024-09-03 19:23:04 +02:00
a1809e2094
−tasks/available 2024-09-03 19:18:38 +02:00
56c291ee27
spcd_txt_locales_echo 2024-09-03 19:17:08 +02:00
2 changed files with 13 additions and 8 deletions

View file

@ -222,13 +222,6 @@ Handle project workflows in a unified way:
#### Shell
* comment
* display locales
* default
* available
* effective
* selected
* available
* effective
* handle errors
* packages
* configure

View file

@ -378,8 +378,9 @@ spcd_txt_get() {
}
spcd_txt_locale() {
local value name
locale
spcd_split
local value name
if [ -n "${1}" ]; then
value="${1}"
else
@ -407,11 +408,20 @@ spcd_txt_locale() {
locale
}
spcd_txt_locales_echo() {
case "${1}" in
"LANGUAGE") spcd_os_printenv "LANGUAGE" ;;
*) locale -a ;;
esac
}
spcd_txt_locales() {
set -- \
"${SPCD_TXT_LOCALE_ENGLISH}" \
"${SPCD_TXT_LOCALE_FRENCH}"
local language locale text
spcd_txt_locales_echo
spcd_split
for locale in "${@}"; do
case "${1}" in
"glibc-langpack-")
@ -438,6 +448,8 @@ ${locale}.${_SPCD_TXT_CHARSET} ${_SPCD_TXT_CHARSET}
"locale.gen") spcd_os_write "/etc/locale.gen" "${text}" ;;
*) ;;
esac
spcd_split
spcd_txt_locales_echo
}
# ╭──────╮