install locales
This commit is contained in:
parent
90eb95f28b
commit
ad043c978b
1 changed files with 32 additions and 0 deletions
|
@ -1158,6 +1158,34 @@ spcd_step__packages_verify_https() {
|
|||
fi
|
||||
}
|
||||
|
||||
spcd_step__packages_install_locales() {
|
||||
spcd_step "Install locales"
|
||||
case "${SPCD_PM}" in
|
||||
"${SPCD_PM_APK}") spcd_install_package "musl-locales" ;;
|
||||
"${SPCD_PM_APT}")
|
||||
unset spcd_step__pil__text
|
||||
for spcd_step__pil__locale in "${@}"; do
|
||||
spcd_step__pil__text="${spcd_step__pil__text}\
|
||||
${spcd_step__pil__locale}.${_SPCD_TXT_CHARSET} ${_SPCD_TXT_CHARSET}
|
||||
"
|
||||
done
|
||||
spcd_os_write "/etc/locale.gen" "${spcd_step__pil__text}"
|
||||
spcd_install_package "locales"
|
||||
;;
|
||||
"${SPCD_PM_DNF}")
|
||||
for spcd_step__pil__locale in "${@}"; do
|
||||
spcd_step__pil__lang="$(
|
||||
echo "${spcd_step__pil__locale}" | cut -d _ -f 2
|
||||
)"
|
||||
spcd_install_package "glibc-langpack-${spcd_step__pil__lang}"
|
||||
done
|
||||
;;
|
||||
"${SPCD_PM_PACMAN}") spcd_install_package "glibc-locales" ;;
|
||||
"${SPCD_PM_ZYPPER}") spcd_install_package "glibc-locale" ;;
|
||||
*) ;;
|
||||
esac
|
||||
}
|
||||
|
||||
spcd_step__packages_upgrade_system() {
|
||||
spcd_step "Upgrade system"
|
||||
case "${SPCD_PM}" in
|
||||
|
@ -1352,6 +1380,9 @@ ${SPCD_PYTHON_ALIAS} / ${spcd_stp__name}"
|
|||
# ╰──────╯
|
||||
|
||||
spcd_main() {
|
||||
set -- \
|
||||
"${_SPCD_TXT_LANGUAGE_ENGLISH}" \
|
||||
"${_SPCD_TXT_LANGUAGE_FRENCH}"
|
||||
# environment
|
||||
spcd_txt_locale
|
||||
#
|
||||
|
@ -1385,6 +1416,7 @@ spcd_main() {
|
|||
# packages
|
||||
spcd_step_in "Packages"
|
||||
spcd_step__packages_verify_https
|
||||
spcd_step__packages_install_locales "${@}"
|
||||
spcd_step__packages_update_catalog
|
||||
spcd_step__packages_upgrade_system
|
||||
spcd_step__packages_install_dos2unix
|
||||
|
|
Loading…
Reference in a new issue