Skip to content

Commit 1ffbe82

Browse files
committed
[fix] : Fixed getting missing locale
Thank you @cymq https://twitter.com/cymq0686/status/1413852055970541568
1 parent a7dfe96 commit 1ffbe82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/locale.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ gen_locale_list() {
4646
exit 1
4747
fi
4848
local _locale
49-
for _locale in $(grep -h -v ^'#' "${script_path}/system/locale-${arch}" | getclm 1); do
49+
for _locale in $(grep -h -v ^'#' "${script_path}/system/locale-${arch}" | grep -v ^$ | getclm 1); do
5050
localelist+=("${_locale}")
5151
done
5252
}
@@ -85,7 +85,7 @@ get() {
8585

8686
# 選択されたロケールの設定が描かれた行番号を取得
8787
_locale_config_file="${script_path}/system/locale-${arch}"
88-
readarray -t _locale_name_list < <(grep -h -v ^'#' "${_locale_config_file}" | awk '{print $1}')
88+
readarray -t _locale_name_list < <(grep -h -v ^'#' "${_locale_config_file}" | grep -v ^$ | awk '{print $1}')
8989
_get_locale_line_number() {
9090
local _lang _count=0
9191
for _lang in "${_locale_name_list[@]}"; do

0 commit comments

Comments
 (0)