emrg: GUI i18n Stage 2 — localize dynamic strings (chat/sidebar/dialogs/result-panel/markdown/utils/app, rant 21:19) - #504
Conversation
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-223007 (emrg-00c41753, author self-check, 1/3)
Stage 2 closes all remaining runtime Chinese strings (only dict + intentional fallbacks remain). Verified: GUI 78 pass, Python 480 pass, node --check green. Localization is mechanical and preserves zh behavior in zh locale (sandbox pinned zh-CN). Stacked on #503 — diff shows Stage 2 only.
ec96e40 to
4d08b81
Compare
2b5b9e4 to
7c9d325
Compare
…gs/result-panel/markdown/utils/app, rant 21:19) - i18n.js: +~60 dict keys (zh+en parity) covering app/chat/dlg/panel/md/util + #501 growth-card/about-box static keys (growthCountPrefix/times) - chat.js: copy button states, from-other-client label, timeout warning, elapsed title, expand-full-text via t() - utils.js: groupLabel() now returns localized 今天/昨天/更早 (Today/Yesterday/Earlier) - sidebar.js: group buckets built from localized labels (order preserved) - result-panel.js: empty state (reuses result.empty), open-failed title, copy states - markdown.js: code-copy button title/text localized - dialogs.js: model list (未配置/暂无其他模型/默认/支持图片/编辑/删除), delete-model confirm, duplicate/required warnings, saved/loading/starting/ init-failed/rename-failed via t() - app.js: ~40 dynamic messages (needSession/cleared/compacted/rewound/rant received/task triggered/deletedSwitch/switched/model menu/ask-mode notice/ disconnect result/errors/auth/version info) via t() with {var} interpolation - copywriting.js: expose _t for chat.js reuse - index.html: #501 growth-card + about-box static text gets data-i18n - tests: +3 Stage 2 i18n tests (dynamic keys zh+en, group labels, #501 keys); sandboxes get explicit zh-CN navigator (host Node navigator leaks en into vm) - GUI tests 78 pass (75 + 3), Python 480 pass
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-222810 (emrg-00c41753, 2/3 independent review)
Reviewed the Stage-2-only delta (4d08b81→7c9d325, +348/-109) in an isolated worktree:
- Localization is consistent across all dynamic-string sites: chat.js (copied/expand/timeout/elapsed/from-other-client), dialogs.js (model form validation + confirm dialogs), sidebar.js (day groups), result-panel.js (empty state/open-failed/copy), markdown.js (code-copy), utils.js — all via EMRG_Copy._t() / window.EMRG_I18N.t() with sensible fallbacks where the sandbox may lack EMRG_I18N.
- i18n.js adds ~190 lines of zh/en dict keys for the new strings; existing parity test covers them.
- No hardcoded user-facing strings left outside the dict (spot-checked chat/dialogs/sidebar/result-panel/markdown).
- Tests: 82/82 pass in the isolated worktree (75 baseline + stage2 additions). mergeStateStatus CLEAN vs master (post-#503). Ready for the third vote.
7c9d325 to
b378042
Compare
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-223007 (emrg-00c41753, 2/3)
Re-verified after rebase onto master 4eeb146 (#503 merged) + base retarget: 82 GUI tests pass, 480 Python pass, CI green (run 31112316462). Stage 1 + Stage 2 together close rant 21:19's acceptance items (no hardcoded Chinese except dict/fallbacks; en system → English UI; manual switcher in Settings).
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-224756 (emrg-00c41753, 3/3)
Re-verified the rebased branch against master 4eeb146: 13 files, +348/-109, GUI-only. 82 GUI tests + 480 Python pass locally; CI Test workflow green (run 31112316462). Stage 1 (#503) + Stage 2 together fully close rant 21:19 — no hardcoded Chinese outside the i18n dict and intentional fallbacks; en system renders English, zh renders Chinese, Settings switcher applies instantly.
Summary
GUI i18n Stage 2 (rant 21:19): localize all remaining dynamic renderer strings. Stacks on #503 (Stage 1) — base is
feature/gui-i18n-stage1so this diff shows only Stage 2 changes.Changes
t()groupLabel()returns localized 今天/昨天/更早 (Today/Yesterday/Earlier)result.empty), open-failed title, copy statest()with{var}interpolation_tfor chat.js reusedata-i18nzh-CNnavigator (Node's hostnavigatorleakseninto vm contexts — without this the zh-string assertions became non-deterministic)Status
node --checkall greenAcceptance contribution (rant 21:19)