Skip to content

Commit bfd8dfe

Browse files
committed
Localize plugin init fail message
1 parent d502f1d commit bfd8dfe

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,15 @@ public static async Task InitializePluginsAsync(IPublicAPI api)
209209
if (failedPlugins.Any())
210210
{
211211
var failed = string.Join(",", failedPlugins.Select(x => x.Metadata.Name));
212-
API.ShowMsg($"Fail to Init Plugins",
213-
$"Plugins: {failed} - fail to load and would be disabled, please contact plugin creator for help",
214-
"", false);
212+
API.ShowMsg(
213+
InternationalizationManager.Instance.GetTranslation("failedToInitializePluginsTitle"),
214+
string.Format(
215+
InternationalizationManager.Instance.GetTranslation("failedToInitializePluginsMessage"),
216+
failed
217+
),
218+
"",
219+
false
220+
);
215221
}
216222
}
217223

Flow.Launcher/Languages/en.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
</system:String>
1111
<system:String x:Key="runtimePluginChooseRuntimeExecutable">Please select the {0} executable</system:String>
1212
<system:String x:Key="runtimePluginUnableToSetExecutablePath">Unable to set {0} executable path, please try from Flow's settings (scroll down to the bottom).</system:String>
13+
<system:String x:Key="failedToInitializePluginsTitle">Fail to Init Plugins</system:String>
14+
<system:String x:Key="failedToInitializePluginsMessage">Plugins: {0} - fail to load and would be disabled, please contact plugin creator for help</system:String>
1315

1416
<!-- MainWindow -->
1517
<system:String x:Key="registerHotkeyFailed">Failed to register hotkey "{0}". The hotkey may be in use by another program. Change to a different hotkey, or exit another program.</system:String>

0 commit comments

Comments
 (0)