Repository navigation
feat(i18n): add Brazilian Portuguese (pt-BR) locale and localize hardcoded dashboard strings - #716
Open
fernandomarcius wants to merge 3 commits into
Open
fernandomarcius wants to merge 3 commits into
fernandomarcius wants to merge 3 commits into
Conversation
added 3 commits
October 6, 2026 10:49
- dashboard: pt-BR UI strings, resolveLocaleKey maps pt / pt-BR / portuguese - understand skill: pt-BR output guidelines; portuguese -> pt-BR - README: list pt-BR among supported languages
- Move remaining user-visible English (token gate, path finder, learn panel, warning/staleness banners, export alerts, code viewer errors, graph node cards, empty states, load errors, aria-labels) into the locale files. - Render complexity, node types, edge categories and edge types through localized labels (new nodeTypeNames/edgeCategoryNames sections and utils/i18nLabels helpers). - Use functions for counted/interpolated messages so each locale can apply its own plural rules (e.g. Russian one/few/many). - Add the new keys to en, zh, zh-TW, ja, ko, ru, vi and pt-BR. - Token gate follows the browser language; locale resolution retries the base language for tags such as ja-JP. - Locale shape test now compares leaf keys (and their kind) for every locale.
This was referenced Oct 7, 2026
This branch has not been deployed
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.
Summary
Adds Brazilian Portuguese (
pt-BR) as a supported output/UI language, and moves the dashboard's remaining hardcoded English strings into the locale files so every supported language renders a fully translated UI.pt-BR locale
packages/dashboard/src/locales/pt-BR.ts— full UI translation;resolveLocaleKeymapspt,pt-BR,pt_br,portuguese,brazilian-portuguese→pt-BR.skills/understand/locales/pt-BR.md— output guidelines (tags, summary style, technical terms, layer names) injected when--language pt-BR.skills/understand/SKILL.md—portuguesenow normalizes topt-BR; a bareptuses thept-BRguidance file.pt-BRamong supported languages (same pattern as feat(i18n): add Vietnamese (vi) locale support #709).Hardcoded strings → locales (applies to all 8 locales, not only pt-BR)
graphNodes,graphView,loadErrors,staleness,nodeTypeNames,edgeCategoryNames), plus wiring of existing-but-unused keys (ariaLabels.*,nodeTypeFilter.*,tokenGate.*,warningBanner.*,projectOverview.simple/moderate/complex).src/utils/i18nLabels.tsinstead of rendering raw enum values (complex,LAYER,files,Click to explore →, …).search.result→search.resultCount(n).TokenGaterenders beforeconfig.jsonis read, so it is wrapped in anI18nProviderthat followsnavigator.language;resolveLocaleKeynow falls back to the base language (ja-JP→ja,ko-KR→ko).locales.test.ts: the key-shape helper used to drop leaf keys, so it compared nothing; it now compares every leaf and its kind (string vs function) across all 8 locales.Intentionally left in English: the "Copy Issues" payload (meant for GitHub/agents), core validator / elk-layout diagnostics, raw server/exception error details, theme preset names, key names in the shortcuts table, and console logs.
Linked issue(s)
None.
How I tested this
Ran
/understand --language pt-BRflow on a ~560-file Rust workspace (3.8k nodes) and opened the dashboard: onboarding, persona selector, layer cards (CAMADA·Complexa·29 arquivos·Clique para explorar →), filters, search, diff toggle, tour panel and code viewer all render in pt-BR; switchingoutputLanguageback toenrestores English.Same CI sequence locally, all green:
pnpm lintpnpm --filter @understand-anything/core test(799 passed, 4 skipped)pnpm test(1013 passed)pnpm --filter @understand-anything/core build,@understand-anything/skill build,understand-anything-viewer build, dashboardtsc -b+vite buildpython -m unittest tests.skill.understand.test_merge_batch_graphs tests.skill.understand.test_merge_subdomain_graphs tests.skill.knowledge.test_parse_knowledge_base(106 tests OK)Manual smoke test (described above)
Versioning
vilocale in feat(i18n): add Vietnamese (vi) locale support #709)