Add a Setup > Region toggle with Chinese sources, language and input method - #9548
Add a Setup > Region toggle with Chinese sources, language and input method#9548ZacharyZhang-NY wants to merge 1 commit into
Conversation
| "style.bar.position": {"label":"位置"}, | ||
| "style.bar.transparency": {"label":"透明"}, | ||
| "style.screensaver": {"label":"屏保"}, | ||
| "style.about": {"label":"关于页"}, |
| "update.password": {"label":"密码"}, | ||
| "update.timezone": {"label":"时区"}, | ||
| "update.time": {"label":"时间"}, | ||
| "update.channel.stable": {"label":"稳定 Stable"}, |
| "setup.security.passwordless-sudo": {"label":"免密 sudo"}, | ||
| "setup.security.sudoless-docker": {"label":"免 sudo Docker"}, | ||
| "setup.direct-boot": {"label":"直接启动"}, | ||
| "setup.reset": {"label":"恢复出厂"}, |
| "trigger.capture.screenshot": {"label":"截图"}, | ||
| "trigger.capture.screenrecord.stop": {"label":"停止录屏"}, | ||
| "trigger.capture.screenrecord": {"label":"录屏"}, | ||
| "trigger.capture.text": {"label":"取字 OCR"}, |
Harry-Chen
left a comment
There was a problem hiding this comment.
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.
| 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/" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Actually built in vpn apps does not meet the Gov complience. Users will need to install by themselves.
There was a problem hiding this comment.
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:
- Chinese-speaking users who live outside China
- Users in China who use the system while traveling or working abroad
- 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.
OK. I will close this PR and redo it. |
6452e84 to
32e83d3
Compare
…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>
32e83d3 to
0998d17
Compare
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