mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[PT Run]Align subtitles for web search plugin (#15129)
* Align subtitles, #15126 * Apply suggestions from code review * Add comment to the resource file * Remove unused resource
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
using System.IO.Abstractions;
|
using System.IO.Abstractions;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -74,7 +75,7 @@ namespace Community.PowerToys.Run.Plugin.WebSearch
|
|||||||
results.Add(new Result
|
results.Add(new Result
|
||||||
{
|
{
|
||||||
Title = Properties.Resources.plugin_description.Remove(Description.Length - 1, 1),
|
Title = Properties.Resources.plugin_description.Remove(Description.Length - 1, 1),
|
||||||
SubTitle = Properties.Resources.plugin_in_browser,
|
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.plugin_in_browser_name, _browserName),
|
||||||
QueryTextDisplay = string.Empty,
|
QueryTextDisplay = string.Empty,
|
||||||
IcoPath = _defaultIconPath,
|
IcoPath = _defaultIconPath,
|
||||||
ProgramArguments = arguments,
|
ProgramArguments = arguments,
|
||||||
@@ -109,7 +110,7 @@ namespace Community.PowerToys.Run.Plugin.WebSearch
|
|||||||
var result = new Result
|
var result = new Result
|
||||||
{
|
{
|
||||||
Title = searchTerm,
|
Title = searchTerm,
|
||||||
SubTitle = string.Format(System.Globalization.CultureInfo.CurrentCulture, Properties.Resources.plugin_open, _browserName),
|
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.plugin_open, _browserName),
|
||||||
QueryTextDisplay = searchTerm,
|
QueryTextDisplay = searchTerm,
|
||||||
IcoPath = _defaultIconPath,
|
IcoPath = _defaultIconPath,
|
||||||
};
|
};
|
||||||
@@ -134,7 +135,7 @@ namespace Community.PowerToys.Run.Plugin.WebSearch
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string url = string.Format(System.Globalization.CultureInfo.InvariantCulture, _searchEngineUrl, searchTerm);
|
string url = string.Format(CultureInfo.InvariantCulture, _searchEngineUrl, searchTerm);
|
||||||
|
|
||||||
result.Action = action =>
|
result.Action = action =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -88,11 +88,11 @@ namespace Community.PowerToys.Run.Plugin.WebSearch.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to In the default browser.
|
/// Looks up a localized string similar to In {0}.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string plugin_in_browser {
|
public static string plugin_in_browser_name {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("plugin_in_browser", resourceCulture);
|
return ResourceManager.GetString("plugin_in_browser_name", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -129,6 +129,10 @@
|
|||||||
<data name="plugin_in_browser" xml:space="preserve">
|
<data name="plugin_in_browser" xml:space="preserve">
|
||||||
<value>In the default browser</value>
|
<value>In the default browser</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="plugin_in_browser_name" xml:space="preserve">
|
||||||
|
<value>In {0}</value>
|
||||||
|
<comment>Like "Search the web in {the browser name}"</comment>
|
||||||
|
</data>
|
||||||
<data name="plugin_name" xml:space="preserve">
|
<data name="plugin_name" xml:space="preserve">
|
||||||
<value>Web Search</value>
|
<value>Web Search</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
Reference in New Issue
Block a user