mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 02:06:36 +02:00
[CmdPal] Extension Toolkit localization (#40677)
## Summary of the Pull Request Moves hardcoded string resources from the extension toolkit to a new `Resources.resx` file. ## PR Checklist - [x] **Closes:** #40397 - [ ] **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 - [x] **Localization:** All end-user-facing strings can be localized - [x] **Dev docs:** No need - [x] **New binaries:** None - [x] **Documentation updated:** No need ## Detailed Description of the Pull Request / Additional comments `Resources.resx` and `Resources.Designer.cs` are located in `Properties\`, as with other projects. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Tested locally, strings display correctly
This commit is contained in:
@@ -8,12 +8,12 @@ public partial class CopyTextCommand : InvokableCommand
|
||||
{
|
||||
public virtual string Text { get; set; }
|
||||
|
||||
public virtual CommandResult Result { get; set; } = CommandResult.ShowToast("Copied to clipboard");
|
||||
public virtual CommandResult Result { get; set; } = CommandResult.ShowToast(Properties.Resources.CopyTextCommand_CopiedToClipboard);
|
||||
|
||||
public CopyTextCommand(string text)
|
||||
{
|
||||
Text = text;
|
||||
Name = "Copy";
|
||||
Name = Properties.Resources.CopyTextCommand_Copy;
|
||||
Icon = new IconInfo("\uE8C8");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user