Skip to content

Commit 4ed1c3c

Browse files
committed
Update prompts
Signed-off-by: Florian Grabmeier <[email protected]>
1 parent a3b9a4f commit 4ed1c3c

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

Plugins/Flow.Launcher.Plugin.PluginsManager/Languages/en.xaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,17 @@
3232
<system:String x:Key="plugin_pluginsmanager_update_failed_subtitle">Please check if you can connect to github.com. This error means you may not be able to install or update plugins.</system:String>
3333
<system:String x:Key="plugin_pluginsmanager_update_all_title">Update all plugins</system:String>
3434
<system:String x:Key="plugin_pluginsmanager_update_all_subtitle">Would you like to update all plugins?</system:String>
35+
<system:String x:Key="plugin_pluginsmanager_update_all_prompt">Would you like to update {0} plugins?{1}FlowLauncher will restart after updating all plugins.</system:String>
36+
<system:String x:Key="plugin_pluginsmanager_update_all_prompt_no_restart">Would you like to update {0} plugins?</system:String>
37+
<system:String x:Key="plugin_pluginsmanager_update_all_success_restart">{0} plugins successfully updated. Restarting Flow, please wait...</system:String>
3538
<system:String x:Key="plugin_pluginsmanager_update_success_restart">Plugin {0} successfully updated. Restarting Flow, please wait...</system:String>
3639
<system:String x:Key="plugin_pluginsmanager_install_unknown_source_warning_title">Installing from an unknown source</system:String>
3740
<system:String x:Key="plugin_pluginsmanager_install_unknown_source_warning">You are installing this plugin from an unknown source and it may contain potential risks!{0}{0}Please ensure you understand where this plugin is from and that it is safe.{0}{0}Would you like to continue still?{0}{0}(You can switch off this warning via settings)</system:String>
3841

3942
<system:String x:Key="plugin_pluginsmanager_install_success_no_restart">Plugin {0} successfully installed. Please restart Flow.</system:String>
4043
<system:String x:Key="plugin_pluginsmanager_uninstall_success_no_restart">Plugin {0} successfully uninstalled. Please restart Flow.</system:String>
4144
<system:String x:Key="plugin_pluginsmanager_update_success_no_restart">Plugin {0} successfully updated. Please restart Flow.</system:String>
45+
<system:String x:Key="plugin_pluginsmanager_update_all_success_no_restart">{0} plugins successfully updated. Please restart Flow.</system:String>
4246
<system:String x:Key="plugin_pluginsmanager_plugin_modified_error">Plugin {0} has already been modified. Please restart Flow before making any further changes.</system:String>
4347

4448
<!-- Plugin Infos -->

Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,13 @@ await Http.DownloadAsync(x.PluginNewUserPlugin.UrlDownload, downloadToFilePath)
310310
string message;
311311
if (Settings.AutoRestartAfterChanging)
312312
{
313-
message = "Would you like to update all plugins?\nFlowLauncher will restart after updating all plugins.\n";
313+
message = string.Format(Context.API.GetTranslation("plugin_pluginsmanager_update_all_prompt"),
314+
resultsForUpdate.Count(), Environment.NewLine);
314315
}
315316
else
316317
{
317-
message = "Would you like to update all plugins?\nFlowLauncher will restart after updating all plugins.\n";
318+
message = string.Format(Context.API.GetTranslation("plugin_pluginsmanager_update_all_prompt_no_restart"),
319+
resultsForUpdate.Count());
318320
}
319321

320322
if (MessageBox.Show(message,
@@ -352,15 +354,15 @@ await Http.DownloadAsync(plugin.PluginNewUserPlugin.UrlDownload, downloadToFileP
352354
if (Settings.AutoRestartAfterChanging)
353355
{
354356
Context.API.ShowMsg(Context.API.GetTranslation("plugin_pluginsmanager_update_title"),
355-
string.Format(Context.API.GetTranslation("plugin_pluginsmanager_update_success_restart"),
356-
"all"));
357+
string.Format(Context.API.GetTranslation("plugin_pluginsmanager_update_all_success_restart"),
358+
resultsForUpdate.Count()));
357359
Context.API.RestartApp();
358360
}
359361
else
360362
{
361363
Context.API.ShowMsg(Context.API.GetTranslation("plugin_pluginsmanager_update_title"),
362-
string.Format(Context.API.GetTranslation("plugin_pluginsmanager_update_success_no_restart"),
363-
"all"));
364+
string.Format(Context.API.GetTranslation("plugin_pluginsmanager_update_all_success_no_restart"),
365+
resultsForUpdate.Count()));
364366
}
365367

366368
return true;

0 commit comments

Comments
 (0)