mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
[PowerToys Run] Remove unused wox resources and move hardcoded strings to resx file (#6181)
* Removed xaml files, added resx file and removed references for PowerLauncher project * Added resx file for wox.plugin * Moved Calculator resources to resx * Migrated resources for Folder and Indexer plugins * Migrated resources for Program and Shell plugin * Migrated resources for URI and Window Walker * Removed GetTranslation, tests need to be refactored * Removed internationalization classes * Removed Wox.Core.Resource references * Fixed Programs plugin tests * Fixed tests * Removed language xaml files from installer * Added locProject.json files * Fixed resource not found error * Remove unused strings from PowerLauncher * Removed all unused strings * Reverted addition of resx file for Wox.Plugin * Added more resources for Folder plugin * Added resources for Folder and Indexer plugin * Added resources for Program, Shell, Uri and WW plugins * Changed string from Wox to PT Run * managed common files
This commit is contained in:
@@ -83,14 +83,14 @@ namespace Microsoft.Plugin.Shell
|
||||
{
|
||||
if (m.Key == cmd)
|
||||
{
|
||||
result.SubTitle = "Shell: " + string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_cmd_cmd_has_been_executed_times, m.Value);
|
||||
result.SubTitle = Properties.Resources.wox_plugin_cmd_plugin_name + ": " + string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_cmd_cmd_has_been_executed_times, m.Value);
|
||||
return null;
|
||||
}
|
||||
|
||||
var ret = new Result
|
||||
{
|
||||
Title = m.Key,
|
||||
SubTitle = "Shell: " + string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_cmd_cmd_has_been_executed_times, m.Value),
|
||||
SubTitle = Properties.Resources.wox_plugin_cmd_plugin_name + ": " + string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_cmd_cmd_has_been_executed_times, m.Value),
|
||||
IcoPath = IconPath,
|
||||
Action = c =>
|
||||
{
|
||||
@@ -109,7 +109,7 @@ namespace Microsoft.Plugin.Shell
|
||||
{
|
||||
Title = cmd,
|
||||
Score = 5000,
|
||||
SubTitle = "Shell: " + Properties.Resources.wox_plugin_cmd_execute_through_shell,
|
||||
SubTitle = Properties.Resources.wox_plugin_cmd_plugin_name + ": " + Properties.Resources.wox_plugin_cmd_execute_through_shell,
|
||||
IcoPath = IconPath,
|
||||
Action = c =>
|
||||
{
|
||||
@@ -127,7 +127,7 @@ namespace Microsoft.Plugin.Shell
|
||||
.Select(m => new Result
|
||||
{
|
||||
Title = m.Key,
|
||||
SubTitle = "Shell: " + string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_cmd_cmd_has_been_executed_times, m.Value),
|
||||
SubTitle = Properties.Resources.wox_plugin_cmd_plugin_name + ": " + string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_cmd_cmd_has_been_executed_times, m.Value),
|
||||
IcoPath = IconPath,
|
||||
Action = c =>
|
||||
{
|
||||
@@ -215,14 +215,14 @@ namespace Microsoft.Plugin.Shell
|
||||
}
|
||||
catch (FileNotFoundException e)
|
||||
{
|
||||
var name = "Plugin: Shell";
|
||||
var message = $"Command not found: {e.Message}";
|
||||
var name = "Plugin: " + Properties.Resources.wox_plugin_cmd_plugin_name;
|
||||
var message = $"{Properties.Resources.wox_plugin_cmd_command_not_found}: {e.Message}";
|
||||
_context.API.ShowMsg(name, message);
|
||||
}
|
||||
catch (Win32Exception e)
|
||||
{
|
||||
var name = "Plugin: Shell";
|
||||
var message = $"Error running the command: {e.Message}";
|
||||
var name = "Plugin: " + Properties.Resources.wox_plugin_cmd_plugin_name;
|
||||
var message = $"{Properties.Resources.wox_plugin_cmd_command_failed}: {e.Message}";
|
||||
_context.API.ShowMsg(name, message);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user