From 9caf62427a97d99e21bd0da43eb26483c0bf3b03 Mon Sep 17 00:00:00 2001 From: Zetaspace Date: Sun, 25 Sep 2022 00:29:55 +0800 Subject: [PATCH] PowerToys v0.62.0 Translation v15.0 Incremental Pack --- PowerToys/src/Version.props | 2 +- PowerToys/src/common/interop/interop.cpp | 9 + .../MeasureToolUI/Properties/Resources.resx | 132 +++++ .../ShortcutGuide/svgs/overlay.svg | 9 +- .../ShortcutGuide/svgs/overlay_portrait.svg | 455 +++++++-------- .../Properties/Resources.resx | 6 + .../InputInterpreter.cs | 15 +- .../Main.cs | 2 +- .../Properties/Resources.resx | 3 +- .../Plugins/Microsoft.Plugin.Program/Main.cs | 2 +- .../Plugins/Microsoft.Plugin.Uri/Main.cs | 68 ++- .../Properties/Resources.resx | 9 +- .../Properties/Resources.resx | 129 +++++ .../PowerRenameUILib/MainWindow.xaml | 534 ++++++++++++------ .../PowerRenameUILib/MainWindow.xaml.cpp | 197 +++---- .../Strings/en-us/Resources.resw | 10 +- .../Properties/Resources.resx | 2 +- .../Properties/Resources.resx | 6 +- .../Properties/Resource.resx | 2 +- PowerToys/src/runner/main.cpp | 64 ++- .../Settings.UI/OOBE/Views/OobeShellPage.xaml | 178 +++--- .../Settings.UI/Strings/en-us/Resources.resw | 279 ++++++++- .../Settings.UI/Views/PowerAccentPage.xaml | 81 +++ .../Settings.UI/Views/PowerLauncherPage.xaml | 55 +- .../Settings.UI/Views/PowerOcrPage.xaml | 44 ++ .../Settings.UI/Views/PowerPreviewPage.xaml | 36 +- 26 files changed, 1660 insertions(+), 669 deletions(-) create mode 100644 PowerToys/src/modules/MeasureTool/MeasureToolUI/Properties/Resources.resx create mode 100644 PowerToys/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Properties/Resources.resx create mode 100644 PowerToys/src/settings-ui/Settings.UI/Views/PowerAccentPage.xaml create mode 100644 PowerToys/src/settings-ui/Settings.UI/Views/PowerOcrPage.xaml diff --git a/PowerToys/src/Version.props b/PowerToys/src/Version.props index ce21510..7d7be1d 100644 --- a/PowerToys/src/Version.props +++ b/PowerToys/src/Version.props @@ -1,6 +1,6 @@ - 0.61.1 + 0.62.0 diff --git a/PowerToys/src/common/interop/interop.cpp b/PowerToys/src/common/interop/interop.cpp index aeae84b..2d9a43f 100644 --- a/PowerToys/src/common/interop/interop.cpp +++ b/PowerToys/src/common/interop/interop.cpp @@ -195,8 +195,17 @@ public return gcnew String(CommonSharedConstants::SHOW_COLOR_PICKER_SHARED_EVENT); } + static String ^ ShowPowerOCRSharedEvent() { + return gcnew String(CommonSharedConstants::SHOW_POWEROCR_SHARED_EVENT); + } + static String ^ AwakeExitEvent() { return gcnew String(CommonSharedConstants::AWAKE_EXIT_EVENT); } + + static String ^ PowerAccentExitEvent() { + return gcnew String(CommonSharedConstants::POWERACCENT_EXIT_EVENT); + } + }; } diff --git a/PowerToys/src/modules/MeasureTool/MeasureToolUI/Properties/Resources.resx b/PowerToys/src/modules/MeasureTool/MeasureToolUI/Properties/Resources.resx new file mode 100644 index 0000000..cb62455 --- /dev/null +++ b/PowerToys/src/modules/MeasureTool/MeasureToolUI/Properties/Resources.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 框选 + + + 间距 + + + 水平间距 + + + 垂直间距 + + \ No newline at end of file diff --git a/PowerToys/src/modules/ShortcutGuide/ShortcutGuide/svgs/overlay.svg b/PowerToys/src/modules/ShortcutGuide/ShortcutGuide/svgs/overlay.svg index 46c7424..779f835 100644 --- a/PowerToys/src/modules/ShortcutGuide/ShortcutGuide/svgs/overlay.svg +++ b/PowerToys/src/modules/ShortcutGuide/ShortcutGuide/svgs/overlay.svg @@ -151,11 +151,16 @@ C110.6,27,110.1,26.7,109.7,26.6z M117.5,22.7c0.8-1.2,1.4-2.8,1.7-4.6h-3.6C116.1,19.9,116.7,21.4,117.5,22.7z" transform="translate(-1 -2)" fill="#2e17fc"/> - + + + + + + - + diff --git a/PowerToys/src/modules/ShortcutGuide/ShortcutGuide/svgs/overlay_portrait.svg b/PowerToys/src/modules/ShortcutGuide/ShortcutGuide/svgs/overlay_portrait.svg index 734f417..437cd53 100644 --- a/PowerToys/src/modules/ShortcutGuide/ShortcutGuide/svgs/overlay_portrait.svg +++ b/PowerToys/src/modules/ShortcutGuide/ShortcutGuide/svgs/overlay_portrait.svg @@ -24,252 +24,257 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - + + + + + + + + + + + - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + + + + + + - - - - + + + + + + - - - - + + + + + + - - - - - - + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + diff --git a/PowerToys/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx b/PowerToys/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx index f3c855e..d8cf6e4 100644 --- a/PowerToys/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx +++ b/PowerToys/src/modules/fancyzones/editor/FancyZonesEditor/Properties/Resources.resx @@ -415,4 +415,10 @@ 解析自定义布局时出错。 + + 激活距离滑块,取值范围从 {0} 到 {1},当前为 {2}。 + + + {0} 像素 + \ No newline at end of file diff --git a/PowerToys/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/InputInterpreter.cs b/PowerToys/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/InputInterpreter.cs index 0d64219..b95b010 100644 --- a/PowerToys/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/InputInterpreter.cs +++ b/PowerToys/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/InputInterpreter.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation +// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. @@ -292,19 +292,12 @@ public static void FeetToFt(ref string[] split) } /// - /// Converts spelling "metre" to "meter" + /// Converts spelling "metre" to "meter", also for centimetre and other variants /// public static void MetreToMeter(ref string[] split) { - if (split[1].ToLowerInvariant() == "metre") - { - split[1] = "meter"; - } - - if (split[3].ToLowerInvariant() == "metre") - { - split[3] = "meter"; - } + split[1] = split[1].Replace("metre", "meter", System.StringComparison.CurrentCultureIgnoreCase); + split[3] = split[3].Replace("metre", "meter", System.StringComparison.CurrentCultureIgnoreCase); } /// diff --git a/PowerToys/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Main.cs b/PowerToys/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Main.cs index 22a2ead..8c9c2e8 100644 --- a/PowerToys/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Main.cs +++ b/PowerToys/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.UnitConverter/Main.cs @@ -60,7 +60,7 @@ public List Query(Query query) [System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.LayoutRules", "SA1501:Statement should not be on a single line", Justification = "<挂起>")] private Result GetResult(UnitConversionResult result) { - string hack = $"{result.QuantityType}"; + string hack = $"{result.QuantityInfo.Name}"; if (hack == "Acceleration") { hack = "加速度"; } else if (hack == "Angle") { hack = "角度"; } else if (hack == "Area") { hack = "面积"; } diff --git a/PowerToys/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/Properties/Resources.resx b/PowerToys/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/Properties/Resources.resx index d6cb3a2..d3a772b 100644 --- a/PowerToys/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/Properties/Resources.resx +++ b/PowerToys/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/Properties/Resources.resx @@ -125,7 +125,8 @@ Used to indicate the location where something is - 打开在 VS Code 中打开过的工作区、远程计算机(SSH、Codespaces)和容器 + 打开 VS Code 的常用工作区、远程计算机(SSH、Codespaces)和容器,VS Code 路径须在 PATH 环境变量中 + VS Code is the name of a product. PATH is the name of an environment variable. Don't translate it. SSH 远程计算机 diff --git a/PowerToys/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Main.cs b/PowerToys/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Main.cs index c463ff5..0375943 100644 --- a/PowerToys/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Main.cs +++ b/PowerToys/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Main.cs @@ -20,7 +20,7 @@ namespace Microsoft.Plugin.Program public class Main : IPlugin, IPluginI18n, IContextMenu, ISavable, IDisposable { // The order of this array is important! The Parsers will be checked in order (index 0 to index Length-1) and the first parser which is able to parse the Query will be used - // NoArgumentsArgumentParser does always succeed and therefor should always be last/fallback + // NoArgumentsArgumentParser does always succeed and therefore should always be last/fallback private static readonly IProgramArgumentParser[] _programArgumentParsers = new IProgramArgumentParser[] { new DoubleDashProgramArgumentParser(), diff --git a/PowerToys/src/modules/launcher/Plugins/Microsoft.Plugin.Uri/Main.cs b/PowerToys/src/modules/launcher/Plugins/Microsoft.Plugin.Uri/Main.cs index 14cb566..96d2aa2 100644 --- a/PowerToys/src/modules/launcher/Plugins/Microsoft.Plugin.Uri/Main.cs +++ b/PowerToys/src/modules/launcher/Plugins/Microsoft.Plugin.Uri/Main.cs @@ -50,7 +50,7 @@ public List Query(Query query) { results.Add(new Result { - Title = Properties.Resources.Microsoft_plugin_uri_open, + Title = Properties.Resources.Microsoft_plugin_uri_default_browser, SubTitle = BrowserInfo.Path, IcoPath = DefaultIconPath, Action = action => @@ -70,34 +70,54 @@ public List Query(Query query) } if (!string.IsNullOrEmpty(query?.Search) - && _uriParser.TryParse(query.Search, out var uriResult, out var isWebUri) - && _uriResolver.IsValidHost(uriResult)) + && _uriParser.TryParse(query.Search, out var webUriResult, out var systemUriResult) + && _uriResolver.IsValidHost(webUriResult)) { - var uriResultString = uriResult.ToString(); - var isWebUriBool = isWebUri; - - results.Add(new Result + if (webUriResult is not null) { - Title = uriResultString, - SubTitle = isWebUriBool - ? Properties.Resources.Microsoft_plugin_uri_website - : Properties.Resources.Microsoft_plugin_uri_open, - IcoPath = isWebUriBool && BrowserInfo.IconPath != null - ? BrowserInfo.IconPath - : DefaultIconPath, - Action = action => + var resultString = webUriResult.ToString(); + results.Add(new Result { - if (!Helper.OpenInShell(uriResultString)) + Title = resultString, + SubTitle = Properties.Resources.Microsoft_plugin_uri_website, + IcoPath = BrowserInfo.IconPath, + Action = action => { - var title = $": {Properties.Resources.Microsoft_plugin_uri_plugin_name}"; - var message = $"{Properties.Resources.Microsoft_plugin_uri_open_failed}: {uriResultString}"; - Context.API.ShowMsg(title, message); - return false; - } + if (!Helper.OpenInShell(resultString)) + { + var title = $"Plugin: {Properties.Resources.Microsoft_plugin_uri_plugin_name}"; + var message = $"{Properties.Resources.Microsoft_plugin_uri_open_failed}: {resultString}"; + Context.API.ShowMsg(title, message); + return false; + } + + return true; + }, + }); + } - return true; - }, - }); + if (systemUriResult is not null) + { + var resultString = systemUriResult.ToString(); + results.Add(new Result + { + Title = resultString, + SubTitle = Properties.Resources.Microsoft_plugin_uri_open, + IcoPath = DefaultIconPath, + Action = action => + { + if (!Helper.OpenInShell(resultString)) + { + var title = $": {Properties.Resources.Microsoft_plugin_uri_plugin_name}"; + var message = $"{Properties.Resources.Microsoft_plugin_uri_open_failed}: {resultString}"; + Context.API.ShowMsg(title, message); + return false; + } + + return true; + }, + }); + } } return results; diff --git a/PowerToys/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.resx b/PowerToys/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.resx index be5c871..766c40a 100644 --- a/PowerToys/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.resx +++ b/PowerToys/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Calculator/Properties/Resources.resx @@ -121,13 +121,13 @@ 计算器 - 进行数学计算(例如 5*3-2) + 进行数学计算,例如 5*3-2 - 结果不是数字(NaN 错误) + 发生 NaN 错误,结果不是数字 - 表达式错误或不完整(是否忘记加上括号?) + 表达式错误或不完整,可能缺少括号 复制计算结果 @@ -158,4 +158,7 @@ 强制输出英语格式的数字,例如 '{0}' {0} is a placeholder and will be replaced in code. + + 零不可以作为除数 + \ No newline at end of file diff --git a/PowerToys/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Properties/Resources.resx b/PowerToys/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Properties/Resources.resx new file mode 100644 index 0000000..f0a8a4b --- /dev/null +++ b/PowerToys/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Properties/Resources.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 历史记录 + + + 快速访问搜索记录 + + + 无法处理该输入 + + \ No newline at end of file diff --git a/PowerToys/src/modules/powerrename/PowerRenameUILib/MainWindow.xaml b/PowerToys/src/modules/powerrename/PowerRenameUILib/MainWindow.xaml index 3f2a882..1e5b903 100644 --- a/PowerToys/src/modules/powerrename/PowerRenameUILib/MainWindow.xaml +++ b/PowerToys/src/modules/powerrename/PowerRenameUILib/MainWindow.xaml @@ -2,18 +2,18 @@ x:Class="PowerRenameUI.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="using:PowerRenameUI" + xmlns:animatedVisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals" + xmlns:controls="using:Microsoft.UI.Xaml.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="using:PowerRenameUI" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:controls="using:Microsoft.UI.Xaml.Controls" xmlns:muxc="using:Microsoft.UI.Xaml.Controls" - xmlns:animatedVisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals" mc:Ignorable="d"> - + - + @@ -21,14 +21,15 @@ - + @@ -40,146 +41,156 @@ - - - - + + + + - + - + - + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - + + - - - - - - - - 文件名 + 扩展名 - 仅文件名 - 仅扩展名 + + + + + 文件名 + 扩展名 + 仅文件名 + 仅扩展名 - - - + + + - + - - - - + + + + - + - + - - - -