mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-01 09:59:06 +08: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:
parent
09e188621c
commit
c25a5a821f
@ -4,6 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO.Abstractions;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@ -74,7 +75,7 @@ namespace Community.PowerToys.Run.Plugin.WebSearch
|
||||
results.Add(new Result
|
||||
{
|
||||
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,
|
||||
IcoPath = _defaultIconPath,
|
||||
ProgramArguments = arguments,
|
||||
@ -109,7 +110,7 @@ namespace Community.PowerToys.Run.Plugin.WebSearch
|
||||
var result = new Result
|
||||
{
|
||||
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,
|
||||
IcoPath = _defaultIconPath,
|
||||
};
|
||||
@ -134,7 +135,7 @@ namespace Community.PowerToys.Run.Plugin.WebSearch
|
||||
}
|
||||
else
|
||||
{
|
||||
string url = string.Format(System.Globalization.CultureInfo.InvariantCulture, _searchEngineUrl, searchTerm);
|
||||
string url = string.Format(CultureInfo.InvariantCulture, _searchEngineUrl, searchTerm);
|
||||
|
||||
result.Action = action =>
|
||||
{
|
||||
|
@ -88,11 +88,11 @@ namespace Community.PowerToys.Run.Plugin.WebSearch.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to In the default browser.
|
||||
/// Looks up a localized string similar to In {0}.
|
||||
/// </summary>
|
||||
public static string plugin_in_browser {
|
||||
public static string plugin_in_browser_name {
|
||||
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">
|
||||
<value>In the default browser</value>
|
||||
</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">
|
||||
<value>Web Search</value>
|
||||
</data>
|
||||
|
Loading…
Reference in New Issue
Block a user