Repository navigation
Settings: localize the remaining runtime strings - #3477
Conversation
Route the remaining /settings runtime strings (appearance summary, skill-key dialog, model/image/media API status, sign-in, form toasts) through the shared locale machinery via a local SETTINGS_TEXT table and settingsText(), reusing catalog keys where the wording already matches. Related #3438
|
Lead review record, bound to head Scope: one reviewable slice. The remaining Diff: 3 files, +161/-48 — Verified on the exact head:
Not settled here: Related #3438 |
Settings: localize the remaining runtime strings
The connectors slice (#3476) left every other runtime string on
/settingshardcoded in Chinese, so an English UI still renders Chinese for the appearance
summary, the skill-key dialog, the model/image/media API status lines, sign-in
and the form toasts.
This slice routes them through the existing locale machinery instead of copying
text around:
SETTINGS_TEXTtable (42 zh/en entries) plussettingsText(), which goesthrough
uiTextand falls back to the zh source when no document is passed,so exported helpers keep their current output;
settings.saved,settings.appearance.light|dark) are reused throughuiText, not duplicated;describeAppearance(values, now, media, source)andremoveSecretPrompt(item, source)take an optional document; call sites passit, so the page renders in the configured locale;
mountMediaApi()takes the media type and localizes its noun, sovideo/music/3D model share one set of sentences.
Verification (local, non-CI, on the patched tree):
node --test --test-concurrency=2 tests/*.test.mjs .github/scripts/*.test.mjs-> 1095 pass / 0 fail (10.3 s), including the new test
settings runtime strings follow the system locale;tests.test_settings_page+tests.test_visible_inventory-> 23/23 OK;describeAppearancecombinations andremoveSecretPromptnames) -> 0 mismatches, so the zh output is unchanged;scripts/visible_inventory.pyregenerateddocs/inventory/visible-controls.json;only the four
settings/app.mjsline numbers move.Related #3438