mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
Add translation for CMD plugin
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -6,5 +6,7 @@
|
||||
<system:String x:Key="wox_plugin_cmd_leave_cmd_open">Do not close Command Prompt after command execution</system:String>
|
||||
<system:String x:Key="wox_plugin_cmd_plugin_name">Shell</system:String>
|
||||
<system:String x:Key="wox_plugin_cmd_plugin_description">Provide executing commands from Wox. Commands should start with ></system:String>
|
||||
|
||||
<system:String x:Key="wox_plugin_cmd_cmd_has_been_executed_times">this command has been executed {0} times</system:String>
|
||||
<system:String x:Key="wox_plugin_cmd_execute_through_shell">execute command through command shell</system:String>
|
||||
<system:String x:Key="wox_plugin_cmd_run_as_administrator">Run As Administrator</system:String>
|
||||
</ResourceDictionary>
|
||||
@@ -6,5 +6,7 @@
|
||||
<system:String x:Key="wox_plugin_cmd_leave_cmd_open">执行后不关闭命令窗口</system:String>
|
||||
<system:String x:Key="wox_plugin_cmd_plugin_name">命令行</system:String>
|
||||
<system:String x:Key="wox_plugin_cmd_plugin_description">提供从Wox中执行命令行的能力,命令应该以>开头</system:String>
|
||||
|
||||
<system:String x:Key="wox_plugin_cmd_cmd_has_been_executed_times">此命令已经被执行了 {0} 次</system:String>
|
||||
<system:String x:Key="wox_plugin_cmd_execute_through_shell">执行此命令</system:String>
|
||||
<system:String x:Key="wox_plugin_cmd_run_as_administrator">以管理员身份运行</system:String>
|
||||
</ResourceDictionary>
|
||||
@@ -6,5 +6,7 @@
|
||||
<system:String x:Key="wox_plugin_cmd_leave_cmd_open">執行後不關閉命令窗口</system:String>
|
||||
<system:String x:Key="wox_plugin_cmd_plugin_name">命令行</system:String>
|
||||
<system:String x:Key="wox_plugin_cmd_plugin_description">提供從Wox中執行命令行的能力,命令應該以>開頭</system:String>
|
||||
|
||||
<system:String x:Key="wox_plugin_cmd_cmd_has_been_executed_times">此命令已經被執行了 {0} 次</system:String>
|
||||
<system:String x:Key="wox_plugin_cmd_execute_through_shell">執行此命令</system:String>
|
||||
<system:String x:Key="wox_plugin_cmd_run_as_administrator">以管理員身份運行</system:String>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user