Split language from region: omarchy-language and Setup > Language own LANG
omarchy-region and install/config/region.sh no longer touch the locale; both logout prompts are worded through omarchy-text.
This commit is contained in:
1 parent
1824bc3066
commit
199a7f23fc
13 files changed
+157
-46
No files matched your search
@@ -44,10 +44,9 @@ printf 'LANG=en_US.UTF-8\nLC_TIME=en_DK.UTF-8\n' >"$root/etc/locale.conf"
|
||||
: >"$calls"
|
||||
OMARCHY_REGION=cn bash -e "$region_setup"
|
||||
[[ $(<"$root/etc/omarchy/region") == "cn" ]] || fail "install records the China region as cn"
|
||||
[[ $(<"$calls") == "locale-gen " ]] || fail "China generates the Chinese locale" "$(<"$calls")"
|
||||
[[ $(<"$root/etc/locale.gen") == $'zh_CN.UTF-8 UTF-8\nen_US.UTF-8 UTF-8' ]] || fail "China enables zh_CN in locale.gen"
|
||||
[[ $(<"$root/etc/locale.conf") == $'LANG=zh_CN.UTF-8\nLC_TIME=en_DK.UTF-8' ]] || fail "China sets LANG and keeps other locale settings" "$(<"$root/etc/locale.conf")"
|
||||
pass "install records the China region and sets the Chinese locale"
|
||||
[[ ! -s $calls && $(<"$root/etc/locale.gen") == $'#zh_CN.UTF-8 UTF-8\nen_US.UTF-8 UTF-8' && $(<"$root/etc/locale.conf") == $'LANG=en_US.UTF-8\nLC_TIME=en_DK.UTF-8' ]] ||
|
||||
fail "China leaves the language alone" "$(<"$root/etc/locale.conf")"
|
||||
pass "install records the China region and leaves the language alone"
|
||||
|
||||
for link in "environment.conf etc/environment.d/90-omarchy-china.conf" "cargo.toml .cargo/config.toml" "gemrc etc/gemrc"; do
|
||||
read -r source target <<<"$link"
|
||||
@@ -58,12 +57,10 @@ pass "China links the developer mirror drop-ins"
|
||||
: >"$calls"
|
||||
OMARCHY_REGION=global bash -e "$region_setup"
|
||||
[[ ! -e $root/etc/omarchy/region ]] || fail "install records Global by leaving no region file"
|
||||
[[ $(<"$root/etc/locale.conf") == $'LANG=en_US.UTF-8\nLC_TIME=en_DK.UTF-8' ]] || fail "Global turns a Chinese LANG back to English" "$(<"$root/etc/locale.conf")"
|
||||
printf 'LANG=de_DE.UTF-8\n' >"$root/etc/locale.conf"
|
||||
printf 'LANG=zh_CN.UTF-8\n' >"$root/etc/locale.conf"
|
||||
OMARCHY_REGION=global bash -e "$region_setup"
|
||||
[[ $(<"$root/etc/locale.conf") == "LANG=de_DE.UTF-8" ]] || fail "Global leaves a language China did not set"
|
||||
printf 'LANG=en_US.UTF-8\n' >"$root/etc/locale.conf"
|
||||
pass "the region sets the language and Global only undoes Chinese"
|
||||
[[ ! -s $calls && $(<"$root/etc/locale.conf") == "LANG=zh_CN.UTF-8" ]] || fail "Global keeps a Chinese language"
|
||||
pass "Global leaves the language alone"
|
||||
[[ ! -e $root/etc/environment.d/90-omarchy-china.conf && ! -e $root/.cargo/config.toml && ! -e $root/etc/gemrc ]] ||
|
||||
fail "Global removes the developer mirror drop-ins"
|
||||
pass "Global removes the developer mirror drop-ins"
|
||||
|
||||
Reference in new issue
Block a user