mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
[PowerToysRun] Add version info to plugin error messages (#38491)
* changes * fix resx
This commit is contained in:
@@ -185,9 +185,10 @@ namespace PowerLauncher.Plugin
|
||||
|
||||
if (!failedPlugins.IsEmpty)
|
||||
{
|
||||
var failed = string.Join(", ", failedPlugins.Select(x => x.Metadata.Name));
|
||||
string title = Resources.FailedToInitializePluginsTitle.ToString().Replace("{0}", Constant.Version);
|
||||
var failed = string.Join(", ", failedPlugins.Select(x => $"{x.Metadata.Name} ({x.Metadata.ExecuteFileVersion})"));
|
||||
var description = $"{string.Format(CultureInfo.CurrentCulture, FailedToInitializePluginsDescription, failed)}\n\n{Resources.FailedToInitializePluginsDescriptionPartTwo}";
|
||||
Application.Current.Dispatcher.InvokeAsync(() => API.ShowMsg(Resources.FailedToInitializePluginsTitle, description, string.Empty, false));
|
||||
Application.Current.Dispatcher.InvokeAsync(() => API.ShowMsg(title, description, string.Empty, false));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ namespace PowerLauncher.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to PowerToys Run - Plugin Initialization Error.
|
||||
/// Looks up a localized string similar to PowerToys Run {0} - Plugin Initialization Error.
|
||||
/// </summary>
|
||||
public static string FailedToInitializePluginsTitle {
|
||||
get {
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
<value>Fail to initialize plugins: {0}</value>
|
||||
</data>
|
||||
<data name="FailedToInitializePluginsTitle" xml:space="preserve">
|
||||
<value>PowerToys Run - Plugin Initialization Error</value>
|
||||
<value>PowerToys Run {0} - Plugin Initialization Error</value>
|
||||
<comment>Don't translate "PowerToys Run". This is a product name.</comment>
|
||||
</data>
|
||||
<data name="ContextMenuItemsAvailable" xml:space="preserve">
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.IO.Abstractions;
|
||||
using System.Linq;
|
||||
@@ -252,7 +251,7 @@ namespace PowerLauncher
|
||||
Id = x.Metadata.ID,
|
||||
Name = x.Plugin == null ? x.Metadata.Name : x.Plugin.Name,
|
||||
Description = x.Plugin?.Description,
|
||||
Version = FileVersionInfo.GetVersionInfo(x.Metadata.ExecuteFilePath).FileVersion,
|
||||
Version = x.Metadata.ExecuteFileVersion,
|
||||
Author = x.Metadata.Author,
|
||||
Website = x.Metadata.Website,
|
||||
Disabled = x.Metadata.Disabled,
|
||||
|
||||
Reference in New Issue
Block a user