Skip to content

Commit dd5d5e6

Browse files
committed
fix: localize accessibility names
1 parent 6866238 commit dd5d5e6

11 files changed

Lines changed: 267 additions & 32 deletions

File tree

‎src/OpenClaw.Tray.WinUI/Pages/PermissionsPage.xaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@
349349
<TextBox Grid.Column="0" x:Uid="NewRulePattern" x:Name="NewRulePattern"
350350
PlaceholderText="Command pattern (e.g. echo *)"
351351
FontFamily="Consolas"/>
352-
<ComboBox Grid.Column="1" x:Name="NewRuleAction" MinWidth="100" SelectedIndex="0"
353-
AutomationProperties.Name="Rule action">
352+
<ComboBox Grid.Column="1" x:Uid="PermissionsPage_NewRuleAction" x:Name="NewRuleAction"
353+
MinWidth="100" SelectedIndex="0">
354354
<ComboBoxItem x:Uid="PermissionsPage_ComboBoxItem_54" Content="Deny" Tag="deny"/>
355355
<ComboBoxItem x:Uid="PermissionsPage_ComboBoxItem_55" Content="Allow" Tag="allow"/>
356356
<ComboBoxItem x:Uid="PermissionsPage_ComboBoxItem_56" Content="Ask" Tag="prompt"/>

‎src/OpenClaw.Tray.WinUI/Pages/SandboxPage.xaml‎

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@
125125
<StackPanel Spacing="8" Margin="0,4,0,12">
126126
<TextBlock x:Name="UnavailableActionMessage" TextWrapping="Wrap" />
127127
<StackPanel Orientation="Horizontal" Spacing="8">
128-
<Button x:Name="UnavailablePrimaryButton" Click="OnUnavailableActionClick" Style="{ThemeResource AccentButtonStyle}"
129-
AutomationProperties.Name="Sandbox action" />
128+
<Button x:Uid="SandboxPage_UnavailablePrimaryButton" x:Name="UnavailablePrimaryButton"
129+
Click="OnUnavailableActionClick" Style="{ThemeResource AccentButtonStyle}" />
130130
<HyperlinkButton x:Uid="SandboxPage_LearnMoreAboutMXC" Content="Learn more about MXC sandboxing"
131131
NavigateUri="https://github.com/microsoft/mxc" />
132132
</StackPanel>
@@ -155,7 +155,7 @@
155155
<ColumnDefinition Width="*" />
156156
</Grid.ColumnDefinitions>
157157

158-
<Button x:Name="PresetLockedButton"
158+
<Button x:Uid="SandboxPage_PresetLockedButton" x:Name="PresetLockedButton"
159159
Grid.Column="0"
160160
HorizontalAlignment="Stretch"
161161
HorizontalContentAlignment="Stretch"
@@ -164,8 +164,7 @@
164164
Padding="20,18"
165165
MinHeight="130"
166166
CornerRadius="8"
167-
Click="OnPresetLockedClick"
168-
AutomationProperties.Name="Locked Down preset: No internet, no clipboard, no standard user folders">
167+
Click="OnPresetLockedClick">
169168
<StackPanel Spacing="8">
170169
<TextBlock x:Uid="SandboxPage_LockedDown" Text="🔒 Locked Down"
171170
FontSize="18"
@@ -177,7 +176,7 @@
177176
</StackPanel>
178177
</Button>
179178

180-
<Button x:Name="PresetBalancedButton"
179+
<Button x:Uid="SandboxPage_PresetBalancedButton" x:Name="PresetBalancedButton"
181180
Grid.Column="1"
182181
HorizontalAlignment="Stretch"
183182
HorizontalContentAlignment="Stretch"
@@ -186,8 +185,7 @@
186185
Padding="20,18"
187186
MinHeight="130"
188187
CornerRadius="8"
189-
Click="OnPresetBalancedClick"
190-
AutomationProperties.Name="Recommended preset: Internet on, read-only on Documents, Downloads, Desktop">
188+
Click="OnPresetBalancedClick">
191189
<StackPanel Spacing="8">
192190
<TextBlock x:Uid="SandboxPage_Recommended" Text="🛡 Recommended"
193191
FontSize="18"
@@ -199,7 +197,7 @@
199197
</StackPanel>
200198
</Button>
201199

202-
<Button x:Name="PresetPermissiveButton"
200+
<Button x:Uid="SandboxPage_PresetPermissiveButton" x:Name="PresetPermissiveButton"
203201
Grid.Column="2"
204202
HorizontalAlignment="Stretch"
205203
HorizontalContentAlignment="Stretch"
@@ -208,8 +206,7 @@
208206
Padding="20,18"
209207
MinHeight="130"
210208
CornerRadius="8"
211-
Click="OnPresetPermissiveClick"
212-
AutomationProperties.Name="Unprotected preset: Internet on, read and write on Documents, Downloads, Desktop">
209+
Click="OnPresetPermissiveClick">
213210
<StackPanel Spacing="8">
214211
<TextBlock x:Uid="SandboxPage_Unprotected" Text="⚠ Unprotected"
215212
FontSize="18"
@@ -257,29 +254,26 @@
257254
</Grid.RowDefinitions>
258255

259256
<TextBlock x:Uid="SandboxPage_Documents" Grid.Row="0" Grid.Column="0" Text="Documents" VerticalAlignment="Center"/>
260-
<ComboBox x:Name="DocsAccessCombo" Grid.Row="0" Grid.Column="1"
257+
<ComboBox x:Uid="SandboxPage_DocsAccessCombo" x:Name="DocsAccessCombo" Grid.Row="0" Grid.Column="1"
261258
HorizontalAlignment="Stretch"
262-
AutomationProperties.Name="Documents access level"
263259
SelectionChanged="OnDocsAccessChanged">
264260
<ComboBoxItem x:Uid="SandboxPage_Blocked" Content="Blocked" Tag="None" />
265261
<ComboBoxItem x:Uid="SandboxPage_ReadOnly" Content="Read only" Tag="ReadOnly" />
266262
<ComboBoxItem x:Uid="SandboxPage_ReadAmpWrite" Content="Read &amp; write" Tag="ReadWrite" />
267263
</ComboBox>
268264

269265
<TextBlock x:Uid="SandboxPage_Downloads" Grid.Row="1" Grid.Column="0" Text="Downloads" VerticalAlignment="Center"/>
270-
<ComboBox x:Name="DownloadsAccessCombo" Grid.Row="1" Grid.Column="1"
266+
<ComboBox x:Uid="SandboxPage_DownloadsAccessCombo" x:Name="DownloadsAccessCombo" Grid.Row="1" Grid.Column="1"
271267
HorizontalAlignment="Stretch"
272-
AutomationProperties.Name="Downloads access level"
273268
SelectionChanged="OnDownloadsAccessChanged">
274269
<ComboBoxItem x:Uid="SandboxPage_Blocked2" Content="Blocked" Tag="None" />
275270
<ComboBoxItem x:Uid="SandboxPage_ReadOnly2" Content="Read only" Tag="ReadOnly" />
276271
<ComboBoxItem x:Uid="SandboxPage_ReadAmpWrite2" Content="Read &amp; write" Tag="ReadWrite" />
277272
</ComboBox>
278273

279274
<TextBlock x:Uid="SandboxPage_Desktop" Grid.Row="2" Grid.Column="0" Text="Desktop" VerticalAlignment="Center"/>
280-
<ComboBox x:Name="DesktopAccessCombo" Grid.Row="2" Grid.Column="1"
275+
<ComboBox x:Uid="SandboxPage_DesktopAccessCombo" x:Name="DesktopAccessCombo" Grid.Row="2" Grid.Column="1"
281276
HorizontalAlignment="Stretch"
282-
AutomationProperties.Name="Desktop access level"
283277
SelectionChanged="OnDesktopAccessChanged">
284278
<ComboBoxItem x:Uid="SandboxPage_Blocked3" Content="Blocked" Tag="None" />
285279
<ComboBoxItem x:Uid="SandboxPage_ReadOnly3" Content="Read only" Tag="ReadOnly" />

‎src/OpenClaw.Tray.WinUI/Pages/SettingsPage.xaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@
168168
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
169169
TextWrapping="Wrap"/>
170170
</StackPanel>
171-
<ComboBox Grid.Column="1" x:Name="NotificationSoundComboBox" MinWidth="140"
172-
AutomationProperties.AutomationId="SettingsPageSound"
173-
AutomationProperties.Name="Notification sound">
171+
<ComboBox Grid.Column="1" x:Uid="SettingsPage_NotificationSoundComboBox"
172+
x:Name="NotificationSoundComboBox" MinWidth="140"
173+
AutomationProperties.AutomationId="SettingsPageSound">
174174
<ComboBoxItem x:Uid="SettingsPage_ComboBoxItem_48" Content="Default" Tag="Default"/>
175175
<ComboBoxItem x:Uid="SettingsPage_ComboBoxItem_49" Content="None" Tag="None"/>
176176
<ComboBoxItem x:Uid="SettingsPage_ComboBoxItem_50" Content="Subtle" Tag="Subtle"/>

‎src/OpenClaw.Tray.WinUI/Pages/VoiceSettingsPage.xaml‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,18 @@
3737
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="8" VerticalAlignment="Top">
3838
<Button x:Uid="VoiceSettingsPage_AssistantRefreshButton"
3939
x:Name="AssistantRefreshButton" Click="OnAssistantRefreshClick" Padding="10,8"
40-
ToolTipService.ToolTip="Refresh assistant status"
41-
AutomationProperties.Name="Refresh voice assistant status">
40+
ToolTipService.ToolTip="Refresh assistant status">
4241
<FontIcon Glyph="&#xE72C;" FontSize="14"/>
4342
</Button>
44-
<Button x:Name="AssistantStartButton" Click="OnAssistantStartClick"
45-
Style="{StaticResource AccentButtonStyle}"
46-
AutomationProperties.Name="Start voice assistant">
43+
<Button x:Uid="VoiceSettingsPage_AssistantStartButton" x:Name="AssistantStartButton"
44+
Click="OnAssistantStartClick" Style="{StaticResource AccentButtonStyle}">
4745
<StackPanel Orientation="Horizontal" Spacing="6">
4846
<FontIcon Glyph="&#xE768;" FontSize="14"/>
4947
<TextBlock x:Uid="VoiceSettingsPage_AssistantStartButtonText" Text="Start"/>
5048
</StackPanel>
5149
</Button>
52-
<Button x:Name="AssistantStopButton" Click="OnAssistantStopClick"
53-
AutomationProperties.Name="Stop voice assistant">
50+
<Button x:Uid="VoiceSettingsPage_AssistantStopButton" x:Name="AssistantStopButton"
51+
Click="OnAssistantStopClick">
5452
<StackPanel Orientation="Horizontal" Spacing="6">
5553
<FontIcon Glyph="&#xE71A;" FontSize="14"/>
5654
<TextBlock x:Uid="VoiceSettingsPage_AssistantStopButtonText" Text="Stop"/>
@@ -195,8 +193,7 @@
195193
BorderThickness="1" CornerRadius="8" Padding="16">
196194
<StackPanel Spacing="8">
197195
<TextBlock x:Uid="VoiceSettingsPage_LanguageHeader" x:Name="LanguageHeaderText" Text="Language" Style="{StaticResource BodyStrongTextBlockStyle}"/>
198-
<ComboBox x:Name="LanguageCombo"
199-
AutomationProperties.Name="Voice language"
196+
<ComboBox x:Uid="VoiceSettingsPage_LanguageCombo" x:Name="LanguageCombo"
200197
SelectionChanged="OnLanguageChanged" Width="200">
201198
<ComboBoxItem x:Uid="VoiceSettingsPage_LangAuto" Content="Auto-detect" Tag="auto"/>
202199
<ComboBoxItem x:Uid="VoiceSettingsPage_LangEn" Content="English" Tag="en"/>

‎src/OpenClaw.Tray.WinUI/Strings/en-us/Resources.resw‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6765,4 +6765,46 @@ Make sure the gateway is running.</value>
67656765
<data name="SettingsPage_GatewayInfoLabel_Uptime.Text" xml:space="preserve">
67666766
<value>Uptime</value>
67676767
</data>
6768+
<data name="PermissionsPage_NewRuleAction.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6769+
<value>Rule action</value>
6770+
</data>
6771+
<data name="SandboxPage_UnavailablePrimaryButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6772+
<value>Sandbox action</value>
6773+
</data>
6774+
<data name="SandboxPage_PresetLockedButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6775+
<value>Locked Down preset: No internet, no clipboard, no standard user folders</value>
6776+
</data>
6777+
<data name="SandboxPage_PresetBalancedButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6778+
<value>Recommended preset: Internet on, read-only on Documents, Downloads, Desktop</value>
6779+
</data>
6780+
<data name="SandboxPage_PresetPermissiveButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6781+
<value>Unprotected preset: Internet on, read and write on Documents, Downloads, Desktop</value>
6782+
</data>
6783+
<data name="SandboxPage_DocsAccessCombo.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6784+
<value>Documents access level</value>
6785+
</data>
6786+
<data name="SandboxPage_DownloadsAccessCombo.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6787+
<value>Downloads access level</value>
6788+
</data>
6789+
<data name="SandboxPage_DesktopAccessCombo.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6790+
<value>Desktop access level</value>
6791+
</data>
6792+
<data name="SettingsPage_NotificationSoundComboBox.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6793+
<value>Notification sound</value>
6794+
</data>
6795+
<data name="VoiceSettingsPage_AssistantRefreshButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6796+
<value>Refresh voice assistant status</value>
6797+
</data>
6798+
<data name="VoiceSettingsPage_AssistantStartButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6799+
<value>Start voice assistant</value>
6800+
</data>
6801+
<data name="VoiceSettingsPage_AssistantStopButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6802+
<value>Stop voice assistant</value>
6803+
</data>
6804+
<data name="VoiceSettingsPage_LanguageCombo.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6805+
<value>Voice language</value>
6806+
</data>
6807+
<data name="HubWindow_MainNavigation.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6808+
<value>Main navigation</value>
6809+
</data>
67686810
</root>

‎src/OpenClaw.Tray.WinUI/Strings/fr-fr/Resources.resw‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6725,4 +6725,46 @@ Le binaire wxc-exec est introuvable. {1} S'il s'agit d'une build développeur, c
67256725
<data name="SettingsPage_GatewayInfoLabel_Uptime.Text" xml:space="preserve">
67266726
<value>Uptime</value>
67276727
</data>
6728+
<data name="PermissionsPage_NewRuleAction.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6729+
<value>Action de la règle</value>
6730+
</data>
6731+
<data name="SandboxPage_UnavailablePrimaryButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6732+
<value>Action du bac à sable</value>
6733+
</data>
6734+
<data name="SandboxPage_PresetLockedButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6735+
<value>Préréglage verrouillé : aucun accès Internet, aucun presse-papiers, aucun dossier utilisateur standard</value>
6736+
</data>
6737+
<data name="SandboxPage_PresetBalancedButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6738+
<value>Préréglage recommandé : accès Internet activé, lecture seule pour Documents, Téléchargements et Bureau</value>
6739+
</data>
6740+
<data name="SandboxPage_PresetPermissiveButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6741+
<value>Préréglage non protégé : accès Internet activé, lecture et écriture pour Documents, Téléchargements et Bureau</value>
6742+
</data>
6743+
<data name="SandboxPage_DocsAccessCombo.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6744+
<value>Niveau d’accès aux Documents</value>
6745+
</data>
6746+
<data name="SandboxPage_DownloadsAccessCombo.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6747+
<value>Niveau d’accès aux Téléchargements</value>
6748+
</data>
6749+
<data name="SandboxPage_DesktopAccessCombo.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6750+
<value>Niveau d’accès au Bureau</value>
6751+
</data>
6752+
<data name="SettingsPage_NotificationSoundComboBox.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6753+
<value>Son de notification</value>
6754+
</data>
6755+
<data name="VoiceSettingsPage_AssistantRefreshButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6756+
<value>Actualiser l’état de l’assistant vocal</value>
6757+
</data>
6758+
<data name="VoiceSettingsPage_AssistantStartButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6759+
<value>Démarrer l’assistant vocal</value>
6760+
</data>
6761+
<data name="VoiceSettingsPage_AssistantStopButton.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6762+
<value>Arrêter l’assistant vocal</value>
6763+
</data>
6764+
<data name="VoiceSettingsPage_LanguageCombo.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6765+
<value>Langue vocale</value>
6766+
</data>
6767+
<data name="HubWindow_MainNavigation.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
6768+
<value>Navigation principale</value>
6769+
</data>
67286770
</root>

0 commit comments

Comments
 (0)