[PTRun][Calculator]Replace input with result with '=' key (#31391)

* replace input with result

* fix and add test

* add options and use result property
This commit is contained in:
Davide Giacometti
2024-02-20 13:08:54 +01:00
committed by GitHub
parent e573b7a1b1
commit 92c85630a9
8 changed files with 121 additions and 37 deletions

View File

@@ -185,5 +185,23 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.Properties {
return ResourceManager.GetString("wox_plugin_calculator_plugin_name", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Replace input appending &apos;=&apos;.
/// </summary>
public static string wox_plugin_calculator_replace_input {
get {
return ResourceManager.GetString("wox_plugin_calculator_replace_input", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to When using direct activation, appending &apos;=&apos; to the expression will replace the input with the calculated result (e.g. =5*3-2=)..
/// </summary>
public static string wox_plugin_calculator_replace_input_description {
get {
return ResourceManager.GetString("wox_plugin_calculator_replace_input_description", resourceCulture);
}
}
}
}

View File

@@ -161,4 +161,10 @@
<data name="wox_plugin_calculator_division_by_zero" xml:space="preserve">
<value>Expression contains division by zero</value>
</data>
<data name="wox_plugin_calculator_replace_input" xml:space="preserve">
<value>Replace input if query ends with '='</value>
</data>
<data name="wox_plugin_calculator_replace_input_description" xml:space="preserve">
<value>When using direct activation, appending '=' to the expression will replace the input with the calculated result (e.g. '=5*3-2=' will change the query to '=13').</value>
</data>
</root>