Align the China region to the official cn profile

The region value is cn, the China files live under default/regions/cn/, and
omarchy-apply-pacman renders pacman for every caller: the .cn twins of the
channel servers first, then .org, USTC and ArchLinuxCN. Switching to China
installs and trusts the ArchLinuxCN keyring. A migration renames china to cn
and repoints the drop-in links.
This commit is contained in:
ZacharyZhang-NY committed 2026-10-07 11:33:01 -04:00
1 parent d2e4a95aed
commit 9a57690e7d
20 files changed
+119 -99

No files matched your search

+5 -5
View File
@@ -130,10 +130,10 @@ pass "the form publishes the 0/1/130 status contract and leads with English (US)
run_prompt omarchy_prompt_region "0:China"
assert_status 0 "region prompt succeeds"
[[ $(field region) == "china" ]] || fail "region prompt stores China as china"
[[ $(field region) == "cn" ]] || fail "region prompt stores China as cn"
[[ $(<"$tmp_dir/stdin.1") == $'Global\nChina' ]] || fail "region prompt offers Global then China"
grep -qxF -- 'choose --selected Global --header Select region' "$GUM_ARGS" || fail "region prompt preselects Global on a fresh form"
REGION=china run_prompt omarchy_prompt_region "0:Global"
REGION=cn run_prompt omarchy_prompt_region "0:Global"
[[ $(field region) == "global" ]] || fail "region prompt stores Global as global"
grep -qxF -- 'choose --selected China --header Select region' "$GUM_ARGS" || fail "region prompt preselects the region chosen on an earlier visit"
pass "region prompt maps Global and China and preselects the current region"
@@ -149,13 +149,13 @@ pass "region prompt propagates Esc and Ctrl+C without dying under set -e"
OMARCHY_CJK_CONSOLE=1 run_prompt omarchy_prompt_region "0:China 中国"
assert_status 0 "region prompt succeeds in a CJK console"
[[ $(field region) == "china" ]] || fail "region prompt stores China 中国 as china"
[[ $(field region) == "cn" ]] || fail "region prompt stores China 中国 as cn"
[[ $(<"$tmp_dir/stdin.1") == $'Global\nChina 中国' ]] || fail "a CJK console offers the Chinese name"
grep -qxF -- 'choose --selected Global --header Select region · 选择区域' "$GUM_ARGS" || fail "a CJK console asks in both languages"
OMARCHY_CJK_CONSOLE=1 REGION=china run_prompt omarchy_prompt_region "0:Global"
OMARCHY_CJK_CONSOLE=1 REGION=cn run_prompt omarchy_prompt_region "0:Global"
[[ $(field region) == "global" ]] || fail "region prompt stores Global as global in a CJK console"
grep -qxF -- 'choose --selected China 中国 --header Select region · 选择区域' "$GUM_ARGS" || fail "a CJK console preselects China by its shown name"
pass "a CJK console names China in Chinese and maps it back to china"
pass "a CJK console names China in Chinese and maps it back to cn"
# Keyboard