Compare commits
3 commits
7d61b7c431
...
7c181c84fb
Author | SHA1 | Date | |
---|---|---|---|
7c181c84fb | |||
a1809e2094 | |||
56c291ee27 |
2 changed files with 13 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
# ╭──────╮
|
||||
|
|
Loading…
Reference in a new issue