Skip to content

Commit 64298a5

Browse files
authored
CmdPal: Localize the "More" button on the command bar and hotkeys (#45505)
## Summary of the Pull Request Enable localization for command bar buttons and modifiers - Adds localization support for the "More" command button on the command bar - Localizes the secondary command key modifier (Ctrl) and its combinations - Updates related tooltips for improved consistency - Enhances the overall user experience for non-English locales <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #45503 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed
1 parent efc3c5e commit 64298a5

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

src/modules/cmdpal/Microsoft.CmdPal.UI/Controls/CommandBar.xaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
TextWrapping="NoWrap" />
206206
<StackPanel Orientation="Horizontal" Spacing="4">
207207
<Border Padding="4,2,4,2" Style="{StaticResource HotkeyStyle}">
208-
<TextBlock Style="{StaticResource HotkeyTextBlockStyle}" Text="Ctrl" />
208+
<TextBlock x:Uid="CommandBar_SecondaryButton_HotkeyCtrl" Style="{StaticResource HotkeyTextBlockStyle}" />
209209
</Border>
210210
<Border Style="{StaticResource HotkeyStyle}">
211211
<FontIcon Glyph="&#xE751;" Style="{StaticResource HotkeyFontIconStyle}" />
@@ -220,21 +220,20 @@
220220
AutomationProperties.AutomationId="MoreContextMenuButton"
221221
Click="MoreCommandsButton_Clicked"
222222
Style="{StaticResource SubtleButtonStyle}"
223-
ToolTipService.ToolTip="Ctrl+K"
224223
Visibility="{x:Bind ViewModel.ShouldShowContextMenu, Mode=OneWay}">
225224
<StackPanel Orientation="Horizontal" Spacing="8">
226225
<TextBlock
226+
x:Uid="MoreCommandsButton_Label"
227227
VerticalAlignment="Center"
228228
Style="{StaticResource CaptionTextBlockStyle}"
229-
Text="More"
230229
TextTrimming="WordEllipsis"
231230
TextWrapping="NoWrap" />
232231
<StackPanel Orientation="Horizontal" Spacing="4">
233232
<Border Padding="4,2,4,2" Style="{StaticResource HotkeyStyle}">
234-
<TextBlock Style="{StaticResource HotkeyTextBlockStyle}" Text="Ctrl" />
233+
<TextBlock x:Uid="CommandBar_MoreCommandsButtonButton_HotkeyCtrl" Style="{StaticResource HotkeyTextBlockStyle}" />
235234
</Border>
236235
<Border Padding="4,2,4,2" Style="{StaticResource HotkeyStyle}">
237-
<TextBlock Style="{StaticResource HotkeyTextBlockStyle}" Text="K" />
236+
<TextBlock x:Uid="CommandBar_MoreCommandsButtonButton_HotkeyCtrl2" Style="{StaticResource HotkeyTextBlockStyle}" />
238237
</Border>
239238
</StackPanel>
240239
</StackPanel>

src/modules/cmdpal/Microsoft.CmdPal.UI/Strings/en-us/Resources.resw

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,4 +777,22 @@ Right-click to remove the key combination, thereby deactivating the shortcut.</v
777777
<data name="Settings_ExtensionsPage_More_Button.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
778778
<value>More options</value>
779779
</data>
780+
<data name="MoreCommandsButton_Label.Text" xml:space="preserve">
781+
<value>More</value>
782+
</data>
783+
<data name="CommandBar_SecondaryButton_HotkeyCtrl.Text" xml:space="preserve">
784+
<value>Ctrl</value>
785+
<comment>Key modifier</comment>
786+
</data>
787+
<data name="CommandBar_MoreCommandsButtonButton_HotkeyCtrl.Text" xml:space="preserve">
788+
<value>Ctrl</value>
789+
<comment>Key modifier</comment>
790+
</data>
791+
<data name="MoreCommandsButton.[using:Microsoft.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
792+
<value>Ctrl+K</value>
793+
</data>
794+
<data name="CommandBar_MoreCommandsButtonButton_HotkeyCtrl2.Text" xml:space="preserve">
795+
<value>K</value>
796+
<comment>Keyboard key</comment>
797+
</data>
780798
</root>

0 commit comments

Comments
 (0)