Repository navigation
Settings: localize the connectors runtime strings - #3476
Merged
Merged
Conversation
The connectors panel wrote its row states and error messages from inline Chinese literals inside app.mjs, so the English render left that panel in Chinese even with the panel marked for localization. Collect those phrases into one zh/en table behind connectorsText(), reuse the catalog keys that already existed instead of copying them, and let composioRowState() and composioMessage() take an optional translator while the Chinese default stays byte-identical for existing callers. Refs #3438.
Collaborator
Author
|
Lead review — slice: connectors runtime strings follow the interface language. Head: What changes
Scope boundaries
Evidence bound to this exact head (tree
Risk: Related #3438 |
This was referenced Nov 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
/settingsrenders its connectors panel throughapplySystemLocale(), which swapsdata-ui-*marker text when the page language is English. The panel's state, however,is written afterwards by
composioRowState()andcomposioMessage()from inline Chineseliterals in
flybot_workspace/static/settings/app.mjs. So an English page keeps a Chineseconnectors panel: 46 strings over 42 lines (416 Han characters in the connectors block,
704 in the file).
That is the case #3438 describes — unmarked Chinese strings survive the English render.
Change
CONNECTORS_CHOICESzh/en table insidesettings/app.mjs, read through a newconnectorsText(document, key, values)wrapper over the existinguiText().settings.connectors.connect,settings.connectors.loading, …) are reused throughuiText()'s catalog fallback insteadof being copied into the table, so marker text and runtime text cannot drift apart.
composioRowState(..., t = null)andcomposioMessage(..., t = null)take an optionaltranslator. Without it they fall back to the table's Chinese side, so every existing
caller keeps its exact bytes.
docs/inventory/visible-controls.jsonis regenerated with the tree's ownscripts/visible_inventory.pybecause the file moved fourdocument.createElementsitesto new lines.
Out of scope
system-locale.mjs, or to the/chatpage.Verification (local, run by FlyBot Lead on the pushed content)
Content of the three files is byte-identical to the blobs pushed here
(
e928a8f5,70d8296d,f99d9fb2), verified bygit hash-objectagainst the API blobs.node --test --test-concurrency=2 tests/settings_page.test.mjs tests/system_locale.test.mjs tests/system_locale_settings.test.mjs tests/system_locale_chat.test.mjs→ 49/49 pass (0 fail), including the new English connectors assertion.
python3 -m unittest tests.test_settings_page tests.test_visible_inventory→ 23 tests OK.
python3 scripts/visible_inventory.pyregeneratesdocs/inventory/visible-controls.jsonbyte-for-byte (sha256
104e84f3…), so the committed inventory is self-consistent.Local readings only — CI has not run on this head yet.
Refs #3438