Send Global back to the VT, keep a US keyboard in the CJK console and translate the media diagnosis

This commit is contained in:
ZacharyZhang-NY committed 2026-10-06 18:44:49 -04:00
1 parent 555093811f
commit 02c803cb40
5 files changed
+103 -37

No files matched your search

+8 -2
View File
@@ -1,7 +1,6 @@
#!/bin/bash
#
# China installs read in Chinese: every text the configurator and the install
# dashboard pass to omarchy_text needs an OMARCHY_ZH entry, or it shows in English.
# Every installer text needs an OMARCHY_ZH entry, or a China install shows it in English.
set -euo pipefail
@@ -39,6 +38,13 @@ for action in "View full log" "Drop to shell" "Reboot" "Power off" "Upload log f
done
printf 'ok - labels passed through variables have Chinese entries\n'
mapfile -t diagnosis < <(grep -x ' *echo "[^"$]*"' "$ROOT/configs/airootfs/usr/local/bin/omarchy-install-diagnose-media" | sed 's/^ *echo "//; s/"$//')
((${#diagnosis[@]} >= 10)) || fail "the media diagnosis sentences are found" "found ${#diagnosis[@]}"
for line in "${diagnosis[@]}"; do
[[ -n ${OMARCHY_ZH[$line]:-} ]] || fail "every media diagnosis sentence has a Chinese entry" "missing: $line"
done
printf 'ok - every media diagnosis sentence has a Chinese entry\n'
[[ $(OMARCHY_INSTALL_LANG=zh omarchy_text "Confirm overwriting %s" /dev/vda) == "确认覆盖 /dev/vda" ]] ||
fail "Chinese text keeps its printf arguments"
[[ $(omarchy_text "Confirm overwriting %s" /dev/vda) == "Confirm overwriting /dev/vda" ]] ||