feat(i18n): coordinate Brazilian Portuguese locale support - #22751
Open
Magaav wants to merge 11 commits into
Open
feat(i18n): coordinate Brazilian Portuguese locale support#22751Magaav wants to merge 11 commits into
Magaav wants to merge 11 commits into
Conversation
Adds Portuguese and Brazilian Portuguese catalogs to the static-message i18n layer, with aliases that preserve pt-BR resolution before regional fallback. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Keeps the default display.language guidance in sync with the newly supported static-message locales. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Documents pt and pt_BR as supported display.language values so users can discover the new static-message translations. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…cale Add native pt-BR translation of the main README plus bootstrap of the Docusaurus pt-BR locale, complementing existing pt-BR work in flight. - README.pt-BR.md: full native translation of README.md (mirrors the README.zh-CN.md structural template; not a machine translation). - README.md / README.zh-CN.md: add bidirectional language badge to README.pt-BR.md. - website/docusaurus.config.ts: register `pt-BR` alongside `en` and `zh-Hans` with localized label "Português (Brasil)". - website/i18n/pt-BR/.../features/image-generation.md: seed translation of the image-generation guide to mirror the parity coverage that zh-Hans currently has (3 docs translated). Additional pages can be added incrementally without further config changes. This contribution intentionally avoids overlap with the in-flight pt-BR PRs: - NousResearch#15737 (web/src/i18n/pt.ts) -- Web UI strings - NousResearch#20443 (locales/pt.yaml + agent/i18n.py) -- CLI runtime catalog - NousResearch#22063 (web/src/i18n/pt-BR.ts) -- Web UI strings Surfaces here (root README + Docusaurus docs site i18n) are not touched by any of the above.
) Salvage of NousResearch#15737 by @carloshenriquecarniatto (CONFLICTING with main). Completes the work with full key parity to en/zh + native pt-BR translations. - Add `pt-BR` to Locale union in web/src/i18n/types.ts - New web/src/i18n/pt-BR.ts mirroring en.ts structure (all 16 sections) - Register `pt-BR` in TRANSLATIONS map + add isLocale type guard - Refactor LanguageSwitcher from binary toggle to N-locale cycle via LOCALE_CONFIG map (EN -> ZH -> pt-BR -> EN) Filename uses BCP-47 tag `pt-BR` (matching Docusaurus locale and PR NousResearch#22063) rather than `pt.ts` to disambiguate Brazilian Portuguese from European. Native translations, not machine output. Tech terms kept in English where that is the pt-BR convention (Skills, Plugins, OAuth, etc.).
Addresses Copilot review on NousResearch#22178: image-generation.md (line 31) had a relative link to `tool-gateway.md` that did not resolve in the pt-BR locale. Translating tool-gateway.md fixes the link and matches the zh-Hans precedent (NousResearch#20430), which translated the two docs as a pair for the same reason. Native pt-BR translation mirroring the en source structure 1:1 (matches the sibling image-generation.md style already in this PR).
Contributor
|
Thanks for consolidating the overlapping contributor work and preserving attribution. Problems
Suggested changes
Automated hermes-sweeper review. |
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
Coordination PR for the overlapping Brazilian Portuguese / Portuguese localization work.
This branch intentionally merges the active pt-BR PR lanes into one maintainer-friendly branch while preserving contributor commits:
Why
#22063 was flagged as overlapping with #15737 and #20443. Rather than asking maintainers to manually reconcile the same locale across several PRs, this branch provides a single integration candidate that keeps the work separated by surface area:
web/src/i18n/*,LanguageSwitcheragent/i18n.py,locales/pt*.yaml, config docs/testsREADME.pt-BR.md, Docusaurus pt-BR docsAdditional coordination polish
On top of the merged contributor branches, this PR adds a tiny compatibility layer from #22063:
PT-BRin the compact language switcher so Brazilian Portuguese is distinct from generic Portugueseptand lowercasept-brlocale values topt-BR, which makes earlier Web UI attempts migrate cleanlyMaintainer path
If maintainers prefer smaller PRs, this PR can be used as the reference merge plan:
If maintainers prefer one PR, this branch is the combined candidate.
Validation
git diff --checkpython3 -m py_compile agent/i18n.py hermes_cli/config.pyuv run --extra dev pytest tests/agent/test_i18n.py -q→ 31 passednpm --prefix web ci→ installed with Node engine warnings for the existing Node 18 environment./web/node_modules/.bin/tsc -b web/tsconfig.jsonNotes
No secrets touched. This is intentionally a coordination PR; it preserves the original contributors' commits and should not erase their credit.