Repository navigation
fix(pt-BR): repair Brazilian Portuguese localization (replaces #1265) - #1295
Conversation
# 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.
- Add missing PermissionsPage_Cap_Ollama_Label/Description keys (deferred, English seed) brought in by the origin/main merge. - Revert 352 keys that all other non-English locales (fr-fr, nl-nl, zh-cn, zh-tw) deliberately left as English-seeded/deferred; pt-BR had translated them, which violated the Resources_AreTranslatedAllOrNoneAcrossNonEnglish Locales gate. - Add pt-BR translations for 56 keys that all other non-English locales already translate, so pt-BR is no longer the outlier left in English. - All 15 LocalizationValidationTests pass; no gate weakened.
- SessionTitle_Heartbeat: fix 'Pulsão' (impulse/urge) typo -> 'Pulsação' (heartbeat). - CronPage_PROMPTPAYLOAD.Text: 'CARGA' -> 'CARGA ÚTIL' (payload), 'carga' alone means load/cargo. - ConnectionPage_TopologyLocal: 'Localhost' -> 'Nesta máquina'; localhost names a specific address, not the local-execution topology. - SettingsTokenTextBox.Header / ConnectionStatusWindow_SharedGatewayToken. Header: 'Chave' (key) -> 'Token de acesso' to avoid confusion with API/ encryption keys while keeping the established Token loanword. All 15 LocalizationValidationTests and the full 2812-test Tray suite pass.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 4, 2026, 7:35 AM ET / 11:35 UTC. ClawSweeper reviewWhat this changesThe branch adds Brazilian Portuguese tray resources, permits pt-BR in the development language override, documents the locale, and expands supported-locale validation coverage. Merge readiness✅ Ready for maintainer review Keep open for maintainer handling. This collaborator-authored, actively landing PR is not eligible for automated closure, and the reviewed locale resource, whitelist, documentation, and coverage changes form a coherent implementation with no blocking patch defect found. Priority: P3 Review scores
Verification
How this fits togetherTray localization receives the Windows display language or a development override, resolves the corresponding resource catalog, and supplies text to WinUI setup, settings, and tray surfaces. The added catalog extends that path to Brazilian Portuguese. flowchart LR
A[Windows language or dev override] --> B[Approved locale list]
B --> C[Localization helper]
C --> D[pt-BR resource catalog]
D --> E[Setup and tray UI]
E --> F[Localized labels and messages]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Land the focused pt-BR catalog and its locale-parity safeguards once normal maintainer merge checks complete, preserving the explicit override whitelist and all-locale resource contract. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds a supported locale rather than reporting a failing current behavior. The source path and resource contract are directly inspectable. Is this the best way to solve the issue? Yes. A complete resource catalog plus an explicit development-override whitelist and parity tests is the narrowest maintainable extension of the existing localization design. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8e5526bb4b72. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
Merges origin/main (16cb689, 31a8c65 - camera/location consent gating) forward. Adds real pt-BR translations for the 8 new privacy/location strings that fr-fr, nl-nl, zh-cn, and zh-tw all already translate: - Toast_CameraCaptured / Toast_CameraCapturedDetail - Toast_LocationRead / Toast_LocationReadDetail - RecordingConsent_LocationTitle / RecordingConsent_LocationDescription - SettingsRow_Location_Header.Text / SettingsRow_Location_Description.Text All 15 LocalizationValidationTests, the full 2824-test Tray suite, the 3873-test Shared suite, and the 1025-test SetupEngine suite pass.
…st wording
en-us (and fr-fr/nl-nl/zh-cn/zh-tw) updated the screen/camera recording
consent dialog from 'recording' phrasing to 'capture' phrasing, and
replaced the old 'you can change this later in settings' footer with a
trust warning ('Only allow this if you trust the connected agent and
gateway.'). pt-BR still had the old recording-era copy. Updated to match
current semantics, following the fr-fr/nl-nl phrasing pattern:
- RecordingConsent_ScreenTitle/CameraTitle: 'Allow X recording?' ->
'Allow X capture?' (gravação -> captura)
- RecordingConsent_ScreenDescription/CameraDescription: reworded around
capture access rather than recording permission; dropped the stale
'until you change it in Settings' clause to match current en-us.
- RecordingConsent_Privacy: 'you can change this later in settings' ->
'only allow this if you trust the connected agent and gateway'
(security-relevant trust warning).
- RecordingConsent_Allow: 'Permitir gravação' -> 'Permitir', matching
the simplified en-us/fr-fr/nl-nl button label.
All 20 localization/consent-contract tests, the full 2824-test Tray
suite, the 3873-test Shared suite, and the 1025-test SetupEngine suite
pass.
…review
- VoiceSettingsPage_PrivacyNote.Text (HIGH): pt-BR falsely claimed no
audio data is ever sent to any cloud service. Current en-us says
cloud TTS providers receive response TEXT for synthesis while
microphone audio itself is not sent to them. Corrected to match
fr-fr/nl-nl/zh-cn/zh-tw semantics.
- SettingsRow_ScreenRec_Header.Text / SettingsRow_CamRec_Header.Text:
'gravação' (recording) -> 'captura' (capture), matching current
en-us 'Allow screen/camera capture' and the already-fixed
RecordingConsent_* dialog strings.
- SandboxPage_ByDefaultTheAgent.Text / Onboarding_Ready_Node_Canvas_Sub:
'área de trabalho' (Desktop) mistranslated 'workspace' -> 'espaço de
trabalho' (workspace). Left every other 'Área de Trabalho' instance
alone since those correctly refer to the Desktop folder grant.
- UrlApproval_NoHint: fixed a double-period typo ('bloquear esta
URL..' -> '.').
- Toast_ScreenCaptured: reworded to present-progressive ('Capturando a
tela') to match the already-fixed Toast_ScreenCapturedDetail and the
active (not completed) capture state it announces.
All 20 localization/consent-contract tests, the full 2824-test Tray
suite, the 3873-test Shared suite, and the 1025-test SetupEngine suite
pass.
|
Maintainer proof disposition: accept the explicitly documented x:Uid visual-proof blocker for this resource-only localization repair. A process-local global-qualifier spike was built and exercised at current head, but it regressed existing code-driven pt-BR rendering without switching x:Uid content, so it was fully reverted and the original behavior was reverified. We will not install a persistent language pack on the shared host or expand this PR into a resource-pipeline redesign. Exact all-locale source comparison, localization/placeholder/key-policy tests, full required suites, and partial current-head pt-BR runtime rendering provide the merge evidence for the resource values. Proceed only after required CI is green. |
) Root cause: after 31a8c65/16cb6897 gated screen.snapshot/camera.snap/ location.get behind interactive consent, NodeService.EnsureCaptureConsentAsync awaited the RecordingConsentDialog's Task<bool> with no timeout anywhere. An unattended caller (local MCP HTTP client, automated agent, hosted CI) hung forever waiting for a human who would never appear, only "recovering" when the caller's own HttpClient.Timeout (30s in the failing integration tests) fired. This broke McpHttpServerIntegrationTests.CameraSnap_ReturnsImageOr- WellFormedError and ScreenSnapshot_ReturnsImageOrWellFormedError, blocking PRs #1282, #1294, #1295, #1296. Fix: add a fail-closed, configurable consent-prompt timeout (SettingsData.CaptureConsentTimeoutMs, default 120s) enforced by a new pure ConsentPromptTimeoutGate helper. On timeout the prompt is denied (never granted) and the dangling dialog window is force-closed. The bounded task is independent of any single caller's CancellationToken so the shared in-flight prompt (_screen/_camera/_locationConsentInFlight) still resolves for any other concurrent waiter even if the owning caller cancels first. A late Allow click that races the timeout no longer persists a stale grant after the request has already been denied. Interactive UI consent (Allow/Deny, persistence) is unchanged. - Never bypasses or auto-grants consent: timeout always resolves to denied. - TrayAppFixture sets CaptureConsentTimeoutMs=3000 for deterministic CI, not a test/client timeout change - this is a real product settings knob. - New unit tests cover fail-closed timeout, pass-through grant/deny, and the shared-prompt-survives-caller-cancellation case a rubber-duck review found. Co-authored-by: Copilot App <[email protected]>
…enclaw#1300) Root cause: after 31a8c65/16cb6897 gated screen.snapshot/camera.snap/ location.get behind interactive consent, NodeService.EnsureCaptureConsentAsync awaited the RecordingConsentDialog's Task<bool> with no timeout anywhere. An unattended caller (local MCP HTTP client, automated agent, hosted CI) hung forever waiting for a human who would never appear, only "recovering" when the caller's own HttpClient.Timeout (30s in the failing integration tests) fired. This broke McpHttpServerIntegrationTests.CameraSnap_ReturnsImageOr- WellFormedError and ScreenSnapshot_ReturnsImageOrWellFormedError, blocking PRs openclaw#1282, openclaw#1294, openclaw#1295, openclaw#1296. Fix: add a fail-closed, configurable consent-prompt timeout (SettingsData.CaptureConsentTimeoutMs, default 120s) enforced by a new pure ConsentPromptTimeoutGate helper. On timeout the prompt is denied (never granted) and the dangling dialog window is force-closed. The bounded task is independent of any single caller's CancellationToken so the shared in-flight prompt (_screen/_camera/_locationConsentInFlight) still resolves for any other concurrent waiter even if the owning caller cancels first. A late Allow click that races the timeout no longer persists a stale grant after the request has already been denied. Interactive UI consent (Allow/Deny, persistence) is unchanged. - Never bypasses or auto-grants consent: timeout always resolves to denied. - TrayAppFixture sets CaptureConsentTimeoutMs=3000 for deterministic CI, not a test/client timeout change - this is a real product settings knob. - New unit tests cover fail-closed timeout, pass-through grant/deny, and the shared-prompt-survives-caller-cancellation case a rubber-duck review found. Co-authored-by: Copilot App <[email protected]>
Preserve USD cost semantics, add the new Local AI resource copy, and keep the language override whitelist covered by locale validation. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 188ccbdd-7287-4d8c-a9ca-160f78cc811b
Summary
Repairs and completes the Brazilian Portuguese localization from superseded PR #1265. The branch is merged with current
mainat8e5526bb4b72232cd84e6e1163f019037ff975eeand preserves the repository's all-or-none locale policy.Required proof pools
windows-winui-interactiveWhat changed
Strings/pt-br/Resources.reswand enablespt-brin the validatedOPENCLAW_LANGUAGEdevelopment override.Onboarding_Welcome_LocalAiAvailabilityDetail, updates the Local AI badge semantics, and changes the memory unit fromGBtoGiB.US$, not Brazilian real.The final PR delta remains limited to the original 9 localization-related files.
Hanselman dual-model review
Independent Claude Opus 5 and GPT-5.3-Codex reviews inspected all 9 changed files and the complete 2,440-key resource file.
US$Both models found no critical issues and independently confirmed XML/resource correctness, placeholder/token preservation, accelerator literals, packaging inclusion, no em dashes, and no accidental English/source resource changes. Opus also suggested several low-severity editorial preferences around capitalization, fallback terminology, warning phrasing, and quote typography. Maintainer assessment classified those as non-blocking translation-style choices rather than correctness defects, so contributor wording was preserved.
Validation
Validated at head
c2dec7472f91574d78f89d12bcec7ed1e98c3b90:Additional exact-head resource audit:
The localization script still reports the same two pre-existing hard-coded XAML warnings for
OpenClaw Windows CompanionandDisconnected; neither file is changed by this PR.Real behavior proof
At current head
c2dec747, the unpackaged WinUI app was launched successfully from the isolated branch build withOPENCLAW_LANGUAGE=pt-br,OPENCLAW_SKIP_UPDATE_CHECK=1, and an isolated tray data directory. The app reached the setup UI without a resource-load crash, raw resource-key leakage, or mojibake.Earlier current-branch runtime proof at
fda700c3showed code-driven pt-BR values throughLocalizationHelper, includingSomente MCP local, the localized MCP capability detail,Desconectado,Baixar Modelo, andDownload necessário. The changes from that head toc2dec747are current-main synchronization plus resource/docs/test reconciliation; locale selection code is unchanged.Native
x:Uidvisual switching remains blocked on this host.OPENCLAW_LANGUAGEcontrols the privateLocalizationHelperresource context but not WinUI's process-wide XAML resource context, and this Windows host has no pt-BR display language installed. A prior process-local qualifier experiment regressed working code-driven localization and was fully reverted. The maintainer proof disposition in the PR discussion explicitly accepts this blocker for this resource-focused PR. No persistent language pack was installed and no resource-pipeline redesign was introduced.Not verified / blocked
x:Uid-bound strings is unavailable for the accepted host/runtime reason above.Exact SHA
c2dec7472f91574d78f89d12bcec7ed1e98c3b90