locale/show
This commit is contained in:
parent
4e645dfc0c
commit
11c144c7c3
2 changed files with 27 additions and 36 deletions
|
@ -239,7 +239,6 @@ Handle project workflows in a unified way:
|
|||
* locales
|
||||
* persist
|
||||
* restrict LC_* variables set for alpine
|
||||
* test LC_* variables
|
||||
* test
|
||||
|
||||
#### Shell → Python
|
||||
|
|
|
@ -915,6 +915,31 @@ spcd_txt_locale() {
|
|||
spcd_split
|
||||
spcd_txt_locale "list"
|
||||
;;
|
||||
"show")
|
||||
local regex
|
||||
for name in "${@}"; do
|
||||
case "${name}" in
|
||||
# LC_CTYPE
|
||||
"LC_NUMERIC") regex="^\(decimal\|thousands\|grouping\)" ;;
|
||||
"LC_TIME") regex="^\(day\|mon\)" ;;
|
||||
# LC_COLLATE
|
||||
"LC_MONETARY") regex="^\(int_curr\|currency\|mon_\)" ;;
|
||||
"LC_MESSAGES") regex="^\(yes\|no\)" ;;
|
||||
"LC_PAPER") regex="^\(height\|width\)" ;;
|
||||
"LC_NAME") regex="^name_m" ;;
|
||||
"LC_ADDRESS") regex="^\(country\|lang\)_name" ;;
|
||||
"LC_TELEPHONE") regex="^int_" ;;
|
||||
"LC_MEASUREMENT") regex="^measurement=" ;;
|
||||
"LC_IDENTIFICATION") regex="^\(language\|territory\|title\)" ;;
|
||||
*) ;;
|
||||
esac
|
||||
spcd_split
|
||||
echo "${name}"
|
||||
if [ -n "${regex}" ]; then
|
||||
locale --keyword-name "${name}" | grep "${regex}"
|
||||
fi
|
||||
done
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
}
|
||||
|
@ -1231,41 +1256,8 @@ spcd_step__packages_install_locales() {
|
|||
spcd_txt_locales "install"
|
||||
spcd_step "Set"
|
||||
spcd_txt_locale "set" "${SPCD_TXT_LOCALE}"
|
||||
spcd_step "Test"
|
||||
# CTYPE
|
||||
# NUMERIC
|
||||
spcd_split
|
||||
locale --keyword-name LC_NUMERIC | grep "^\(decimal\|thousands\|grouping\)"
|
||||
# TIME
|
||||
spcd_split
|
||||
locale --keyword-name LC_TIME | grep "^\(day\|mon\)"
|
||||
# COLLATE
|
||||
# MONETARY
|
||||
spcd_split
|
||||
locale --keyword-name LC_MONETARY | grep "^\(int_curr\|currency\|mon_\)"
|
||||
# MESSAGES
|
||||
spcd_split
|
||||
locale --keyword-name LC_MESSAGES | grep "^\(yes\|no\)"
|
||||
#
|
||||
# PAPER
|
||||
spcd_split
|
||||
locale --keyword-name LC_PAPER | grep "^\(height\|width\)"
|
||||
# NAME
|
||||
spcd_split
|
||||
locale --keyword-name LC_NAME | grep "^name_m"
|
||||
# ADDRESS
|
||||
spcd_split
|
||||
locale --keyword-name LC_ADDRESS | grep "^\(country\|lang\)_name"
|
||||
# TELEPHONE
|
||||
spcd_split
|
||||
locale --keyword-name LC_TELEPHONE | grep "^int_"
|
||||
# MEASUREMENT
|
||||
spcd_split
|
||||
locale --keyword-name LC_MEASUREMENT | grep "^measurement="
|
||||
# IDENTIFICATION
|
||||
spcd_split
|
||||
locale --keyword-name LC_IDENTIFICATION |
|
||||
grep "^\(language\|territory\|title\)"
|
||||
spcd_step "Show"
|
||||
spcd_txt_locale "show"
|
||||
spcd_step_out
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue