Skip to content

emrg: GUI i18n Stage 2 — localize dynamic strings (chat/sidebar/dialogs/result-panel/markdown/utils/app, rant 21:19) - #504

Merged
argszero merged 2 commits into
masterfrom
feature/gui-i18n-stage2
Aug 6, 2026
Merged

emrg: GUI i18n Stage 2 — localize dynamic strings (chat/sidebar/dialogs/result-panel/markdown/utils/app, rant 21:19)#504
argszero merged 2 commits into
masterfrom
feature/gui-i18n-stage2

Conversation

@argszero

@argszero argszero commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

GUI i18n Stage 2 (rant 21:19): localize all remaining dynamic renderer strings. Stacks on #503 (Stage 1) — base is feature/gui-i18n-stage1 so this diff shows only Stage 2 changes.

Changes

  • i18n.js: +60 dict keys (zh/en parity) — app messages, chat, dialogs, result-panel, markdown, time-group labels, plus emrg: GUI WorkBuddy P3 — evolution visibility (growth card + toast + dynamic /version, rant 21:35) #501's growth-card/about-box static keys
  • chat.js: copy-button states, "from another client" label, timeout warning, elapsed tooltip, expand-full-text — all via t()
  • utils.js: groupLabel() 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 labels (Not configured / No other models / Default / Supports images / Edit / Delete), delete-model confirm, duplicate/required warnings, saved/starting/init-failed/rename-failed
  • app.js: ~40 dynamic messages (need-session, cleared, compacted, rewind summary, rant received + count, task triggered, conversation switched/deleted, model menu empty-state, Ask-mode notice, disconnect result, errors, auth failure, version info) via t() with {var} interpolation
  • copywriting.js: expose _t for chat.js reuse
  • index.html: emrg: GUI WorkBuddy P3 — evolution visibility (growth card + toast + dynamic /version, rant 21:35) #501 growth-card + about-box static text gets data-i18n
  • tests: +3 Stage 2 tests (dynamic keys zh+en, group labels, emrg: GUI WorkBuddy P3 — evolution visibility (growth card + toast + dynamic /version, rant 21:35) #501 keys); both test sandboxes now get explicit zh-CN navigator (Node's host navigator leaks en into vm contexts — without this the zh-string assertions became non-deterministic)

Status

Acceptance contribution (rant 21:19)

  • 全界面无硬编码中文(除 i18n 词典与兜底)— Stage 2 closes the remaining runtime strings; only intentional zh fallbacks + comments remain

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ 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.

@argszero
argszero force-pushed the feature/gui-i18n-stage1 branch from ec96e40 to 4d08b81 Compare August 6, 2026 14:40
@argszero
argszero force-pushed the feature/gui-i18n-stage2 branch from 2b5b9e4 to 7c9d325 Compare August 6, 2026 14:40
…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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ 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.

@argszero
argszero force-pushed the feature/gui-i18n-stage2 branch from 7c9d325 to b378042 Compare August 6, 2026 14:42
@argszero
argszero changed the base branch from feature/gui-i18n-stage1 to master August 6, 2026 14:43

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ 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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ 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.

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.

1 participant