mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
add locale selection on configure step
This commit is contained in:
parent
849b220f38
commit
6bc93689b7
2 changed files with 15 additions and 0 deletions
|
@ -102,6 +102,7 @@ configure_system() {
|
||||||
## END PREPROCESS ##
|
## END PREPROCESS ##
|
||||||
geteditor || return 1
|
geteditor || return 1
|
||||||
check_root_password || return 1
|
check_root_password || return 1
|
||||||
|
set_locale || return 1
|
||||||
FILE=""
|
FILE=""
|
||||||
S_CONFIG=""
|
S_CONFIG=""
|
||||||
# main menu loop
|
# main menu loop
|
||||||
|
|
|
@ -27,6 +27,20 @@ set_mkinitcpio() {
|
||||||
}
|
}
|
||||||
|
|
||||||
set_locale() {
|
set_locale() {
|
||||||
|
if [[ ${SET_LOCALE} == "" ]]; then
|
||||||
|
LOCALES="en_US English de_DE German es_ES Spanish fr_FR French pt_PT Portuguese ru_RU Russian OTHER More"
|
||||||
|
OTHER_LOCALES="$(grep 'UTF' ${DESTDIR}/etc/locale.gen | sed -e 's:#::g' -e 's: UTF-8.*$::g')"
|
||||||
|
#shellcheck disable=SC2086
|
||||||
|
DIALOG --menu "Select A Locale:" 14 30 8 ${LOCALES} 2>${ANSWER} || return 1
|
||||||
|
set_locale=$(cat ${ANSWER})
|
||||||
|
if [[ "${set_locale}" == "OTHER" ]]; then
|
||||||
|
#shellcheck disable=SC2086
|
||||||
|
DIALOG --menu "Select A Locale:" 18 30 12 ${OTHER_LOCALES} 2>${ANSWER} || return 1
|
||||||
|
set_locale=$(cat ${ANSWER})
|
||||||
|
fi
|
||||||
|
sed -i -e "s#LANG=.*#LANG=${set_locale}#g" "${DESTDIR}"/etc/locale.conf
|
||||||
|
SET_LOCALE="1"
|
||||||
|
fi
|
||||||
# enable glibc locales from locale.conf
|
# enable glibc locales from locale.conf
|
||||||
#shellcheck disable=SC2013
|
#shellcheck disable=SC2013
|
||||||
for i in $(grep "^LANG" "${DESTDIR}"/etc/locale.conf | sed -e 's/.*=//g' -e's/\..*//g'); do
|
for i in $(grep "^LANG" "${DESTDIR}"/etc/locale.conf | sed -e 's/.*=//g' -e's/\..*//g'); do
|
||||||
|
|
Loading…
Reference in a new issue