Skip to content

[Localization Audit] Hard-coded XAML strings need x:Uid localization (69 candidates across 7 files) #569

@github-actions

Description

@github-actions

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" — missing x:Uid
  • <TextBlock Text="Clear" inside ClearButton — missing x: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 missing x: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:

  1. Add x:Uid to the XAML element — use the naming convention <PageName>_<ControlName> or <ControlName> when the name is already unique (e.g., x:Uid="CronPage_FormSaveButton").

  2. Add matching resource keys to every Resources.resw in src\OpenClaw.Tray.WinUI\Strings\<locale>\:

    • For Text=ControlUid.Text
    • For Content=ControlUid.Content
    • For PlaceholderText=ControlUid.PlaceholderText
    • For Header=ControlUid.Header
  3. Translate all 5 locales: en-us, fr-fr, nl-nl, zh-cn, zh-tw.

  4. Timezone ComboBox items (America/New_York, UTC, etc.) are IANA identifiers and should not be localized — remove the Content= text values from the warning scope or add an exclusion to Test-Localization.ps1.

  5. Re-run pwsh .\scripts\Test-Localization.ps1 -StrictHardcodedXaml to confirm clean.

Quick wins (low risk, English only needed as seed)

The smallest safe subset to fix first:

  • HubWindow.xamlTitleStatusText "Disconnected"
  • SkillsPage.xaml — "Enabled" / "Disabled" headers
  • SessionsPage.xaml — "Open chat" button
  • AgentEventsPage.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

No one assigned

    Labels

    P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.automationclawsweeper:current-main-reproClawSweeper found a high-confidence current-main issue reproduction.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper 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.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦀 challenger crabExceptional issue quality: high-confidence current-main reproduction and actionable evidence.localization

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions