Add a Setup > Region toggle with Chinese sources, language and input method - #9548
Open
ZacharyZhang-NY wants to merge 1 commit into
Open
Add a Setup > Region toggle with Chinese sources, language and input method#9548ZacharyZhang-NY wants to merge 1 commit into
ZacharyZhang-NY wants to merge 1 commit into
Conversation
…method `omarchy region china` points npm, pip, cargo, go and gem at fast Chinese mirrors, switches the system language to zh_CN (generated on demand, live from the next login) and sets up the Rime Ice Chinese input method through Andy Stewart's rime-ice-installer (AUR) — syncing the repo databases first, since a fresh install has none until its first update — whose TUI drives its own sudo and fcitx5 restart on the plumbing Omarchy already ships, then makes Rime the active default with Ctrl+Space pinned as the toggle, and dresses the Omarchy menu in Chinese labels through the stock user-extension overlay; `omarchy region world` takes the source overrides back out, returns the language to en_US and the menu extension to its shipped sample only when they are what Omarchy set, and leaves the input method alone. Every target is checked before anything is touched — a value someone else configured refuses the whole switch rather than being overwritten, restores remove exactly the values Omarchy wrote, and file permissions survive the rewrite. The Arch and Omarchy mirrors themselves wait on the Chinese mirror infrastructure, and omarchy-region joins the menu's guard readers since two rows read it. The overlay also surfaced that mergeMenuSources never implemented the documented field-level override — a label-only user entry clobbered actions and providers with defaults, hiding those rows — so the merge now applies only the fields a file declares. Co-authored-by: Andy Stewart <lazycat.manatee@gmail.com>
huacnlee
reviewed
Sep 1, 2026
| "style.bar.position": {"label":"位置"}, | ||
| "style.bar.transparency": {"label":"透明"}, | ||
| "style.screensaver": {"label":"屏保"}, | ||
| "style.about": {"label":"关于页"}, |
Laotree
reviewed
Sep 1, 2026
| "update.password": {"label":"密码"}, | ||
| "update.timezone": {"label":"时区"}, | ||
| "update.time": {"label":"时间"}, | ||
| "update.channel.stable": {"label":"稳定 Stable"}, |
huacnlee
reviewed
Sep 1, 2026
| "setup.security.passwordless-sudo": {"label":"免密 sudo"}, | ||
| "setup.security.sudoless-docker": {"label":"免 sudo Docker"}, | ||
| "setup.direct-boot": {"label":"直接启动"}, | ||
| "setup.reset": {"label":"恢复出厂"}, |
huacnlee
reviewed
Sep 1, 2026
| "trigger.capture.screenshot": {"label":"截图"}, | ||
| "trigger.capture.screenrecord.stop": {"label":"停止录屏"}, | ||
| "trigger.capture.screenrecord": {"label":"录屏"}, | ||
| "trigger.capture.text": {"label":"取字 OCR"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces #9519, after a round of VM testing.
Setup > Region toggles between World and China. China points npm, pip, cargo, go and gem at Chinese mirrors, switches the system language to zh_CN, installs @manateelazycat's rime-ice-installer and runs it, makes Rime the active input method with Ctrl+Space as the toggle, and swaps the menu to Chinese labels through the stock user-extension overlay. World puts all of it back and leaves the input method installed.
Every target is checked before anything is written: a registry, locale, or menu extension someone set by hand refuses the whole switch, and World only removes values Omarchy wrote. File permissions survive the rewrites.
The overlay flushed out a real bug:
mergeMenuSourcesnever implemented the field-level override thatdocs/menu.mddocuments, so a label-only extension entry wiped the row'sactionandproviderand the row disappeared. Fixed, with regression tests.Companion: omacom/omarchy-pkgs#251 adds rime-ice-installer to the package repo so
omarchy-pkg-addcan find it.Test plan
region-test.sh(new, 15 cases): apply, restore, and refusals for all five sources,.npmrckeeps its 0600 mode, locale/fcitx5/menu-overlay round-trips through mocksmenu-test.sh: Region entries, overlay validation, merge-override regressions;menu-guards-test.shcovers the new guard reader./test/allmatches the clean-tree baseline