Skip to content

feat(pt-BR): add Brazilian Portuguese localization - #1265

Open
payaci wants to merge 14 commits into
openclaw:mainfrom
payaci:feat-ptbr-localization
Open

feat(pt-BR): add Brazilian Portuguese localization#1265
payaci wants to merge 14 commits into
openclaw:mainfrom
payaci:feat-ptbr-localization

Conversation

@payaci

@payaci payaci commented Aug 28, 2026

Copy link
Copy Markdown

Related: #61

What Problem This Solves

Resolves the lack of Brazilian Portuguese (pt-BR) localization in OpenClaw Windows Node.

Brazilian Portuguese users currently need to use the application in English, which makes onboarding, settings, diagnostics, permissions, notifications, and other user-facing workflows less accessible.

Why This Change Was Made

This change introduces an initial Brazilian Portuguese localization covering the application's user interface and major workflows.

Technical terms such as Node, Gateway, MCP, JSON, and PATH were preserved where appropriate to maintain consistency with the product and technical documentation.

User Impact

Brazilian Portuguese users can now use OpenClaw Windows Node in their native language across most of the application interface, including:

  • Onboarding
  • Tray menu
  • Settings
  • Diagnostics
  • Permissions
  • Sessions
  • Connection and pairing flows
  • Notifications
  • Node management

Evidence

  • Added Brazilian Portuguese (pt-BR) localization resources.
  • Reviewed and adjusted translations for UI consistency.
  • Preserved placeholders, formatting, and technical terminology.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Validation

Localization resources were reviewed for:

  • XML structure preservation
  • Placeholder preservation ({0}, {1}, etc.)
  • Consistent terminology
  • UI translation coverage

Real Behavior Proof

  • Environment tested: Windows
  • PR head or commit tested: Current branch head
  • Exact steps or command run: Localization resource review and validation
  • Evidence after fix: Brazilian Portuguese translations available in resource file
  • Observed result: User-facing strings are translated to pt-BR
  • Screenshot or artifact links verified? (No)
  • Not verified or blocked: Full UI walkthrough

Security Impact

  • New permissions or capabilities? (No)
  • Secrets or tokens handling changed? (No)
  • New or changed network calls? (No)
  • Command or tool execution surface changed? (No)
  • Data access scope changed? (No)

Compatibility and Migration

  • Backward compatible? (Yes)
  • Config or environment changes? (No)
  • Migration needed? (No)

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 28, 2026
@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 7:53 PM ET / 23:53 UTC.

ClawSweeper review

What this changes

The PR adds a Brazilian Portuguese WinUI resource catalog, enables the pt-BR testing override, documents the locale, and extends locale-specific checks.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open as a ready-for-maintainer-review feature. The current default branch has no pt-BR catalog, while this branch adds it with matching resource coverage and a Windows running-UI screenshot. Likely related people: Scott Hanselman (medium confidence, localization documentation and validation history) and Barbara Kudiess (medium confidence, recent App architecture history).

Priority: P3
Reviewed head: 192b2e16fb0982bd3290928120b507e179cdb230

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused localization addition with visible Windows evidence and comprehensive source-level locale safeguards.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The changed production path is the App locale whitelist and pt-BR resource catalog. The contributor supplied a Windows running-Companion screenshot reporting rendered pt-BR resources, and later commits only updated documentation and source-level coverage.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The changed production path is the App locale whitelist and pt-BR resource catalog. The contributor supplied a Windows running-Companion screenshot reporting rendered pt-BR resources, and later commits only updated documentation and source-level coverage.
Evidence reviewed 6 items Current main still lacks this locale: The fetched default-branch tree contains en-us, fr-fr, nl-nl, zh-cn, and zh-tw resource catalogs, but no pt-br catalog, so the central requested capability remains necessary.
Resource catalog parity: The added pt-BR catalog has 2,429 resource entries, exactly matches the en-us key set, and has no duplicate resource keys.
Runtime selection and focused tests: App permits the new locale through the existing injection-safe whitelist, and the resource, protocol, session-title, Local AI, and permissions test loops explicitly include pt-br.
Findings None None.
Security None None.

How this fits together

The Tray app selects a WinUI resource catalog from Windows or an approved environment override, then applies localized strings across onboarding, settings, tray, and diagnostics windows. The resource catalog feeds both XAML localization and runtime string lookup.

flowchart LR
  A[Windows display language] --> C[Locale selection]
  B[Language override] --> C
  C --> D[Approved locale check]
  D --> E[pt-BR resource catalog]
  E --> F[Tray and onboarding UI]
Loading

Before merge

  • Resolve merge risk (P1) - The branch base predates two current-main commits, so required validation should run against the exact merge head before landing.
  • Complete next step (P2) - No mechanical repair is outstanding; this PR needs ordinary maintainer merge review and exact-merge-head validation.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Localization catalog production +7,137, tests +10, docs +3 The production growth is a complete 2,429-entry locale catalog, with focused existing test loops updated for the new supported locale.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the focused pt-BR catalog after normal exact-merge-head Windows validation, retaining the existing key, placeholder, duplicate-key, and user-visible UI proof safeguards.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the focused pt-BR catalog after normal exact-merge-head Windows validation, retaining the existing key, placeholder, duplicate-key, and user-visible UI proof safeguards.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a bug report. The feature path is concretely evidenced by the contributor's Windows running-UI screenshot and the current resource-selection source.

Is this the best way to solve the issue?

Yes. A standard WinUI resource catalog, the existing safe locale override, and current locale validation are the narrow maintainable implementation path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against f46400aab24e.

Labels

Label justifications:

  • P3: This is an optional interface-language enhancement with no demonstrated impact on runtime authority, delivery, or availability.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The changed production path is the App locale whitelist and pt-BR resource catalog. The contributor supplied a Windows running-Companion screenshot reporting rendered pt-BR resources, and later commits only updated documentation and source-level coverage.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed production path is the App locale whitelist and pt-BR resource catalog. The contributor supplied a Windows running-Companion screenshot reporting rendered pt-BR resources, and later commits only updated documentation and source-level coverage.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The changed production path is the App locale whitelist and pt-BR resource catalog. The contributor supplied a Windows running-Companion screenshot reporting rendered pt-BR resources, and later commits only updated documentation and source-level coverage.

Evidence

What I checked:

  • Current main still lacks this locale: The fetched default-branch tree contains en-us, fr-fr, nl-nl, zh-cn, and zh-tw resource catalogs, but no pt-br catalog, so the central requested capability remains necessary. (src/OpenClaw.Tray.WinUI/Strings, f46400aab24e)
  • Resource catalog parity: The added pt-BR catalog has 2,429 resource entries, exactly matches the en-us key set, and has no duplicate resource keys. (src/OpenClaw.Tray.WinUI/Strings/pt-br/Resources.resw:1, 192b2e16fb09)
  • Runtime selection and focused tests: App permits the new locale through the existing injection-safe whitelist, and the resource, protocol, session-title, Local AI, and permissions test loops explicitly include pt-br. (src/OpenClaw.Tray.WinUI/App.xaml.cs:294, 192b2e16fb09)
  • Prior review findings are addressed: The current locale validation and generated-session-title checks include pt-br, resolving the latest P3 coverage findings from the prior review cycle. (tests/OpenClaw.Tray.Tests/SessionTitleFormatterTests.cs:195, 192b2e16fb09)
  • After-fix UI evidence: The contributor reported a Windows launch at the current production-change head and attached a running Companion UI screenshot showing pt-BR rendering; later commits changed only tests and documentation. (192b2e16fb09)
  • Independent helper limitation: The repository autoreview helper correctly refused a complete branch review because the 345,216-byte catalog diff exceeds its safe bundle limit; this is a reviewer tooling limitation, not a contributor defect. (src/OpenClaw.Tray.WinUI/Strings/pt-br/Resources.resw:1, 192b2e16fb09)

Likely related people:

  • Scott Hanselman: Current history shows Scott authored the prior localization documentation standardization and the default-branch locale-related baseline commit. (role: recent localization documentation and validation contributor; confidence: medium; commits: 2439d4371096, ae766dc21bbd; files: docs/LOCALIZATION.md, tests/OpenClaw.Tray.Tests/LocalizationValidationTests.cs)
  • Barbara Kudiess: Barbara's recent App refactor is the relevant ownership history for the small locale-whitelist edit in App.xaml.cs. (role: recent App architecture contributor; confidence: medium; commits: 17a8b0363a82; files: src/OpenClaw.Tray.WinUI/App.xaml.cs)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (5 earlier review cycles)
  • reviewed 2026-08-28T19:25:51.411Z sha 043d4f4 :: needs real behavior proof before merge. :: [P1] Synchronize pt-BR with the current resource key set | [P1] Remove the duplicate DebugPage resource entry
  • reviewed 2026-08-28T22:56:28.737Z sha 6788eaf :: needs changes before merge. :: [P2] Include pt-BR in the supported test locale list
  • reviewed 2026-08-28T23:01:28.303Z sha 6788eaf :: needs changes before merge. :: [P1] Allow pt-BR as a Latin-script invariant locale | [P2] Include pt-BR in the supported runtime test locale list | [P3] Replace the em dash in the translated heading
  • reviewed 2026-08-28T23:30:42.054Z sha cfb58ba :: needs changes before merge. :: [P3] Document pt-BR as a supported locale
  • reviewed 2026-08-28T23:40:23.504Z sha 87a1cc6 :: needs changes before merge. :: [P3] Cover pt-BR in generated session-title resource checks | [P3] Update the fixed supported-locale directory assertion

payaci added 2 commits August 28, 2026 16:48
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
@payaci

payaci commented Aug 28, 2026

Copy link
Copy Markdown
Author

Validated on current HEAD.

Built and launched OpenClaw locally and verified pt-BR resources render in the running Companion UI.
b10068b8-319e-461e-9cc6-aede74a86430

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Aug 28, 2026
@payaci

payaci commented Aug 28, 2026

Copy link
Copy Markdown
Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 28, 2026
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 28, 2026
@payaci

payaci commented Aug 28, 2026

Copy link
Copy Markdown
Author

Resolved the remaining localization documentation finding:

  • Added pt-BR to supported locales table
  • Added pt-BR to OPENCLAW_LANGUAGE testing example

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@payaci

payaci commented Aug 28, 2026

Copy link
Copy Markdown
Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant