[PT Run] Web-search plugin: Fix strings and improve log msg (#15144)

* string fixes

* fix msg ending

* improve log

* Move failed message dot
This commit is contained in:
Heiko
2021-12-27 21:20:11 +01:00
committed by GitHub
parent bee877fe41
commit c1a80a2001
3 changed files with 25 additions and 7 deletions

View File

@@ -83,9 +83,12 @@ namespace Community.PowerToys.Run.Plugin.WebSearch
{
if (!Helper.OpenInShell(_browserPath, arguments))
{
string errorMsgString = string.Format(CultureInfo.CurrentCulture, Properties.Resources.plugin_search_failed, _browserName);
Log.Error(errorMsgString, GetType());
_context.API.ShowMsg(
$"Plugin: {Properties.Resources.plugin_name}",
$"{Properties.Resources.plugin_search_failed}: ");
errorMsgString);
return false;
}
@@ -124,9 +127,12 @@ namespace Community.PowerToys.Run.Plugin.WebSearch
{
if (!Helper.OpenInShell(_browserPath, arguments))
{
string errorMsgString = string.Format(CultureInfo.CurrentCulture, Properties.Resources.plugin_search_failed, _browserName);
Log.Error(errorMsgString, GetType());
_context.API.ShowMsg(
$"Plugin: {Properties.Resources.plugin_name}",
$"{Properties.Resources.plugin_search_failed}: ");
errorMsgString);
return false;
}
@@ -141,9 +147,12 @@ namespace Community.PowerToys.Run.Plugin.WebSearch
{
if (!Helper.OpenInShell(url))
{
string errorMsgString = string.Format(CultureInfo.CurrentCulture, Properties.Resources.plugin_search_failed, _browserName);
Log.Error(errorMsgString, GetType());
_context.API.ShowMsg(
$"Plugin: {Properties.Resources.plugin_name}",
$"{Properties.Resources.plugin_search_failed}: ");
errorMsgString);
return false;
}