mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
[PT Run] Folder plugin: Improvements for the results (#16867)
* Improvements * fix spelling * text improvement * fix build * update tipp text
This commit is contained in:
@@ -19,7 +19,7 @@ namespace Microsoft.Plugin.Folder.Properties {
|
|||||||
// class via a tool like ResGen or Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
public class Resources {
|
public class Resources {
|
||||||
@@ -151,7 +151,7 @@ namespace Microsoft.Plugin.Folder.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Use > to search within the directory. Use * to search for file extensions. Or use both >*.
|
/// Looks up a localized string similar to Tip: Use > to search in folders, * to search file by mask, >* for both..
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string wox_plugin_folder_select_folder_first_result_subtitle {
|
public static string wox_plugin_folder_select_folder_first_result_subtitle {
|
||||||
get {
|
get {
|
||||||
@@ -160,7 +160,7 @@ namespace Microsoft.Plugin.Folder.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Open.
|
/// Looks up a localized string similar to Open: {0}.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string wox_plugin_folder_select_folder_first_result_title {
|
public static string wox_plugin_folder_select_folder_first_result_title {
|
||||||
get {
|
get {
|
||||||
|
|||||||
@@ -146,11 +146,11 @@
|
|||||||
<value>Fail to open file at</value>
|
<value>Fail to open file at</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="wox_plugin_folder_select_folder_first_result_subtitle" xml:space="preserve">
|
<data name="wox_plugin_folder_select_folder_first_result_subtitle" xml:space="preserve">
|
||||||
<value>Use > to search within the directory. Use * to search for file extensions. Or use both >*</value>
|
<value>Tip: Use > to search in folders, * to search file by mask, >* for both.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="wox_plugin_folder_select_folder_first_result_title" xml:space="preserve">
|
<data name="wox_plugin_folder_select_folder_first_result_title" xml:space="preserve">
|
||||||
<value>Open</value>
|
<value>Open: {0}</value>
|
||||||
<comment>Open as a verb. Open this folder.</comment>
|
<comment>Open as a verb. Open this folder. Do not translate the placeholder '{0}'.</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="wox_plugin_folder_select_folder_OpenFileOrFolder_error_message" xml:space="preserve">
|
<data name="wox_plugin_folder_select_folder_OpenFileOrFolder_error_message" xml:space="preserve">
|
||||||
<value>Could not start</value>
|
<value>Could not start</value>
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
|
using System.Globalization;
|
||||||
|
using System.IO;
|
||||||
using Wox.Plugin;
|
using Wox.Plugin;
|
||||||
|
|
||||||
namespace Microsoft.Plugin.Folder.Sources.Result
|
namespace Microsoft.Plugin.Folder.Sources.Result
|
||||||
@@ -27,12 +29,14 @@ namespace Microsoft.Plugin.Folder.Sources.Result
|
|||||||
{
|
{
|
||||||
return new Wox.Plugin.Result
|
return new Wox.Plugin.Result
|
||||||
{
|
{
|
||||||
Title = Properties.Resources.wox_plugin_folder_select_folder_first_result_title,
|
Title = string.Format(CultureInfo.InvariantCulture, Properties.Resources.wox_plugin_folder_select_folder_first_result_title, new DirectoryInfo(Search).Name),
|
||||||
QueryTextDisplay = Search,
|
QueryTextDisplay = Search,
|
||||||
SubTitle = Properties.Resources.wox_plugin_folder_select_folder_first_result_subtitle,
|
SubTitle = Properties.Resources.wox_plugin_folder_select_folder_first_result_subtitle,
|
||||||
|
ToolTipData = new ToolTipData(string.Format(CultureInfo.InvariantCulture, Properties.Resources.wox_plugin_folder_select_folder_first_result_title, new DirectoryInfo(Search).Name), Properties.Resources.wox_plugin_folder_select_folder_first_result_subtitle),
|
||||||
IcoPath = Search,
|
IcoPath = Search,
|
||||||
Score = 500,
|
Score = 500,
|
||||||
Action = c => _shellAction.ExecuteSanitized(Search, contextApi),
|
Action = c => _shellAction.ExecuteSanitized(Search, contextApi),
|
||||||
|
ContextData = new SearchResult { Type = ResultType.Folder, FullPath = Search },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ namespace Microsoft.Plugin.Folder.Sources.Result
|
|||||||
|
|
||||||
// Using CurrentCulture since this is user facing
|
// Using CurrentCulture since this is user facing
|
||||||
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_folder_result_subtitle, Path),
|
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_folder_result_subtitle, Path),
|
||||||
|
ToolTipData = new ToolTipData(Title, string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_folder_result_subtitle, Path)),
|
||||||
QueryTextDisplay = Path,
|
QueryTextDisplay = Path,
|
||||||
ContextData = new SearchResult { Type = ResultType.Folder, FullPath = Path },
|
ContextData = new SearchResult { Type = ResultType.Folder, FullPath = Path },
|
||||||
Action = c => _shellAction.Execute(Path, contextApi),
|
Action = c => _shellAction.Execute(Path, contextApi),
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ namespace Microsoft.Plugin.Folder.Sources.Result
|
|||||||
|
|
||||||
// Using CurrentCulture since this is user facing
|
// Using CurrentCulture since this is user facing
|
||||||
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_file_result_subtitle, FilePath),
|
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_file_result_subtitle, FilePath),
|
||||||
|
ToolTipData = new ToolTipData(Title, string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_file_result_subtitle, FilePath)),
|
||||||
IcoPath = FilePath,
|
IcoPath = FilePath,
|
||||||
Action = c => ShellAction.Execute(FilePath, contextApi),
|
Action = c => ShellAction.Execute(FilePath, contextApi),
|
||||||
ContextData = new SearchResult { Type = ResultType.File, FullPath = FilePath },
|
ContextData = new SearchResult { Type = ResultType.File, FullPath = FilePath },
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ namespace Microsoft.Plugin.Folder.Sources.Result
|
|||||||
|
|
||||||
// Using CurrentCulture since this is user facing
|
// Using CurrentCulture since this is user facing
|
||||||
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_folder_result_subtitle, Subtitle),
|
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_folder_result_subtitle, Subtitle),
|
||||||
|
ToolTipData = new ToolTipData(Title, string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_folder_result_subtitle, Subtitle)),
|
||||||
QueryTextDisplay = Path,
|
QueryTextDisplay = Path,
|
||||||
ContextData = new SearchResult { Type = ResultType.Folder, FullPath = Path },
|
ContextData = new SearchResult { Type = ResultType.Folder, FullPath = Path },
|
||||||
Action = c => ShellAction.Execute(Path, contextApi),
|
Action = c => ShellAction.Execute(Path, contextApi),
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ namespace Microsoft.Plugin.Folder.Sources.Result
|
|||||||
|
|
||||||
// Using CurrentCulture since this is user facing
|
// Using CurrentCulture since this is user facing
|
||||||
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.Microsoft_plugin_folder_truncation_warning_subtitle, PostTruncationCount, PreTruncationCount),
|
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.Microsoft_plugin_folder_truncation_warning_subtitle, PostTruncationCount, PreTruncationCount),
|
||||||
|
ToolTipData = new ToolTipData(Properties.Resources.Microsoft_plugin_folder_truncation_warning_title, string.Format(CultureInfo.CurrentCulture, Properties.Resources.Microsoft_plugin_folder_truncation_warning_subtitle, PostTruncationCount, PreTruncationCount)),
|
||||||
IcoPath = WarningIconPath,
|
IcoPath = WarningIconPath,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user