[Localization] Move PowerToys Run string resources from xaml files to resx (#6165)

* 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

* Reverted addition of resx file for Wox.Plugin
This commit is contained in:
Arjun Balgovind
2020-09-02 15:24:59 -07:00
committed by GitHub
parent c9f536c635
commit 1b598ad87e
130 changed files with 3978 additions and 5390 deletions

View File

@@ -62,12 +62,12 @@ namespace Microsoft.Plugin.Calculator
if (result.ToString() == "NaN")
{
result = Context.API.GetTranslation("wox_plugin_calculator_not_a_number");
result = Properties.Resources.wox_plugin_calculator_not_a_number;
}
if (result is Function)
{
result = Context.API.GetTranslation("wox_plugin_calculator_expression_not_complete");
result = Properties.Resources.wox_plugin_calculator_expression_not_complete;
}
if (!string.IsNullOrEmpty(result?.ToString()))
@@ -81,7 +81,7 @@ namespace Microsoft.Plugin.Calculator
Title = roundedResult.ToString(CultureInfo.CurrentCulture),
IcoPath = IconPath,
Score = 300,
SubTitle = Context.API.GetTranslation("wox_plugin_calculator_copy_number_to_clipboard"),
SubTitle = Properties.Resources.wox_plugin_calculator_copy_number_to_clipboard,
Action = c =>
{
var ret = false;
@@ -94,7 +94,7 @@ namespace Microsoft.Plugin.Calculator
}
catch (ExternalException)
{
MessageBox.Show("Copy failed, please try later");
MessageBox.Show(Properties.Resources.wox_plugin_calculator_copy_failed);
}
});
thread.SetApartmentState(ApartmentState.STA);
@@ -167,12 +167,12 @@ namespace Microsoft.Plugin.Calculator
public string GetTranslatedPluginTitle()
{
return Context.API.GetTranslation("wox_plugin_calculator_plugin_name");
return Properties.Resources.wox_plugin_calculator_plugin_name;
}
public string GetTranslatedPluginDescription()
{
return Context.API.GetTranslation("wox_plugin_calculator_plugin_description");
return Properties.Resources.wox_plugin_calculator_plugin_description;
}
public void Dispose()