mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Fixed the error that Files were named Folder (#6935)
* Fixed the error that Files were named Folder * Add and use resources in Results. * Last item without resources in Plugin.Folder * Changed to CurrentCulture, added N0 to Folder truncate warning. Co-authored-by: p-storm <paul.de.man@gmail.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Globalization;
|
||||
using Wox.Plugin;
|
||||
|
||||
namespace Microsoft.Plugin.Folder.Sources.Result
|
||||
@@ -27,9 +28,9 @@ namespace Microsoft.Plugin.Folder.Sources.Result
|
||||
{
|
||||
return new Wox.Plugin.Result
|
||||
{
|
||||
Title = $"Open {Search}",
|
||||
Title = Properties.Resources.wox_plugin_folder_select_folder_first_result_title,
|
||||
QueryTextDisplay = Search,
|
||||
SubTitle = $"Folder: Use > to search within the directory. Use * to search for file extensions. Or use both >*.",
|
||||
SubTitle = Properties.Resources.wox_plugin_folder_select_folder_first_result_subtitle,
|
||||
IcoPath = Search,
|
||||
Score = 500,
|
||||
Action = c => _explorerAction.ExecuteSanitized(Search, contextApi),
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using Wox.Infrastructure;
|
||||
using Wox.Plugin;
|
||||
@@ -23,7 +24,7 @@ namespace Microsoft.Plugin.Folder.Sources.Result
|
||||
var result = new Wox.Plugin.Result
|
||||
{
|
||||
Title = Title,
|
||||
SubTitle = "Folder: " + FilePath,
|
||||
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_file_result_subtitle, FilePath),
|
||||
IcoPath = FilePath,
|
||||
TitleHighlightData = StringMatcher.FuzzySearch(Search, Path.GetFileName(FilePath)).MatchData,
|
||||
Action = c => ExplorerAction.Execute(FilePath, contextApi),
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Globalization;
|
||||
using Wox.Infrastructure;
|
||||
using Wox.Plugin;
|
||||
|
||||
@@ -36,7 +37,7 @@ namespace Microsoft.Plugin.Folder.Sources.Result
|
||||
{
|
||||
Title = Title,
|
||||
IcoPath = Path,
|
||||
SubTitle = "Folder: " + Subtitle,
|
||||
SubTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.wox_plugin_folder_select_folder_result_subtitle, Subtitle),
|
||||
QueryTextDisplay = Path,
|
||||
TitleHighlightData = StringMatcher.FuzzySearch(Search, Title).MatchData,
|
||||
ContextData = new SearchResult { Type = ResultType.Folder, FullPath = Path },
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Microsoft.Plugin.Folder.Sources.Result
|
||||
{
|
||||
Title = Properties.Resources.Microsoft_plugin_folder_truncation_warning_title,
|
||||
QueryTextDisplay = Search,
|
||||
SubTitle = string.Format(CultureInfo.InvariantCulture, 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),
|
||||
IcoPath = WarningIconPath,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user