Repository navigation
Description
Summary
pwsh .\scripts\Test-Localization.ps1 exits 0 but emits 69 candidate hard-coded XAML string warnings across 7 files. No x:Uid attributes or matching Resources.resw entries exist for these strings. Fixing requires accurate translations in all 5 active locales (en-us, fr-fr, nl-nl, zh-cn, zh-tw), which makes the full fix too broad to perform automatically without risking mistranslations.
Findings
Pages/AgentEventsPage.xaml (2 strings)
<TextBlock x:Name="LiveText" Text="Live"— missingx:Uid<TextBlock Text="Clear"insideClearButton— missingx:Uid
Pages/CronPage.xaml (57+ strings — newly added form)
All labels, placeholders, and button text in the "New cron job" form are hard-coded. Affected elements include:
- Page title
"Cron Jobs", toolbar"Refresh","New job" <ConnectionInfoBar>title"Gateway disconnected"and message"Connect to a gateway to load cron jobs."<Button Content="Open Connection">- Form fields:
"Name","Schedule","Expression","Timezone","Every","Unit","Run at","Prompt / payload","Delivery","Channel","Advanced options","Session behavior","Wake mode" - ComboBox items:
"Every","At","Cron","Minutes","Hours","Days","Silent (none)","Notify me (announce)","New session each run","Resume main session","Now (immediate)","Queue (wait for idle)" - Quick preset buttons:
"Hourly","Daily 9am","Daily 6pm","Weekdays","Weekly" - Timezone ComboBox items (these are TZ identifiers — may be intentionally non-localized)
PlaceholderText:"Morning brief","Optional","Date","3:30 PM","What should the agent do?","e.g. webchat"<FormCancelButton Content="Cancel">,<FormSaveButton Content="Create job">- Empty/loading states:
"Loading cron jobs...","No cron jobs configured","Cron jobs will appear here when configured via the gateway."
Pages/SandboxPage.xaml (1 auditor-flagged string)
<TextBlock Text="Commands the agent runs directly on the gateway aren't..."— long description paragraph missingx:Uid
Pages/SessionsPage.xaml (3 strings)
<TextBlock Text="Conversations this gateway is currently handling, grouped by channel."><TextBlock Text="Sessions appear here when a channel is connected and traffic is flowing."><Button Content="Open chat">
Pages/SkillsPage.xaml (2 strings)
<TextBlock x:Name="EnabledHeaderText" Text="Enabled"<TextBlock x:Name="DisabledHeaderText" Text="Disabled"
Pages/VoiceSettingsPage.xaml (2 strings)
<TextBlock x:Name="PiperPreviewLabel" Text="Preview"><TextBlock x:Name="PreviewVoiceLabel" Text="Preview Voice">
Windows/HubWindow.xaml (1 string)
<TextBlock x:Name="TitleStatusText" Text="Disconnected">
Recommended fix
For each affected control:
-
Add
x:Uidto the XAML element — use the naming convention<PageName>_<ControlName>or<ControlName>when the name is already unique (e.g.,x:Uid="CronPage_FormSaveButton"). -
Add matching resource keys to every
Resources.reswinsrc\OpenClaw.Tray.WinUI\Strings\<locale>\:- For
Text=→ControlUid.Text - For
Content=→ControlUid.Content - For
PlaceholderText=→ControlUid.PlaceholderText - For
Header=→ControlUid.Header
- For
-
Translate all 5 locales:
en-us,fr-fr,nl-nl,zh-cn,zh-tw. -
Timezone ComboBox items (
America/New_York,UTC, etc.) are IANA identifiers and should not be localized — remove theContent=text values from the warning scope or add an exclusion toTest-Localization.ps1. -
Re-run
pwsh .\scripts\Test-Localization.ps1 -StrictHardcodedXamlto confirm clean.
Quick wins (low risk, English only needed as seed)
The smallest safe subset to fix first:
HubWindow.xaml—TitleStatusText"Disconnected"SkillsPage.xaml— "Enabled" / "Disabled" headersSessionsPage.xaml— "Open chat" buttonAgentEventsPage.xaml— "Live" badge and "Clear" button
Generated by Localization Audit; see workflow run.
- expires on Jun 11, 2026, 5:51 AM UTC
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon May 28, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed May 28, 2026, 2:02 AM ET / 06:02 UTC.
Summary
Keep open: current main still reproduces the 69 hard-coded XAML localization candidates, and the open partial draft only covers a small quick-win subset. The work is actionable, but full cleanup needs maintainer localization decisions for translations and invariant timezone identifiers.
Reproducibility: yes. Running
pwsh ./scripts/Test-Localization.ps1 -SkipDotNetTests -StrictHardcodedXamlon current main fails with 69 candidates, and source inspection shows the listed controls still lack x:Uid.Next step
Manual review is safer because the full fix requires vetted translations, invariant-string policy, and coordination with the open partial draft.
Review details
Best possible solution:
Land a maintainer-approved localization cleanup that adds x:Uid/resource keys for every truly localizable string, explicitly exempts invariant identifiers, and either finishes or supersedes the partial draft at #536.
Do we have a high-confidence way to reproduce the issue?
Yes. Running
pwsh ./scripts/Test-Localization.ps1 -SkipDotNetTests -StrictHardcodedXamlon current main fails with 69 candidates, and source inspection shows the listed controls still lack x:Uid.Is this the best way to solve the issue?
Unclear for automation. Adding x:Uid and resource keys is the right shape, but vetted translations and timezone-invariant handling need maintainer/localization judgment before a broad fix lands.
AGENTS.md: found, but no applicable review policy affected this item.
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 6a5921883c86.
Label changes
Label changes:
clawsweeper:fix-shape-clear: Current issue advisory state no longer selects this label.Label justifications:
P3: This is low-risk localization debt and polish rather than a broken core workflow or urgent regression.impact:other: The issue affects user-visible localization coverage, which is maintainer-visible but does not fit the specific owned impact categories.Evidence reviewed
What I checked:
AGENTS.md:1, 6a5921883c86)scripts/Test-Localization.ps1:138, 6a5921883c86)src/OpenClaw.Tray.WinUI/Pages/CronPage.xaml:29, 6a5921883c86)src/OpenClaw.Tray.WinUI/Pages/AgentEventsPage.xaml:24, 6a5921883c86)tests/OpenClaw.Tray.Tests/LocalizationValidationTests.cs:330, 6a5921883c86)Likely related people:
scripts/Test-Localization.ps1,tests/OpenClaw.Tray.Tests/LocalizationValidationTests.cs,src/OpenClaw.Tray.WinUI/Pages/CronPage.xaml)src/OpenClaw.Tray.WinUI/Pages/CronPage.xaml,src/OpenClaw.Tray.WinUI/Pages/SessionsPage.xaml,src/OpenClaw.Tray.WinUI/Pages/SkillsPage.xaml)src/OpenClaw.Tray.WinUI/Windows/HubWindow.xaml,src/OpenClaw.Tray.WinUI/Strings/en-us/Resources.resw)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.github-actions commentedon May 30, 2026
🤖 This is an automated response from Repo Assist.
A couple of concrete suggestions on prioritizing this work:
Timezone identifiers should be excluded from the audit — IANA strings like
America/New_YorkandUTCare intentionally not localizable (they're technical identifiers, not user-facing copy). The recommended fix in the issue body is correct: add an exclusion toTest-Localization.ps1(or add a<!-- localization:ignore -->pattern), so these don't block the clean pass. That's a small change with no translation risk.Quick wins don't need all 5 translations up-front — The issue notes that
en-usseeds are enough to start. The existingLocalizationValidationTestsonly checks thatx:Uidelements have a matchingen-uskey; missingfr-fr/nl-nl/zh-cn/zh-twkeys don't fail the test suite. So the 4 quick-win strings (HubWindow.xaml"Disconnected",SkillsPage.xaml"Enabled"/"Disabled",SessionsPage.xaml"Open chat",AgentEventsPage.xaml"Live"/"Clear") can be wired withen-usonly now, and translations can follow.The existing PR #536 already covers some quick wins — it might be worth a rebase-and-expand rather than a fresh PR, given its history.
Localize remaining ConnectionPage / GatewayHostAccess strings
shanselman commentedon Jun 8, 2026
Closing as addressed by the merged localization PR #624, which localizes the remaining tray UI English strings using the existing x:Uid / LocalizationHelper resource patterns across the supported locale resource files.
If a fresh localization audit still finds remaining hard-coded candidates on current
master, please reopen or file a focused follow-up with the new candidate list.