From 12265def19bceea2911daf315c9c52f3beb439ba Mon Sep 17 00:00:00 2001 From: qianlifeng Date: Sat, 28 Feb 2015 18:30:08 +0800 Subject: [PATCH] Add translation for CMD plugin --- Plugins/Wox.Plugin.CMD/CMD.cs | 12 ++++++------ Plugins/Wox.Plugin.CMD/Languages/en.xaml | 4 +++- Plugins/Wox.Plugin.CMD/Languages/zh-cn.xaml | 4 +++- Plugins/Wox.Plugin.CMD/Languages/zh-tw.xaml | 4 +++- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Plugins/Wox.Plugin.CMD/CMD.cs b/Plugins/Wox.Plugin.CMD/CMD.cs index b1e003d354..e95b11d711 100644 --- a/Plugins/Wox.Plugin.CMD/CMD.cs +++ b/Plugins/Wox.Plugin.CMD/CMD.cs @@ -14,7 +14,7 @@ using Control = System.Windows.Controls.Control; namespace Wox.Plugin.CMD { - public class CMD : IPlugin, ISettingProvider, IPluginI18n, IInstantQuery, IExclusiveQuery,IContextMenu + public class CMD : IPlugin, ISettingProvider, IPluginI18n, IInstantQuery, IExclusiveQuery, IContextMenu { private PluginInitContext context; private bool WinRStroked; @@ -88,14 +88,14 @@ namespace Wox.Plugin.CMD { if (m.Key == cmd) { - result.SubTitle = "this command has been executed " + m.Value + " times"; + result.SubTitle = string.Format(context.API.GetTranslation("wox_plugin_cmd_cmd_has_been_executed_times"), m.Value); return null; } var ret = new Result { Title = m.Key, - SubTitle = "this command has been executed " + m.Value + " times", + SubTitle = string.Format(context.API.GetTranslation("wox_plugin_cmd_cmd_has_been_executed_times"), m.Value), IcoPath = "Images/cmd.png", Action = (c) => { @@ -114,7 +114,7 @@ namespace Wox.Plugin.CMD { Title = cmd, Score = 5000, - SubTitle = "execute command through command shell", + SubTitle = context.API.GetTranslation("wox_plugin_cmd_execute_through_shell"), IcoPath = "Images/cmd.png", Action = (c) => { @@ -132,7 +132,7 @@ namespace Wox.Plugin.CMD .Select(m => new Result { Title = m.Key, - SubTitle = "this command has been executed " + m.Value + " times", + SubTitle = string.Format(context.API.GetTranslation("wox_plugin_cmd_cmd_has_been_executed_times"), m.Value), IcoPath = "Images/cmd.png", Action = (c) => { @@ -218,7 +218,7 @@ namespace Wox.Plugin.CMD { new Result() { - Title = "Run As Administrator", + Title = context.API.GetTranslation("wox_plugin_cmd_run_as_administrator"), Action = c => { context.API.HideApp(); diff --git a/Plugins/Wox.Plugin.CMD/Languages/en.xaml b/Plugins/Wox.Plugin.CMD/Languages/en.xaml index a37ee02a93..0c296f3836 100644 --- a/Plugins/Wox.Plugin.CMD/Languages/en.xaml +++ b/Plugins/Wox.Plugin.CMD/Languages/en.xaml @@ -6,5 +6,7 @@ Do not close Command Prompt after command execution Shell Provide executing commands from Wox. Commands should start with > - + this command has been executed {0} times + execute command through command shell + Run As Administrator \ No newline at end of file diff --git a/Plugins/Wox.Plugin.CMD/Languages/zh-cn.xaml b/Plugins/Wox.Plugin.CMD/Languages/zh-cn.xaml index 9693f5f3cc..04844ca89c 100644 --- a/Plugins/Wox.Plugin.CMD/Languages/zh-cn.xaml +++ b/Plugins/Wox.Plugin.CMD/Languages/zh-cn.xaml @@ -6,5 +6,7 @@ 执行后不关闭命令窗口 命令行 提供从Wox中执行命令行的能力,命令应该以>开头 - + 此命令已经被执行了 {0} 次 + 执行此命令 + 以管理员身份运行 \ No newline at end of file diff --git a/Plugins/Wox.Plugin.CMD/Languages/zh-tw.xaml b/Plugins/Wox.Plugin.CMD/Languages/zh-tw.xaml index 7d318ff0bc..be1d0cec9f 100644 --- a/Plugins/Wox.Plugin.CMD/Languages/zh-tw.xaml +++ b/Plugins/Wox.Plugin.CMD/Languages/zh-tw.xaml @@ -6,5 +6,7 @@ 執行後不關閉命令窗口 命令行 提供從Wox中執行命令行的能力,命令應該以>開頭 - + 此命令已經被執行了 {0} 次 + 執行此命令 + 以管理員身份運行 \ No newline at end of file