Skip to content

Add a Setup > Region toggle with Chinese sources, language and input method - #9548

Open
ZacharyZhang-NY wants to merge 1 commit into
omacom:quattrofrom
ZacharyZhang-NY:china-region
Open

Add a Setup > Region toggle with Chinese sources, language and input method#9548
ZacharyZhang-NY wants to merge 1 commit into
omacom:quattrofrom
ZacharyZhang-NY:china-region

Conversation

@ZacharyZhang-NY

@ZacharyZhang-NY ZacharyZhang-NY commented Sep 1, 2026

Copy link
Copy Markdown

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: mergeMenuSources never implemented the field-level override that docs/menu.md documents, so a label-only extension entry wiped the row's action and provider and the row disappeared. Fixed, with regression tests.

Companion: omacom/omarchy-pkgs#251 adds rime-ice-installer to the package repo so omarchy-pkg-add can find it.

Test plan

  • region-test.sh (new, 15 cases): apply, restore, and refusals for all five sources, .npmrc keeps its 0600 mode, locale/fcitx5/menu-overlay round-trips through mocks
  • menu-test.sh: Region entries, overlay validation, merge-override regressions; menu-guards-test.sh covers the new guard reader
  • ./test/all matches the clean-tree baseline
  • Fresh VM install: China gives Chinese sources, language, menu, and Rime with Ctrl+Space; World returns to stock
"style.bar.position": {"label":"位置"},
"style.bar.transparency": {"label":"透明"},
"style.screensaver": {"label":"屏保"},
"style.about": {"label":"关于页"},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here should "关于"

"update.password": {"label":"密码"},
"update.timezone": {"label":"时区"},
"update.time": {"label":"时间"},
"update.channel.stable": {"label":"稳定 Stable"},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here just keep Stable be ok.

"setup.security.passwordless-sudo": {"label":"免密 sudo"},
"setup.security.sudoless-docker": {"label":"免 sudo Docker"},
"setup.direct-boot": {"label":"直接启动"},
"setup.reset": {"label":"恢复出厂"},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"恢复出厂设置"

"trigger.capture.screenshot": {"label":"截图"},
"trigger.capture.screenrecord.stop": {"label":"停止录屏"},
"trigger.capture.screenrecord": {"label":"录屏"},
"trigger.capture.text": {"label":"取字 OCR"},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"OCR 取字"

@Harry-Chen Harry-Chen left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the administrator of mirrors.tuna.tsinghua.edu.cn, due to both technical and non-technical reasons, I hereby request the removal of any hardcoded TUNA mirrors from the official configuration of this distribution, for now and the future. This leads to traffic and ethical burden to our mirror service, which is strongly undesirable.

Comment thread bin/omarchy-region Outdated
pip_index="https://pypi.tuna.tsinghua.edu.cn/simple"
cargo_registry="sparse+https://rsproxy.cn/index/"
go_proxy="https://goproxy.cn,direct"
gem_source="https://mirrors.tuna.tsinghua.edu.cn/rubygems/"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove all mirrors pelease. Current is a AI time. Omarchy is also the AI native system, all users that must be has proxy, unless that they not use Claude, Codex.

So, we don't need built-in have those mirrors. Even say that not need for every one.

We can built-in have VPN apps, just on-tap to install proxy subscription.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually built in vpn apps does not meet the Gov complience. Users will need to install by themselves.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ZacharyZhang-NY

I think you may be going in the wrong direction here. We shouldn’t assume that users depend on domestic mirrors for their development tools.

There are many scenarios, including but not limited to:

  1. Chinese-speaking users who live outside China
  2. Users in China who use the system while traveling or working abroad
  3. Users from China whose network environment is already outside China

None of these users need a system-wide built-in proxy or mirror configuration.

So, as @huacnlee suggested, we should remove all mirror/proxy configuration and leave this decision and setup entirely to the user.

@ZacharyZhang-NY

Copy link
Copy Markdown
Author

As the administrator of mirrors.tuna.tsinghua.edu.cn, due to both technical and non-technical reasons, I hereby request the removal of any hardcoded TUNA mirrors from the official configuration of this distribution, for now and the future. This leads to traffic and ethical burden to our mirror service, which is strongly undesirable.

OK. I will close this PR and redo it.

@ZacharyZhang-NY
ZacharyZhang-NY force-pushed the china-region branch 5 times, most recently from 6452e84 to 32e83d3 Compare September 1, 2026 14:53
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants