diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Flow.Launcher.Plugin.ProcessKiller.csproj b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Flow.Launcher.Plugin.ProcessKiller.csproj index 1fb5d2a69..ab84aa54a 100644 --- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Flow.Launcher.Plugin.ProcessKiller.csproj +++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Flow.Launcher.Plugin.ProcessKiller.csproj @@ -37,6 +37,11 @@ PreserveNewest + + Designer + MSBuild:Compile + PreserveNewest + Always diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/en.xaml new file mode 100644 index 000000000..13655f998 --- /dev/null +++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Languages/en.xaml @@ -0,0 +1,10 @@ + + + Process Killer + Kill running processes from Flow Launcher + + kill all "{0}" processes + + \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs index 883b5c493..e22fad609 100644 --- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs @@ -10,7 +10,7 @@ using Flow.Launcher.Infrastructure.Logger; namespace Flow.Launcher.Plugin.ProcessKiller { - public class Main : IPlugin + public class Main : IPlugin, IPluginI18n { private readonly HashSet _systemProcessList = new HashSet(){ "conhost", @@ -28,6 +28,13 @@ namespace Flow.Launcher.Plugin.ProcessKiller "spoolsv", "explorer"}; + private static PluginInitContext _context; + + public void Init(PluginInitContext context) + { + _context = context; + } + public List Query(Query query) { var termToSearch = query.Terms.Length == 1 @@ -41,6 +48,16 @@ namespace Flow.Launcher.Plugin.ProcessKiller : CreateResultsFromProcesses(processlist, termToSearch); } + public string GetTranslatedPluginTitle() + { + return _context.API.GetTranslation("flowlauncher_plugin_processkiller_plugin_name"); + } + + public string GetTranslatedPluginDescription() + { + return _context.API.GetTranslation("flowlauncher_plugin_processkiller_plugin_description"); + } + private List CreateResultsFromProcesses(List processlist, string termToSearch) { var results = new List(); @@ -69,7 +86,7 @@ namespace Flow.Launcher.Plugin.ProcessKiller results.Insert(0, new Result() { IcoPath = "Images\\app.png", - Title = "kill all \"" + termToSearch + "\" processes", + Title = string.Format(_context.API.GetTranslation("flowlauncher_plugin_processkiller_kill_all"), termToSearch), SubTitle = "", Score = 200, Action = (c) => @@ -158,10 +175,6 @@ namespace Flow.Launcher.Plugin.ProcessKiller } } - public void Init(PluginInitContext context) - { - } - [Flags] private enum ProcessAccessFlags : uint {