Summary
The Test-Localization.ps1 audit script found 310 candidate hard-coded XAML strings that bypass the localization system. None of the 8 affected pages use x:Uid for their user-facing copy; instead they carry raw English strings directly in XAML attributes.
Locales present: en-us, nl-nl, fr-fr, zh-tw, zh-cn.
Findings
| File |
Hard-coded string count |
src/OpenClaw.Tray.WinUI/Pages/ConnectionPage.xaml |
70 |
src/OpenClaw.Tray.WinUI/Pages/CronPage.xaml |
58 |
src/OpenClaw.Tray.WinUI/Pages/SandboxPage.xaml |
32 |
src/OpenClaw.Tray.WinUI/Pages/PermissionsPage.xaml |
16 |
src/OpenClaw.Tray.WinUI/Pages/DebugPage.xaml |
11 |
src/OpenClaw.Tray.WinUI/Pages/ChatPage.xaml |
5 |
src/OpenClaw.Tray.WinUI/Pages/InstancesPage.xaml |
4 |
src/OpenClaw.Tray.WinUI/Pages/BindingsPage.xaml |
4 |
Example findings:
BindingsPage.xaml: <ConnectionInfoBar Message="Connect to a gateway to load bindings." Title="Gateway disconnected">, <Button Content="Open Connection">
ChatPage.xaml: <TextBlock Text="Web Chat Unavailable">, <Button Content="Open in Browser Instead">
ConnectionPage.xaml: <TextBlock Text="Operator">, <TextBlock Text="Node mode">, <StripHeadline Text="Not connected">, <StripPrimaryButton Content="Connect">
SandboxPage.xaml: <TextBlock Text="Locked Down">, <TextBlock Text="Recommended">, <TextBlock Text="Unprotected">
PermissionsPage.xaml: <TextBlock Text="Permissions">, <TextBlock Text="Node mode">, <ExecPolicySavedHint Text="Saved">
Run pwsh .\scripts\Test-Localization.ps1 to reproduce. Run with -StrictHardcodedXaml to make the check fail.
Recommended fix
For each hard-coded string on each affected control:
- Add
x:Uid to the XAML element, e.g.:
<!-- Before -->
<Button Content="Open Connection" />
<!-- After -->
<Button x:Uid="BindingsOpenConnectionButton" />
- Add resource keys to every locale file under
src/OpenClaw.Tray.WinUI/Strings/<locale>/Resources.resw:
<data name="BindingsOpenConnectionButton.Content" xml:space="preserve">
<value>Open Connection</value>
</data>
Provide translated values for nl-nl, fr-fr, zh-tw, and zh-cn.
- Preserve
{0}-style placeholders in every locale for any format strings.
- Leave unchanged: protocol identifiers (
system.run), URLs, model names, command names, and brand names like OpenClaw.
- Re-run
pwsh .\scripts\Test-Localization.ps1 -StrictHardcodedXaml to confirm zero warnings, then run the full test suite per AGENTS.md.
Suggested order: BindingsPage and ChatPage first (fewest strings), then PermissionsPage, DebugPage, InstancesPage, then ConnectionPage, CronPage, SandboxPage.
Generated by Localization Audit; see workflow run.
Summary
The
Test-Localization.ps1audit script found 310 candidate hard-coded XAML strings that bypass the localization system. None of the 8 affected pages usex:Uidfor their user-facing copy; instead they carry raw English strings directly in XAML attributes.Locales present:
en-us,nl-nl,fr-fr,zh-tw,zh-cn.Findings
src/OpenClaw.Tray.WinUI/Pages/ConnectionPage.xamlsrc/OpenClaw.Tray.WinUI/Pages/CronPage.xamlsrc/OpenClaw.Tray.WinUI/Pages/SandboxPage.xamlsrc/OpenClaw.Tray.WinUI/Pages/PermissionsPage.xamlsrc/OpenClaw.Tray.WinUI/Pages/DebugPage.xamlsrc/OpenClaw.Tray.WinUI/Pages/ChatPage.xamlsrc/OpenClaw.Tray.WinUI/Pages/InstancesPage.xamlsrc/OpenClaw.Tray.WinUI/Pages/BindingsPage.xamlExample findings:
BindingsPage.xaml:<ConnectionInfoBar Message="Connect to a gateway to load bindings." Title="Gateway disconnected">,<Button Content="Open Connection">ChatPage.xaml:<TextBlock Text="Web Chat Unavailable">,<Button Content="Open in Browser Instead">ConnectionPage.xaml:<TextBlock Text="Operator">,<TextBlock Text="Node mode">,<StripHeadline Text="Not connected">,<StripPrimaryButton Content="Connect">SandboxPage.xaml:<TextBlock Text="Locked Down">,<TextBlock Text="Recommended">,<TextBlock Text="Unprotected">PermissionsPage.xaml:<TextBlock Text="Permissions">,<TextBlock Text="Node mode">,<ExecPolicySavedHint Text="Saved">Run
pwsh .\scripts\Test-Localization.ps1to reproduce. Run with-StrictHardcodedXamlto make the check fail.Recommended fix
For each hard-coded string on each affected control:
x:Uidto the XAML element, e.g.:src/OpenClaw.Tray.WinUI/Strings/<locale>/Resources.resw:Provide translated values for
nl-nl,fr-fr,zh-tw, andzh-cn.{0}-style placeholders in every locale for any format strings.system.run), URLs, model names, command names, and brand names likeOpenClaw.pwsh .\scripts\Test-Localization.ps1 -StrictHardcodedXamlto confirm zero warnings, then run the full test suite perAGENTS.md.Suggested order:
BindingsPageandChatPagefirst (fewest strings), thenPermissionsPage,DebugPage,InstancesPage, thenConnectionPage,CronPage,SandboxPage.