mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Add plugin title translations
This commit is contained in:
@@ -11,5 +11,8 @@
|
||||
<system:String x:Key="wox_plugin_sys_exit">Close Wox</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_restart">Restart Wox</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_setting">Tweak this app</system:String>
|
||||
|
||||
|
||||
<system:String x:Key="wox_plugin_sys_plugin_name">System Commands</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_plugin_description">Provide System related commands. e.g. shutdown,lock,setting etc.</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -1,15 +1,18 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="wox_plugin_sys_command">命令</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_desc">描述</system:String>
|
||||
|
||||
<system:String x:Key="wox_plugin_sys_shutdown_computer">关闭电脑</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_log_off">注销</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_lock">锁定这台电脑</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_exit">退出Wox</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_restart">重启Wox</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_setting">设置</system:String>
|
||||
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="wox_plugin_sys_command">命令</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_desc">描述</system:String>
|
||||
|
||||
<system:String x:Key="wox_plugin_sys_shutdown_computer">关闭电脑</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_log_off">注销</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_lock">锁定这台电脑</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_exit">退出Wox</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_restart">重启Wox</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_setting">设置</system:String>
|
||||
|
||||
<system:String x:Key="wox_plugin_sys_plugin_name">系统命令</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_plugin_description">系统系统相关的命令。例如,关机,锁定,设置等</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -1,15 +1,18 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="wox_plugin_sys_command">命令</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_desc">描述</system:String>
|
||||
|
||||
<system:String x:Key="wox_plugin_sys_shutdown_computer">關閉電腦</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_log_off">註銷</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_lock">鎖定這臺電腦</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_exit">退出Wox</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_restart">重啟Wox</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_setting">設置</system:String>
|
||||
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="wox_plugin_sys_command">命令</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_desc">描述</system:String>
|
||||
|
||||
<system:String x:Key="wox_plugin_sys_shutdown_computer">關閉電腦</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_log_off">註銷</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_lock">鎖定這臺電腦</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_exit">退出Wox</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_restart">重啟Wox</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_setting">設置</system:String>
|
||||
|
||||
<system:String x:Key="wox_plugin_sys_plugin_name">系統命令</system:String>
|
||||
<system:String x:Key="wox_plugin_sys_plugin_description">系統系統相關的命令。例如,關機,鎖定,設置等</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -4,6 +4,7 @@ using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
using Wox.Infrastructure;
|
||||
|
||||
namespace Wox.Plugin.Sys
|
||||
{
|
||||
@@ -42,7 +43,7 @@ namespace Wox.Plugin.Sys
|
||||
List<Result> results = new List<Result>();
|
||||
foreach (Result availableResult in availableResults)
|
||||
{
|
||||
if (availableResult.Title.ToLower().StartsWith(query.Search.ToLower()))
|
||||
if (StringMatcher.IsMatch(availableResult.Title, query.Search) || StringMatcher.IsMatch(availableResult.SubTitle, query.Search))
|
||||
{
|
||||
results.Add(availableResult);
|
||||
}
|
||||
@@ -142,5 +143,15 @@ namespace Wox.Plugin.Sys
|
||||
return Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Languages");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public string GetTranslatedPluginTitle()
|
||||
{
|
||||
return context.API.GetTranslation("wox_plugin_sys_plugin_name");
|
||||
}
|
||||
|
||||
public string GetTranslatedPluginDescription()
|
||||
{
|
||||
return context.API.GetTranslation("wox_plugin_sys_plugin_description");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user