-
Notifications
You must be signed in to change notification settings - Fork 157
[Localization Audit] Hard-coded XAML strings need x:Uid localization (69 candidates across 7 files) #569
Copy link
Copy link
Open
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.automationclawsweeper:current-main-reproClawSweeper found a high-confidence current-main issue reproduction.ClawSweeper found a high-confidence current-main issue reproduction.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦀 challenger crabExceptional issue quality: high-confidence current-main reproduction and actionable evidence.Exceptional issue quality: high-confidence current-main reproduction and actionable evidence.localization
Metadata
Metadata
Assignees
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.automationclawsweeper:current-main-reproClawSweeper found a high-confidence current-main issue reproduction.ClawSweeper found a high-confidence current-main issue reproduction.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦀 challenger crabExceptional issue quality: high-confidence current-main reproduction and actionable evidence.Exceptional issue quality: high-confidence current-main reproduction and actionable evidence.localization
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
pwsh .\scripts\Test-Localization.ps1exits 0 but emits 69 candidate hard-coded XAML string warnings across 7 files. Nox:Uidattributes or matchingResources.reswentries 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:UidPages/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:
"Cron Jobs", toolbar"Refresh","New job"<ConnectionInfoBar>title"Gateway disconnected"and message"Connect to a gateway to load cron jobs."<Button Content="Open Connection">"Name","Schedule","Expression","Timezone","Every","Unit","Run at","Prompt / payload","Delivery","Channel","Advanced options","Session behavior","Wake mode""Every","At","Cron","Minutes","Hours","Days","Silent (none)","Notify me (announce)","New session each run","Resume main session","Now (immediate)","Queue (wait for idle)""Hourly","Daily 9am","Daily 6pm","Weekdays","Weekly"PlaceholderText:"Morning brief","Optional","Date","3:30 PM","What should the agent do?","e.g. webchat"<FormCancelButton Content="Cancel">,<FormSaveButton Content="Create job">"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:UidPages/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>\:Text=→ControlUid.TextContent=→ControlUid.ContentPlaceholderText=→ControlUid.PlaceholderTextHeader=→ControlUid.HeaderTranslate 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