Skip to content

fix(webui): translate connector descriptions, field labels and setup help - #6903

Merged
kovtcharov-amd merged 1 commit into
mainfrom
kalin/fix-6860-connector-i18n
Nov 7, 2026
Merged

kovtcharov-amd merged 1 commit into
mainfrom
kalin/fix-6860-connector-i18n

Conversation

@kovtcharov-amd

@kovtcharov-amd kovtcharov-amd commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

In Arabic, Settings > Connectors still showed each built-in connector's description, setup field labels, setup help and the "Required:" error in English. They now come from the translation table with English and Arabic entries, and search also finds a connector by its translated description. A connector the catalog doesn't ship (a custom server), or a catalog entry that was reworded since, shows its own text instead of an out-of-date translation. A unit test fails if the catalog and the UI's English drift apart.

Closes #6860

Note: the MCP server key fields (Slack, GitHub, Discord tokens) aren't shown with labels or help on main yet. #6855 adds them and can route them through the same lookup.

Test plan

  • npx vitest run and npx tsc --noEmit in src/gaia/apps/webui. The new ConnectorsSection.i18n tests cover the Arabic description, labels, help, the missing-field error, search, and fallback to the sent text
  • python -m pytest tests/unit/connectors/test_catalog_ui_text.py
  • npm run test:rtl -- -g connectors passes in both languages. The RTL suite has no screenshot baselines, so none needed regenerating
  • Electron file-size caps still hold (tests/electron Jest)
  • Switch the UI to Arabic, open Settings > Connectors > Microsoft Work or School, and check that the description, setup labels and help read in Arabic

…help

In Arabic, Settings > Connectors showed every built-in connector's
description, OAuth setup labels, setup help and "Required:" error in
English, because they came straight from the backend catalog. They now
go through the i18n table (English and Arabic), and search also matches
the translated description.

A message is used only while its English matches what the catalog sends,
so a custom server or a reworded catalog entry shows its own text rather
than a stale translation. A unit test keeps en.ts in step with the catalog.

Closes #6860
@kovtcharov-amd kovtcharov-amd added the multilingual Language support: translations, right-to-left layout, Arabic and other non-English languages label Nov 7, 2026
@kovtcharov-amd kovtcharov-amd self-assigned this Nov 7, 2026
@github-actions github-actions Bot added the tests Test changes label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Verdict: Approve

In Arabic, Settings › Connectors showed each built-in connector's description, setup field labels, setup help and the "Required:" error in English. This PR translates them. If a connector's text doesn't match the shipped English exactly (a custom server, or catalog text reworded since), the UI shows the text as sent rather than an out-of-date translation. A new unit test fails CI if the catalog and the UI's English drift apart. I found no blocking issues.

One thing to look at when you do the last manual check: Arabic shows the English in brackets after every translation, so the longest help text (the Microsoft work tenant ID) will appear twice, roughly 600 characters each. That follows the locale's convention, but check that the setup dialog still reads well.

Real-world evidence

The evidence stage called the live GET /api/connectors route and compared what it sends with the new locale files. Every catalog string the UI now translates matched the English entry word for word and has an Arabic translation:

connectors returned: 9 -> ['google', 'mcp-git', 'mcp-github', 'mcp-memory', 'mcp-tavily', 'microsoft', 'microsoft_work', 'mcp-discord', 'mcp-slack']
text strings sent by API: 23; keys in en.ts: 23; keys in ar.ts: 23
en.ts exact match to API: 23/23; missing: []; drifted: []
en keys with no API string (stale): []
en keys untranslated in ar.ts: []
$ python -m pytest tests/unit/connectors/test_catalog_ui_text.py -q
25 passed in 1.11s

As a spot check, the single-connector route the configure dialog uses (/api/connectors/microsoft_work) returned the same three field labels. The rendered English and Arabic screenshot is pending the strix-halo lane, so the pixels rest on the author's npm run test:rtl run and the open manual check in the test plan.

🔍 Technical details

Issues found

🟢 Long help text is shown twice in Arabic (src/gaia/apps/webui/src/utils/connectorText.ts:19): fieldHelp goes through t(key). Arabic sets showEnglishInBrackets: true, so the result is " ()". For connectors.microsoft_work.tenant_id.help and the two client_id.help entries, that roughly doubles a block that is already long. This is the documented convention, so it's optional. If the dialog looks crowded, pass bare = true for help text only and keep labels bracketed.

Checked, no finding

  • Sibling paths: the description and oauth_setup_fields are displayed only in ConnectorsSection.tsx, at the tile search, the OAuth configure body, OAuthClientEditor and the MCP configure body. All four go through the new helpers. MCP env-key fields are left out on purpose and deferred to feat(connectors): one-click Slack app setup and readable key fields #6855, as the PR says.
  • Search matches the raw description, the display name and the bare translation, so English search still works in Arabic.
  • In missingFieldsMessage, each half of the bracketed error uses that half's language through translator(code), and the joiner is localised (، ).
  • The drift guard covers stale keys as well as missing ones, and it sits under tests/unit/, so CI runs it.
  • No docs describe these strings, and no dependencies changed.

Strengths

  • Translating only when the English still matches exactly is a good choice. A reworded catalog entry, or a third-party connector that reuses an id, shows its own text instead of a confidently wrong translation.
  • The Python test pins the UI's English to the live REGISTRY and names the fix in its failure message.
  • The RTL tests cover the fallback path (shows a custom or reworded description as sent) as well as the happy path.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit b00cacd Nov 7, 2026
59 of 86 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the kalin/fix-6860-connector-i18n branch November 7, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

multilingual Language support: translations, right-to-left layout, Arabic and other non-English languages tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connector descriptions, field labels and setup help aren't translated

1 participant