Skip to content

[Localization Audit] fix(loc): wire x:Uid for 5 hard-coded XAML strings (safe subset) - #617

Closed
github-actions[bot] wants to merge 1 commit into
masterfrom
loc/audit-fix-safe-subset-b795e0a1db71f9bf
Closed

[Localization Audit] fix(loc): wire x:Uid for 5 hard-coded XAML strings (safe subset)#617
github-actions[bot] wants to merge 1 commit into
masterfrom
loc/audit-fix-safe-subset-b795e0a1db71f9bf

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Localization audit (Test-Localization.ps1) found 69 candidate hard-coded XAML strings. This PR fixes the 5 safest items — those where resource keys already existed in all 5 locales (en-us, fr-fr, nl-nl, zh-cn, zh-tw) or could be populated from existing translated values.

Candidate count: 69 → 64.

Changes

File Element x:Uid added Notes
SkillsPage.xaml EnabledHeaderText SkillsPage_Enabled All 5 locale keys existed
SkillsPage.xaml DisabledHeaderText SkillsPage_Disabled All 5 locale keys existed
HubWindow.xaml TitleStatusText HubWindow_Disconnected All 5 locale keys existed
VoiceSettingsPage.xaml PiperPreviewLabel VoiceSettingsPage_PiperPreviewLabel New .Text keys added, values copied from existing PiperPreviewButton.Content translations
VoiceSettingsPage.xaml PreviewVoiceLabel VoiceSettingsPage_PreviewVoiceLabel New .Text keys added, values copied from existing PreviewVoiceButton.Content translations

Remaining debt

64 candidates still remain — the bulk (~58) are in CronPage.xaml (new feature, fully un-localized). Those require fresh translations and broader review before fixing. Also pending: SessionsPage.xaml (3), AgentEventsPage.xaml (2), SandboxPage.xaml (1).

Generated by Localization Audit; see workflow run.

…resource keys

- SkillsPage: add x:Uid='SkillsPage_Enabled' / 'SkillsPage_Disabled' to
  EnabledHeaderText / DisabledHeaderText (keys existed in all 5 locales)
- HubWindow: add x:Uid='HubWindow_Disconnected' to TitleStatusText
  (key existed in all 5 locales)
- VoiceSettingsPage: add x:Uid to PiperPreviewLabel and PreviewVoiceLabel;
  add corresponding *.Text keys to all 5 locale resw files, reusing the
  translated values from the existing PiperPreviewButton.Content and
  PreviewVoiceButton.Content entries

Reduces Test-Localization.ps1 candidate count from 69 → 64.
Remaining 64 candidates (CronPage.xaml ~58, SessionsPage.xaml 3,
AgentEventsPage.xaml 2, SandboxPage.xaml 1) tracked separately.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@clawsweeper

clawsweeper Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codex review: needs changes before merge. Reviewed June 1, 2026, 2:24 AM ET / 06:24 UTC.

Summary
The branch adds x:Uid wiring for five WinUI TextBlocks and adds two VoiceSettings label resource keys across the five locale .resw files.

Reproducibility: Source-reproducible rather than runtime-reproduced: current main shows the touched XAML labels are later overwritten by code-behind assignments. A Windows UI run under a non-English display language would provide the final visual confirmation.

Review metrics: 2 noteworthy metrics.

  • Diff surface: 8 files changed, 35 additions, 5 deletions. The patch is small and localized to WinUI XAML plus locale resources.
  • Runtime overwrite paths: 2 code-behind paths still assign English text. Those assignments are why static x:Uid wiring alone does not complete the visible localization fix.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🌊 off-meta tidepool
Patch quality: 🦐 gold shrimp
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Localize SkillsPage header count assignments and HubWindow status assignments.
  • [P2] Run the localization audit plus the AGENTS-required build, shared tests, and tray tests.

Mantis proof suggestion
A short desktop proof under a non-English Windows display language would directly show whether the repaired labels stay localized after runtime updates. A maintainer can ask Mantis to capture proof by posting a new PR comment that starts with the OpenClaw Mantis account mention, followed by:

visual task: verify under a non-English Windows display language that Skills header counts and Hub title status stay localized after loading and status changes.

Risk before merge

  • [P1] The localization audit count can improve even though the visible Skills headers and Hub title status still return to English after runtime updates.
  • [P1] The PR body does not show the AGENTS-required build, shared test, and tray test validation results for this change.

Maintainer options:

  1. Decide the mitigation before merge
    Keep the safe x:Uid/resource additions, then localize the code-behind assignments that own the live Skills header counts and Hub title status text.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] There is a bounded repair: preserve the safe x:Uid/resource work and update the runtime assignments that currently bypass localization.

Security
Cleared: The diff only touches WinUI localization markup and .resw resources, with no dependency, CI, secret, package, or code-execution surface change.

Review findings

  • [P2] Localize the headers where counts are assigned — src/OpenClaw.Tray.WinUI/Pages/SkillsPage.xaml:29
  • [P2] Use localized status text in the title update path — src/OpenClaw.Tray.WinUI/Windows/HubWindow.xaml:80
Review details

Best possible solution:

Keep the safe x:Uid/resource additions, then localize the code-behind assignments that own the live Skills header counts and Hub title status text.

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

Source-reproducible rather than runtime-reproduced: current main shows the touched XAML labels are later overwritten by code-behind assignments. A Windows UI run under a non-English display language would provide the final visual confirmation.

Is this the best way to solve the issue?

No. x:Uid wiring is the right static-XAML mechanism, but the PR also needs LocalizationHelper-backed runtime strings for the code paths that mutate those labels.

Full review comments:

  • [P2] Localize the headers where counts are assigned — src/OpenClaw.Tray.WinUI/Pages/SkillsPage.xaml:29
    Adding x:Uid here only localizes the initial XAML text. As soon as skills load, RebuildCards overwrites both headers with English interpolated strings, so non-English users still see Enabled (...) and Disabled (...); use localized format strings or localized base labels in that runtime path.
    Confidence: 0.91
  • [P2] Use localized status text in the title update path — src/OpenClaw.Tray.WinUI/Windows/HubWindow.xaml:80
    The new x:Uid is overwritten whenever BindToAppState or AppState changes call UpdateTitleBarStatus, which assigns English status strings before setting TitleStatusText.Text. Route those status labels through the existing localized status resources so the Hub title bar stays localized after connection updates.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 1d58d59673c9.

Label changes

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P3: This is a low-risk localization cleanup PR with limited UI impact and a narrow repair path.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The contributor proof gate does not apply to this github-actions[bot] draft PR, though visual localization proof would help after the repair.
Evidence reviewed

Acceptance criteria:

  • [P1] pwsh ./scripts/Test-Localization.ps1.
  • [P1] ./build.ps1.
  • [P1] dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore.
  • [P1] dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore.

What I checked:

Likely related people:

  • Scott Hanselman: git blame shows the current Skills, Hub status, and Voice preview assignment lines date to the bundled setup app work. (role: introduced current assignment paths; confidence: medium; commits: aaf50b758504, 15e26493a8b9; files: src/OpenClaw.Tray.WinUI/Pages/SkillsPage.xaml.cs, src/OpenClaw.Tray.WinUI/Windows/HubWindow.xaml.cs, src/OpenClaw.Tray.WinUI/Pages/VoiceSettingsPage.xaml.cs)
  • Ranjesh Jaganathan: git log shows repeated recent work on HubWindow/AppState navigation and warning-clean follow-up touching these UI paths. (role: recent area contributor; confidence: high; commits: a727197dd709, e85e2bebf6df, f35328e12be1; files: src/OpenClaw.Tray.WinUI/Windows/HubWindow.xaml.cs, src/OpenClaw.Tray.WinUI/Pages/SkillsPage.xaml.cs)
  • Christine Yan: git log shows prior Skills redesign and voice settings work near the touched surfaces. (role: adjacent UI feature contributor; confidence: medium; commits: 94ff2f449433, 8864e9699437; files: src/OpenClaw.Tray.WinUI/Pages/SkillsPage.xaml.cs, src/OpenClaw.Tray.WinUI/Pages/VoiceSettingsPage.xaml.cs)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • 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.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Jun 1, 2026
@christineyan4

Copy link
Copy Markdown
Contributor

This PR is superseded by #558 which covers these localization changes and more.

@ranjeshj

ranjeshj commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Closing as superseded by #558, which covers these localization fixes as part of the broader XAML and code-behind localization pass.

@ranjeshj ranjeshj closed this Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation localization P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants