Skip to content

Settings: localize the remaining runtime strings - #3477

Merged
Birfy merged 1 commit into
mainfrom
dev/3438-settings-runtime-strings
Nov 30, 2026
Merged

Birfy merged 1 commit into
mainfrom
dev/3438-settings-runtime-strings

Conversation

@Birfy

@Birfy Birfy commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

Settings: localize the remaining runtime strings

The connectors slice (#3476) left every other runtime string on /settings
hardcoded 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:

  • new SETTINGS_TEXT table (42 zh/en entries) plus settingsText(), which goes
    through uiText and falls back to the zh source when no document is passed,
    so exported helpers keep their current output;
  • values the shared catalog already carries (settings.saved,
    settings.appearance.light|dark) are reused through uiText, not duplicated;
  • describeAppearance(values, now, media, source) and
    removeSecretPrompt(item, source) take an optional document; call sites pass
    it, so the page renders in the configured locale;
  • mountMediaApi() takes the media type and localizes its noun, so
    video/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;
  • old vs new module over 58 zh cases (describeAppearance combinations and
    removeSecretPrompt names) -> 0 mismatches, so the zh output is unchanged;
  • scripts/visible_inventory.py regenerated docs/inventory/visible-controls.json;
    only the four settings/app.mjs line numbers move.

Related #3438

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
@github-actions github-actions Bot added the risk:T1 Risk tier T1 (client, tests, generated files), set by the controller from the diff label Nov 30, 2026
@Birfy

Birfy commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator Author

Lead review record, bound to head 464a74375e313bc29e8f62fa443e591bb37a21c8 (tree a6815204b38cbe294a42c9461b6ae496f7ee28ac).

Scope: one reviewable slice. The remaining /settings runtime strings leave hardcoded Chinese and go through the shared locale machinery (SETTINGS_TEXT + settingsText()), reusing catalog keys where the wording already matches. Connectors were a separate slice (#3476).

Diff: 3 files, +161/-48 — flybot_workspace/static/settings/app.mjs (+118/-43, blob 5080d5e2), tests/settings_page.test.mjs (+39/-1, blob 55009a93), docs/inventory/visible-controls.json (4/4, blob d65b0ddf). The inventory diff moves only the four settings/app.mjs line numbers. Trailer is Related #3438; no closing keyword anywhere in the body.

Verified on the exact head:

  • GitHub's tree field and a local rebuild from a clean main content tree plus the patch both give a6815204, 2229 entries (2227 files + 2 symlinks). The rebuild ran on base tree a70e8f45, which matches main 44454033.
  • The three blobs recompute to the values above from both sides.
  • Local, not CI: node --test --test-concurrency=2 tests/*.test.mjs .github/scripts/*.test.mjs -> 1095 pass / 0 fail / 0 cancelled; tests.test_settings_page + tests.test_visible_inventory -> 23/23 OK; scripts/visible_inventory.py regenerates the inventory byte for byte.
  • Local, not CI: independent comparison over 90 describeAppearance input groups and 6 removeSecretPrompt inputs gives zero zh output differences against base, and the 42 new entries are non-empty, Chinese-free and placeholder-compatible in en. QA reported this reading on this head; the 42-key table is covered by that comparison, while the new test asserts about 6 of the 42 keys.
  • CI on this head, as recorded by check runs: 18 of 18 completed without failure, including runtime-image / Build and smoke under the manager contract and both Management API jobs. Merge state is clean. Risk label risk:T1 is set by the workflow, not by hand.

Not settled here: chat/ and artifacts still carry Chinese, so this does not make the whole /settings page English. That is a later slice.

Related #3438

@Birfy
Birfy added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit 0b069b3 Nov 30, 2026
18 checks passed
@Birfy
Birfy deleted the dev/3438-settings-runtime-strings branch November 30, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:T1 Risk tier T1 (client, tests, generated files), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant