Skip to content

feat(i18n): extend Chinese localization across the desktop UI - #142

Closed
bluntvoice wants to merge 1 commit into
Liquid-co:dev-publicfrom
bluntvoice:feat/complete-zh-hans-ui
Closed

bluntvoice wants to merge 1 commit into
Liquid-co:dev-publicfrom
bluntvoice:feat/complete-zh-hans-ui

Conversation

@bluntvoice

Copy link
Copy Markdown

Summary

Extend the existing i18n layer from #112 across the desktop UI: game details, branches and snapshots, devices and Internet sync, cloud backup, activity, notifications, shared controls, and settings subpanels.

  • Add 915 catalog entries, keeping English, Simplified Chinese and Traditional Chinese keys aligned (1,262 keys per catalog).
  • Translate dynamic presentation helpers at call time, with Chinese count units and restore summaries. Keep machine-readable state IDs, paths, provider IDs and stored data unchanged.
  • Preserve English fallback and the system-language behavior. Add regressions for locale switching, interpolation data, count formatting and the actual language-picker rendering.
  • Keep existing English presentation tests independent of the host OS language.

This targets dev-public. It deliberately leaves the top-level Settings and conflict-modal extraction covered by the pending #124 out of this patch.

Validation

  • npm test: 341 tests passed in 43 files.
  • npm run build: passed.
  • Final focused i18n regression run: 20 tests passed.
  • Catalog parity and AST-based static translation-reference check: 1,353 call sites checked, no missing keys.
  • git diff --check: passed.
  • A UI-only backport was also built against 2.4.1 and checked in the running Windows desktop application; Chinese navigation, library, status and snapshot text were observed. Save restore, cloud and multi-device sync were not exercised as acceptance tests.

The full go test ./... -timeout 2700s run was not green on this Windows host. Failures included TestCLI_WithoutDaemonSaysSo, TestCLI_DaemonStartStatusStop, TestUntrackThenRetrack_DoesNotInheritStaleLineage, TestSignIn_AStrayRequestUsesNothingUp, and TestResolveNames_UsesResolverAndCachesResult. The CLI checks encountered an already-running desktop daemon at the default address. A clean worktree at base commit c76ba6e reproduced the no-daemon, retrack, OAuth callback and name-resolver failures in a targeted run. The start/status/stop test was not rerun against the active desktop daemon. No Go, backend, dependency or e2e files are changed here.

Review notes

New Simplified Chinese copy was authored for this change. Newly added Traditional Chinese entries were converted from it using OpenCC (cn → twp), preserving existing upstream entries; native Traditional Chinese wording review is welcome. Raw backend error details and historical/user-authored text can remain in their original language.

This is a frontend presentation change with no data migration. Reverting the commit restores the previous UI wording.

Task and attribution

Requested by the account owner: localize OpenSave's interface into Chinese and contribute the translation upstream. Related work: #112 and #124.

Prepared with ChatGPT, agent ID /root; Git author: bluntvoice.

复用现有语言目录,补全游戏、快照、设备、云备份和活动界面的翻译。
同步更新简体、繁体与英文目录,保留状态标识、路径及同步数据格式。
为界面辅助函数提供即时翻译,并覆盖语言选择器及动态文案回归。

验证:前端 341 项测试及生产构建通过;翻译目录和静态引用校验通过。
@vercel

vercel Bot commented Nov 2, 2026

Copy link
Copy Markdown

@bluntvoice is attempting to deploy a commit to the sivadaboi's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Janlhin

Janlhin commented Nov 2, 2026

Copy link
Copy Markdown

你好,@bluntvoice。你提交的 #142 与我排定的逐视图PR,有直接冲突。

您应是第一次参与本项目,未及时阅读已合并的 PR 与相关 issue。请见 #18 与 #73

#18 中作者已写明"逐视图、按步骤提交 PR"的计划;#73 我的留言也明确我会按视图逐个向上游提 PR,且 ChakraFusion 已确认会协调、rebase 到我的 PR 上。您的单 commit 大包与这流程产生直接冲突。

请您停止推进 #142,把这部分工作交予我按原计划进行。

另需指出本 PR 的 key 问题:有 23 个 key 仅存在于 zh-Hans/zh-Hant、en.json 中并无对应英文源串,违反 #18 第 5 条"locale 不得包含 en.json 没有的 key",英文界面会显示异常。

@bluntvoice

Copy link
Copy Markdown
Author

@Janlhin 您好,感谢您的提醒。很抱歉,提交前没有仔细阅读 #18 和 #73 中已经明确的贡献约定和分工,也没有先与您沟通,就提交了这份范围较大的 PR,给您既定的工作安排增加了协调负担。

最初是我在个人使用 OpenSave 时,发现下载的版本还没有中文界面,因此为自己的使用做了一份汉化。之后考虑到这些翻译也许能帮助其他有同样需求的用户,便提交了 PR。提交前对项目已有的翻译进展和协作安排了解不足,是我考虑不周。

现在我已经了解您正在按视图逐步向上游提交翻译的计划。我会停止继续推进 #142,尊重现有分工。后续如果再参与贡献,我会先阅读项目约定、了解已有工作并沟通清楚,避免再次提交不符合约定或与既有安排冲突的 PR。

这份 PR 中的译文或实现,如果有任何部分能作为参考、对您的后续工作有所帮助,欢迎按您原有的计划选用,无需为这份提交调整现有安排。也感谢您指出其中的问题,以及您为中文支持所做的工作。

@bluntvoice bluntvoice closed this Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants