From 29551898ca44cd46b39af245c017231169f9f8a7 Mon Sep 17 00:00:00 2001 From: moooyo <42196638+moooyo@users.noreply.github.com> Date: Fri, 21 Mar 2025 18:48:28 +0800 Subject: [PATCH] [cmdpal] Fix some i18n issues for built-in extensions (#38078) Fix some i18n issues for built-in extensions. Co-authored-by: Yu Leng (from Dev Box) --- .../Properties/Resources.Designer.cs | 9 +++++++++ .../Properties/Resources.resx | 3 +++ .../RegistryCommandsProvider.cs | 3 ++- .../Properties/Resources.Designer.cs | 6 +++--- .../Properties/Resources.resx | 6 +++--- .../WindowsServicesCommandsProvider.cs | 3 ++- .../Properties/Resources.Designer.cs | 9 +++++++++ .../Properties/Resources.resx | 3 +++ .../WindowsSettingsCommandsProvider.cs | 3 ++- 9 files changed, 36 insertions(+), 9 deletions(-) diff --git a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Registry/Properties/Resources.Designer.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Registry/Properties/Resources.Designer.cs index 2906e09230..181bdc875d 100644 --- a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Registry/Properties/Resources.Designer.cs +++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Registry/Properties/Resources.Designer.cs @@ -177,6 +177,15 @@ namespace Microsoft.CmdPal.Ext.Registry.Properties { } } + /// + /// Looks up a localized string similar to Windows Registry. + /// + internal static string RegistryProvider_DisplayName { + get { + return ResourceManager.GetString("RegistryProvider_DisplayName", resourceCulture); + } + } + /// /// Looks up a localized string similar to Registry value. /// diff --git a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Registry/Properties/Resources.resx b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Registry/Properties/Resources.resx index f6e3005c68..bfa8d29787 100644 --- a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Registry/Properties/Resources.resx +++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Registry/Properties/Resources.resx @@ -185,4 +185,7 @@ Registry key not found + + Windows Registry + \ No newline at end of file diff --git a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Registry/RegistryCommandsProvider.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Registry/RegistryCommandsProvider.cs index 83b6b1c4a2..cca02e8d77 100644 --- a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Registry/RegistryCommandsProvider.cs +++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.Registry/RegistryCommandsProvider.cs @@ -2,6 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using Microsoft.CmdPal.Ext.Registry.Properties; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; @@ -12,7 +13,7 @@ public partial class RegistryCommandsProvider : CommandProvider public RegistryCommandsProvider() { Id = "Windows.Registry"; - DisplayName = $"Windows Registry"; + DisplayName = Resources.RegistryProvider_DisplayName; Icon = IconHelpers.FromRelativePath("Assets\\Registry.svg"); } diff --git a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsServices/Properties/Resources.Designer.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsServices/Properties/Resources.Designer.cs index 04afe59f7a..c20800d1c1 100644 --- a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsServices/Properties/Resources.Designer.cs +++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsServices/Properties/Resources.Designer.cs @@ -61,11 +61,11 @@ namespace Microsoft.CmdPal.Ext.WindowsServices.Properties { } /// - /// Looks up a localized string similar to . + /// Looks up a localized string similar to Windows Services. /// - internal static string test_value { + internal static string WindowsServicesProvider_DisplayName { get { - return ResourceManager.GetString("test_value", resourceCulture); + return ResourceManager.GetString("WindowsServicesProvider_DisplayName", resourceCulture); } } diff --git a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsServices/Properties/Resources.resx b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsServices/Properties/Resources.resx index 0c789b6799..80cd60db44 100644 --- a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsServices/Properties/Resources.resx +++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsServices/Properties/Resources.resx @@ -117,6 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Windows Services + Continue @@ -204,7 +207,4 @@ Stopping - - - \ No newline at end of file diff --git a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsServices/WindowsServicesCommandsProvider.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsServices/WindowsServicesCommandsProvider.cs index dcea76a1c6..7b849dd29c 100644 --- a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsServices/WindowsServicesCommandsProvider.cs +++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsServices/WindowsServicesCommandsProvider.cs @@ -2,6 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using Microsoft.CmdPal.Ext.WindowsServices.Properties; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; @@ -15,7 +16,7 @@ public partial class WindowsServicesCommandsProvider : CommandProvider public WindowsServicesCommandsProvider() { Id = "Windows.Services"; - DisplayName = $"Windows Services"; + DisplayName = Resources.WindowsServicesProvider_DisplayName; Icon = ServicesIcon; } diff --git a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsSettings/Properties/Resources.Designer.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsSettings/Properties/Resources.Designer.cs index 3a018b0e90..0a421820e8 100644 --- a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsSettings/Properties/Resources.Designer.cs +++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsSettings/Properties/Resources.Designer.cs @@ -4731,6 +4731,15 @@ namespace Microsoft.CmdPal.Ext.WindowsSettings.Properties { } } + /// + /// Looks up a localized string similar to Windows Settings. + /// + internal static string WindowsSettingsProvider_DisplayName { + get { + return ResourceManager.GetString("WindowsSettingsProvider_DisplayName", resourceCulture); + } + } + /// /// Looks up a localized string similar to Windows Update. /// diff --git a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsSettings/Properties/Resources.resx b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsSettings/Properties/Resources.resx index 6d07ad71c6..c097ed0841 100644 --- a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsSettings/Properties/Resources.resx +++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsSettings/Properties/Resources.resx @@ -2082,4 +2082,7 @@ Open Settings + + Windows Settings + \ No newline at end of file diff --git a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsSettings/WindowsSettingsCommandsProvider.cs b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsSettings/WindowsSettingsCommandsProvider.cs index 1cd26ca577..bf4ccfb36e 100644 --- a/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsSettings/WindowsSettingsCommandsProvider.cs +++ b/src/modules/cmdpal/Exts/Microsoft.CmdPal.Ext.WindowsSettings/WindowsSettingsCommandsProvider.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using Microsoft.CmdPal.Ext.WindowsSettings.Helpers; +using Microsoft.CmdPal.Ext.WindowsSettings.Properties; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; @@ -19,7 +20,7 @@ public partial class WindowsSettingsCommandsProvider : CommandProvider public WindowsSettingsCommandsProvider() { Id = "Windows.Settings"; - DisplayName = $"Windows Settings"; + DisplayName = Resources.WindowsSettingsProvider_DisplayName; Icon = IconHelpers.FromRelativePath("Assets\\WindowsSettings.svg"); _windowsSettings = JsonSettingsListHelper.ReadAllPossibleSettings();