← Back to PRs

#22637: feat(i18n): add Portuguese (Brazil) translations

by plgs2005 open 2026-02-21 12:49 View on GitHub →
docs app: web-ui size: XS
## Summary Extends the existing i18n system with Portuguese (Brazil) translations for the config-form UI component. ## Changes | File | Description | |------|-------------| | `ui/src/i18n/locales/en.ts` | Adds `configForm` section with 11 translation keys for config-form UI strings (error messages, buttons, placeholders, tooltips). | | `ui/src/i18n/locales/pt-BR.ts` | Adds matching `configForm` section with Portuguese (Brazil) translations. | | `ui/src/ui/views/config-form.node.ts` | Replaces 11 hardcoded English strings with `t()` calls from the shared `ui/src/i18n` system. | | `docs/reference/credits.md` | Adds contributor entry. | ## Design decisions - **Uses the existing i18n infrastructure** — `I18nManager`, nested keys (e.g. `t("configForm.unsupportedNode")`), lazy loading, and the established `t()` function from `ui/src/i18n/lib/translate.ts`. - **No duplicate systems** — imports from `../../i18n/index.ts` (same pattern as `app-render.ts`, `navigation.ts`, `overview.ts`). - **Both `en.ts` and `pt-BR.ts` updated** — English keys serve as the source of truth; Portuguese translations mirror the same structure. - **No new runtime dependencies.** ## How to test 1. Open the OpenClaw UI in a browser with language set to `pt-BR`. 2. Navigate to any config form — error messages, buttons, and placeholders should appear in Portuguese. 3. Switch browser language to `en-US` — strings revert to English. ## Checklist - [x] `pnpm check` (format + tsgo + lint) — ✅ passes - [x] `pnpm format:docs:check` — ✅ passes - [x] `pnpm docs:check-links` — ✅ 0 broken links - [x] Uses existing i18n system (`ui/src/i18n/`) — no duplicate infrastructure - [x] Both `en.ts` and `pt-BR.ts` updated with matching keys - [x] Only 4 files changed, all directly related to this feature

Most Similar PRs