Skip to content

feat(ui): internationalize the console with i18next (en + pt-BR) - #80

Merged
jaymeklein merged 1 commit into
mainfrom
feat/ui-i18n
Aug 13, 2026
Merged

feat(ui): internationalize the console with i18next (en + pt-BR)#80
jaymeklein merged 1 commit into
mainfrom
feat/ui-i18n

Conversation

@jaymeklein

Copy link
Copy Markdown
Owner

What

Internationalizes the EmbedBase console with i18next + react-i18next — English and Brazilian Portuguese (pt-BR), a LanguageSwitcher in the top bar, and browser-locale detection with a persisted choice.

  • ui/src/i18n/ — init (index.ts), locale detection + persistence (detect.ts), a translated API-error helper (apiError.tsapiErrorMessage(e, t), used across the error paths), typed keys (i18next.d.ts), and a compile-time parity guard (parity.ts) that fails tsc if the two locales' key sets ever diverge.
  • ui/src/i18n/locales/{en,pt-BR}/translation.json — the string catalogs (550 keys each).
  • LanguageSwitcher.tsx (in the Topbar), plus ~44 screens / pages / components wired through t() / <Trans>.

Provenance

This existed only as uncommitted stashed WIP (made on an older main, before the recent MCP PRs). It's been applied onto current main — cleanly, zero git conflicts — and committed here. It was never in a prior PR, which is why the translation didn't appear on the deployed console.

Verification

  • Build: npm run build (tsc && vite build) green — 2962 modules transformed.
  • Typecheck: tsc --noEmit green — and via parity.ts that also proves en/pt-BR key parity, confirmed independently: 550 / 550, nothing missing either way.
  • No regressions: the only file main changed since the stash base — ui/src/components/settings/McpPanel.tsx — is i18n-only in the diff and preserves main's LAN-address logic (the isLocal → LAN-IP swap). The other 43 files are i18n on files main hadn't touched since the base, so nothing could be reverted.
  • Runtime: the console renders in pt-BR with no console errors (login screen spot-checked).

Caveat

Completeness is enforced for every key in use (the parity guard) and the screens I spot-checked render fully translated — but I did not exhaustively scan all 44 files for a stray hardcoded string the original i18n pass might have missed. A follow-up grep pass could close that.

Adds react-i18next + i18next with browser-locale detection, a LanguageSwitcher,
and en/pt-BR translation bundles, wiring the auth screens, pages, and shared
components through t().
@jaymeklein
jaymeklein merged commit 2cfa561 into main Aug 13, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant