From 0a845c11c6c85c4aff9087b73bb49c1798a9dc10 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Mon, 19 Sep 2022 22:07:57 -0500 Subject: [PATCH] make python installation prompt translatable --- Flow.Launcher.Core/Plugin/PluginsLoader.cs | 7 ++----- Flow.Launcher/Languages/en.xaml | 8 ++++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/PluginsLoader.cs b/Flow.Launcher.Core/Plugin/PluginsLoader.cs index 7521742636a..5b5ea96fdae 100644 --- a/Flow.Launcher.Core/Plugin/PluginsLoader.cs +++ b/Flow.Launcher.Core/Plugin/PluginsLoader.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using System.Windows.Forms; using Droplex; +using Flow.Launcher.Core.Resource; using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.Logger; using Flow.Launcher.Infrastructure.UserSettings; @@ -118,11 +119,7 @@ public static IEnumerable PythonPlugins(List source, var pythonPath = string.Empty; - if (MessageBox.Show("Flow detected you have installed Python plugins, which " + - "will need Python to run. Would you like to download Python? " + - Environment.NewLine + Environment.NewLine + - "Click no if it's already installed, " + - "and you will be prompted to select the folder that contains the Python executable", + if (MessageBox.Show(InternationalizationManager.Instance.GetTranslation("pythonInstalledPrompt"), string.Empty, MessageBoxButtons.YesNo) == DialogResult.No && string.IsNullOrEmpty(settings.PythonDirectory)) { diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index bdf7450525c..12fb427e0ba 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -1,5 +1,4 @@ - @@ -23,7 +22,8 @@ Text Game Mode Suspend the use of Hotkeys. - + Flow detected you have installed Python plugins, which will need Python to run. Would you like to download Python? Click no if it's already installed, and you will be prompted to select the folder that contains the Python executable + Flow Launcher Settings General @@ -289,4 +289,4 @@ sn Sticky Notes - + \ No newline at end of file