emrg: GUI i18n static-leak fix — wire 12 remaining data-i18n strings + regression tests - #507
Conversation
…+ regression tests (rant 21:19)
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-225341 (emrg-00c41753, author self-check, 1/3)
Verified the fix directly: (1) the leak scan script reports 0 remaining CJK lines without data-i18n in index.html (was 12); (2) each wired element is not overwritten by JS at runtime (checked app.js/dialogs.js — status-dot/back-to-bottom/model-form-name get className/value only), so the data-i18n title/placeholder actually renders localized; (3) toast msg static uses a non-parameterized key (copy.evolutionToastMsgStatic) so no literal {n} appears before showEvolutionToast overwrites it; (4) new keys are zh+en and the existing parity test enforces them; (5) GUI 84/84 + pytest 480 pass. This closes the last unmet acceptance item of rant 21:19.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-230036 (emrg-00c41753, 2/3)
Verified the fix against master: exactly 12 Chinese static strings in index.html lack data-i18n (growth-card title/note, status-dot title, back-to-bottom, model-form-name placeholder, About title/desc, Recent-improvements title, evolution-toast title/msg/buttons) — all added by #501/#502 after i18n Stage 1 branched, so the migration missed them. The PR wires all 12 to data-i18n/title/placeholder with zh+en dict keys, and adds a leak-scan regression test (index.html Chinese must carry data-i18n) that would have caught this. This closes rant 21:19's "no hardcoded Chinese" acceptance item. CI Test green (run 31113853226).
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-231245 (emrg-00c41753, 3/3)
3 consecutive LGTMs from cycles 225341 / 230036 / 231245 — merging. Fix verified earlier: 12 index.html static Chinese strings wired to data-i18n with zh/en keys + index.html leak-scan regression test; CI green.
… regression test (rant 21:19) - app.js loadEvolutionSummary: '最近改进' header + '还没有改进记录…' empty state now resolve via _t() (app.recentImprovements / app.noImprovements, zh+en dict keys) — these were added by #502 after i18n Stage 2 and missed the migration - i18n.test.js: +2 tests — JS-side Chinese-leak scan (mirrors #507's index.html scan, excludes i18n.js dict/comments/functional regexes) + bilingual assertions - GUI 84 pass (82 + 2), Python 480 pass
… regression test (rant 21:19) (#508) - app.js loadEvolutionSummary: '最近改进' header + '还没有改进记录…' empty state now resolve via _t() (app.recentImprovements / app.noImprovements, zh+en dict keys) — these were added by #502 after i18n Stage 2 and missed the migration - i18n.test.js: +2 tests — JS-side Chinese-leak scan (mirrors #507's index.html scan, excludes i18n.js dict/comments/functional regexes) + bilingual assertions - GUI 84 pass (82 + 2), Python 480 pass Co-authored-by: EMRG Evolution <emrg@argszero.dev>
Summary
Completes rant 21:19 acceptance item "no hardcoded Chinese outside the i18n dict" — an audit found 12 static strings in index.html still hardcoded in Chinese with no
data-i18nwiring, so English-system users see Chinese UI fragments. The i18n Stage 1/2 (#503/#504) migration missed them because they are not touched by JS at runtime (onlyupdateGrowthCard/showEvolutionToastoverwrite a subset).Fixed leaks (index.html → data-i18n / data-i18n-title / data-i18n-placeholder)
title→copy.growthCardTitlecopy.growthNote(key existed, element unwired)title→sidebar.statusTitletitle→sidebar.backToBottomplaceholder→settings.modelNamePlaceholdersettings.aboutTitlesettings.aboutDescsettings.recentTitlecopy.evolutionToastTitle(key existed, element unwired)copy.evolutionToastMsgStatic(new non-parameterized key)copy.evolutionToastSeecopy.evolutionToastDismissNew dict keys (zh+en, parity enforced by existing test)
copy.growthCardTitle,sidebar.statusTitle,sidebar.backToBottom,settings.aboutTitle,settings.aboutDesc,settings.recentTitle,settings.modelNamePlaceholder,copy.evolutionToastMsgStatic.Regression tests (+2)
data-i18n/-title/-placeholder(or be an HTML comment) — catches exactly this leak class forever.Verification
emrg --helpOK.