Localize remaining English strings in tray UI#624
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 2, 2026, 9:09 PM ET / 01:09 UTC. Summary Reproducibility: not applicable. This PR is a localization cleanup rather than a bug report. Current main still shows the linked hard-coded string surface, and review was based on source, diff, comments, and repository policy. Review metrics: 3 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, full AGENTS validation reporting, and maintainer comfort with the sandbox warning wording. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR is a localization cleanup rather than a bug report. Current main still shows the linked hard-coded string surface, and review was 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 and safety-copy verification, not a different code path. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 53ff55aff974. Label changesLabel 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>
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.
Fixes #569.