Localize remaining English strings in tray UI#624
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 4, 2026, 4:43 PM ET / 20:43 UTC. Summary Reproducibility: not applicable. this is a localization cleanup PR rather than a bug report. Current master still has representative hard-coded tray strings, so review is based on source, diff, comments, and repository policy. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the localization cleanup after redacted real tray proof demonstrates representative affected tray surfaces under a non-English or deferred locale. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a localization cleanup PR rather than a bug report. Current master still has representative hard-coded tray strings, so review is based on source, diff, comments, and repository policy. Is this the best way to solve the issue? Yes for the implementation direction: x:Uid plus LocalizationHelper matches the repository localization pattern. The remaining blocker is merge evidence from a real tray run, not a different code path. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 99efc50cbc22. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
d6d0342 to
7fbee25
Compare
Adopts the standard x:Uid + LocalizationHelper pattern for English strings that were previously hard-coded across the WinUI tray app. Pages wired with x:Uid: - AgentEventsPage, SkillsPage, SessionsPage, SandboxPage - CronPage (full form, presets, infobars, empty/loading state) - HubWindow title status text Runtime strings routed through LocalizationHelper.GetString / Format / GetConnectionStatusText: - BindingsPage, ConfigPage, CronPage, DebugPage, SessionsPage, UsagePage InfoBar titles - HubWindow.BuildCommandList (23 command palette entries + 5 toggle subtitles) - CommandCenterStateBuilder (15 warning titles) - AgentEventsPage Live/Offline status; SkillsPage badge + count formats Adds 67 new resw keys, seeded English-only across all 5 locales (en-us, fr-fr, nl-nl, zh-cn, zh-tw) using the established deferred-translation pattern. Each new key is registered in LocalizationValidationTests.InvariantOrDeferredResourceKeys so the key-parity, format-placeholder, and mojibake-detector tests pass. Validated: Tray.Tests 877/877; Shared.Tests 2045 passed / 29 skipped; localization suite 32/32. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
7fbee25 to
c7861f3
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Empty commit to retrigger automated review after the previous re-review workflow failed due to a hardcoded 'main' branch lookup against this repo (default branch is 'master'). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Addresses the rest of issue openclaw#569 that the original PR commit missed. Changes: - ConnectionPage.xaml: remove hardcoded English ToolTipService.ToolTip / AutomationProperties.Name from the WSL gateway Start/Stop/Restart buttons (now resolved via x:Uid + attached-property resw keys), and from StripTerminalButton (set dynamically in code-behind from the localized GatewayHostAccessPlan). - ConnectionPage.xaml.cs: switch the parameterized host-controls description to LocalizationHelper.Format so a translator-side FormatException surfaces the raw template instead of crashing the page. Also call AutomationProperties.SetName on the WSL GatewayHostOpenTerminalButton alongside SetToolTip so screen readers announce the localized 'Open terminal' / 'Open SSH terminal' label. - Services/GatewayHostAccess.cs: localize TerminalLabel, TerminalTooltip, and DisabledReason at the data source via a small delegate-based indirection (GatewayHostAccessLocalization). Defaults to identity (return the resource key) so the file stays unit-testable without a WinUI runtime; App.xaml.cs wires the delegates up to LocalizationHelper at startup so the running app sees real localized strings. - Strings/{en-us,fr-fr,nl-nl,zh-cn,zh-tw}/Resources.resw: add 11 new keys for the button tooltip/automation-name attached properties and the GatewayHostAccess plan strings. English-only seeded; deferred translation per existing convention. - LocalizationValidationTests.cs: register the new keys in InvariantOrDeferredResourceKeys (required by the all-or-none cross-locale parity test). Validated with the WinUI build, OpenClaw.Tray.Tests (934 passed), OpenClaw.Shared.Tests (2045 passed / 29 skipped), and scripts/Test-Localization.ps1 -StrictHardcodedXaml (baseline only). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolves conflicts between PR openclaw#624 (localize remaining tray strings) and the PR openclaw#558 / PR openclaw#597 / openclaw#686 localization work landed in master. Conflict resolutions - 6 XAML files (AgentEventsPage, ConnectionPage, CronPage, SandboxPage, SessionsPage, HubWindow): took master versions - CronPage.xaml.cs: master + re-applied 2 openclaw#624 hunks (JobCompletedInfoBar, ShowDisconnected) - 5 Resources.resw files: reset to master and re-injected 80 unique openclaw#624 keys via text injection so XML entities (") are preserved verbatim - LocalizationValidationTests.cs: pruned 17 obsolete and 7 over-deferred entries from InvariantOrDeferredResourceKeys Regression caught by adversarial review - AgentEventsPage / SkillsPage runtime code overrides XAML defaults with LocalizationHelper.GetString / Format calls. The 7 corresponding keys were seeded English-only across all locales so fr/nl/zh users would have seen English status badges and skill counters at runtime - Translated those 7 keys in fr-fr, nl-nl, zh-cn, zh-tw using the existing XAML translations as canonical source (28 strings total) - nl-nl AgentEventsPage_Status_Offline = "Niet verbonden" (matches the Status == Connected runtime check) so the all-or-none parity test passes - Stripped UTF-8 BOM from nl-nl/Resources.resw introduced by the rewrite so all 5 locales share the same encoding Validation - ./build.ps1 clean - OpenClaw.Shared.Tests: 2045 passed / 29 skipped - OpenClaw.Tray.Tests: 936 passed / 0 failed - Key parity: 1885 entries per locale across all 5 locales Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adopts the standard x:Uid + LocalizationHelper pattern for English strings that were previously hard-coded across the WinUI tray app.
Pages wired with x:Uid:
Runtime strings routed through LocalizationHelper.GetString / Format / GetConnectionStatusText:
Adds new resw keys across all 5 locales (en-us, fr-fr, nl-nl, zh-cn, zh-tw). Each new key is registered in LocalizationValidationTests so the key-parity, format-placeholder, and mojibake-detector tests pass.
Master merge update (commit
8fe52196)Merged in master to resolve drift with PR #558 / #597 / #686 that landed since this PR opened. Eleven conflicts resolved:
")InvariantOrDeferredResourceKeysLocalization regression caught during merge review
Adversarial dual-model review (Claude Opus + GPT Codex) flagged a real regression: AgentEventsPage and SkillsPage runtime code overrides XAML defaults with
LocalizationHelper.GetString/Formatcalls. The 7 corresponding keys had been seeded English-only across all locales, so fr/nl/zh users would have seen English status badges and skill counters at runtime despite translated XAML defaults.Fixed by translating those 7 keys in fr-fr, nl-nl, zh-cn, zh-tw using the existing translated XAML defaults as the canonical source (28 strings total):
nl-nl AgentEventsPage_Status_Offlineuses "Niet verbonden" instead of the loanword "Offline" because the runtime check isStatus == Connected(a connection state, not user presence) and the all-or-none parity test rejects byte-identical matches. Also stripped a stray UTF-8 BOM fromnl-nl/Resources.reswso all 5 locales share the same encoding.Validation
./build.ps1cleanOpenClaw.Shared.Tests: 2045 passed / 29 skippedOpenClaw.Tray.Tests: 936 passed / 0 failedFixes #569.