Skip to content

Commit

Permalink
PowerToys v0.74.0 Translation v20.0 Incremental Pack
Browse files Browse the repository at this point in the history
  • Loading branch information
zetaloop committed Sep 28, 2023
1 parent 9069fae commit ba47798
Show file tree
Hide file tree
Showing 25 changed files with 1,052 additions and 1,100 deletions.
2 changes: 1 addition & 1 deletion PowerToys/src/Version.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Version>0.73.0</Version>
<Version>0.74.0</Version>
</PropertyGroup>
</Project>
1 change: 1 addition & 0 deletions PowerToys/src/common/interop/keyboard_layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ void LayoutMap::LayoutMapImpl::UpdateLayout()
keyboardLayoutMap[VK_RETURN | numpadOriginBit] = L"Enter (小键盘)";
keyboardLayoutMap[VK_DIVIDE | numpadOriginBit] = L"/ (小键盘)";

keyboardLayoutMap[VK_SUBTRACT] = L"- (小键盘)";
keyboardLayoutMap[VK_SELECT] = L"Select";
keyboardLayoutMap[VK_PRINT] = L"Print";
keyboardLayoutMap[VK_EXECUTE] = L"Execute";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="AppTitle.Title" xml:space="preserve">
<value>文件师傅</value>
</data>
<data name="AppTitleText.Text" xml:space="preserve">
<data name="AppTitle" xml:space="preserve">
<value>文件师傅</value>
<comment>Title of the window when running as user.</comment>
</data>
<data name="EmptyListDescription.Text" xml:space="preserve">
<value>无占用</value>
Expand Down Expand Up @@ -162,4 +160,8 @@
<data name="User.Header" xml:space="preserve">
<value>用户</value>
</data>
<data name="AppAdminTitle" xml:space="preserve">
<value>管理员权限: 文件师傅</value>
<comment>Title of the window when running as administrator.</comment>
</data>
</root>
46 changes: 0 additions & 46 deletions PowerToys/src/modules/Hosts/Hosts/HostsXAML/MainWindow.xaml

This file was deleted.

16 changes: 14 additions & 2 deletions PowerToys/src/modules/Hosts/Hosts/Strings/en-us/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,18 @@
<value>域名表文件被其他软件改动。</value>
<comment>"Hosts" refers to the system hosts file, do not loc</comment>
</data>
<data name="FileSaveError.Message" xml:space="preserve">
<data name="FileSaveError_FileInUse" xml:space="preserve">
<value>无法保存域名表文件,因为文件被其他软件所占用。</value>
<comment>"Hosts" refers to the system hosts file, do not loc</comment>
</data>
<data name="FileSaveError_Generic" xml:space="preserve">
<value>无法保存域名表文件。</value>
<comment>"Hosts" refers to the system hosts file, do not loc</comment>
</data>
<data name="FileSaveError_NotElevated" xml:space="preserve">
<value>无法保存域名表文件,需要管理员权限。</value>
<comment>"Hosts" refers to the system hosts file, do not loc</comment>
</data>
<data name="FilterBtn.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
<value>筛选</value>
</data>
Expand Down Expand Up @@ -300,8 +308,12 @@
<data name="WarningDialog_Title" xml:space="preserve">
<value>警告</value>
</data>
<data name="WindowAdminTitle" xml:space="preserve">
<value>管理员权限: 域名表编辑器</value>
<comment>Title of the window when running as administrator. "Hosts File Editor" is the name of the utility. "Hosts" refers to the system hosts file, do not loc</comment>
</data>
<data name="WindowTitle" xml:space="preserve">
<value>域名表编辑器</value>
<comment>"Hosts File Editor" is the name of the utility. "Hosts" refers to the system hosts file, do not loc</comment>
<comment>Title of the window when running as user. "Hosts File Editor" is the name of the utility. "Hosts" refers to the system hosts file, do not loc</comment>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,19 @@ internal static void SuspendAllThreadsBut(int threadId)
lock (ThreadsLock)
{
#pragma warning disable 618 // Temporary
threads.Where(t => t.IsAlive && t.ManagedThreadId != threadId).ToList().ForEach(t => t.Suspend());
threads.Where(t => t.IsAlive && t.ManagedThreadId != threadId).ToList().ForEach(
t =>
{
try
{
t.Suspend();
}
catch (Exception)
{
// This method is suspending every thread so that it can kill the process right after restarting.
// Makes no sense to crash on a thread suspension fail, since we're killing the process afterwards, anyway.
}
});
#pragma warning restore 618
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,21 @@ public class Main : IPlugin, IPluginI18n, ISettingProvider, IContextMenu, ISavab
DisplayLabel = Resources.wox_leave_shell_open,
Value = _settings.LeaveShellOpen,
},

new PluginAdditionalOption()
{
Key = "ShellCommandExecution",
DisplayLabel = Resources.wox_shell_command_execution,
PluginOptionType = PluginAdditionalOption.AdditionalOptionType.Combobox,
ComboBoxOptions = new List<string>
{
Resources.run_command_in_command_prompt,
Resources.run_command_in_powershell,
Resources.find_executable_file_and_run_it,
Resources.run_command_in_windows_terminal,
},
ComboBoxValue = (int)_settings.Shell,
},
};

private PluginInitContext _context;
Expand Down Expand Up @@ -418,12 +433,17 @@ public List<ContextMenuResult> LoadContextMenus(Result selectedResult)
public void UpdateSettings(PowerLauncherPluginSettings settings)
{
var leaveShellOpen = false;
var shellOption = 2;

if (settings != null && settings.AdditionalOptions != null)
{
var optionLeaveShellOpen = settings.AdditionalOptions.FirstOrDefault(x => x.Key == "LeaveShellOpen");
leaveShellOpen = optionLeaveShellOpen?.Value ?? leaveShellOpen;
_settings.LeaveShellOpen = leaveShellOpen;

var optionShell = settings.AdditionalOptions.FirstOrDefault(x => x.Key == "ShellCommandExecution");
shellOption = optionShell?.ComboBoxValue ?? shellOption;
_settings.Shell = (ExecutionShell)shellOption;
}

Save();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,19 @@
<data name="wox_leave_shell_open" xml:space="preserve">
<value>保持终端窗口打开</value>
</data>
<data name="wox_shell_command_execution" xml:space="preserve">
<value>命令执行方式</value>
</data>
<data name="run_command_in_command_prompt" xml:space="preserve">
<value>命令提示符 (cmd.exe)</value>
</data>
<data name="run_command_in_powershell" xml:space="preserve">
<value>PowerShell (PowerShell.exe)</value>
</data>
<data name="find_executable_file_and_run_it" xml:space="preserve">
<value>寻找并执行可执行文件</value>
</data>
<data name="run_command_in_windows_terminal" xml:space="preserve">
<value>Windows Terminal (wt.exe)</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ internal MainWindow()
UpdateToolBarAndUI(false);
UpdateWindowTitle(resourceLoader.GetString("FileNotFound"));
}

ManagedCommon.WindowHelpers.BringToForeground(windowHandle);
}

private void MainWindow_Activated(object sender, WindowActivatedEventArgs args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@
<data name="FilterRegistryName" xml:space="preserve">
<value>注册表文件 (*.reg)</value>
</data>
<data name="InvalidBinary" xml:space="preserve">
<value>(无效二进制值)</value>
</data>
<data name="InvalidDword" xml:space="preserve">
<value>(无效 DWORD (32 位) 值)</value>
</data>
<data name="InvalidQword" xml:space="preserve">
<value>(无效 QWORD (64 位) 值)</value>
</data>
Expand All @@ -147,6 +153,9 @@
<data name="InvalidRegistryFileTitle" xml:space="preserve">
<value>非注册表文件</value>
</data>
<data name="InvalidString" xml:space="preserve">
<value>(无效字符串值)</value>
</data>
<data name="LargeRegistryFile" xml:space="preserve">
<value> 大于 10MB,注册表预览工具无法打开该文件。</value>
</data>
Expand Down
5 changes: 4 additions & 1 deletion PowerToys/src/runner/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,7 @@
<value>PowerToys 新版本安装完成,由于程序文件路径变更,需要重启电脑,来重新加载系统集成功能。</value>
<comment>File Explorer refers to the Windows File Explorer application.</comment>
</data>
</root>
<data name="TRAY_ICON_ADMIN_TOOLTIP" xml:space="preserve">
<value>管理员权限</value>
</data>
</root>
2 changes: 1 addition & 1 deletion PowerToys/src/runner/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int runner(bool isProcessElevated, bool openSettings, std::string settingsWindow
//init_global_error_handlers();
#endif
Trace::RegisterProvider();
start_tray_icon();
start_tray_icon(isProcessElevated);
CentralizedKeyboardHook::Start();

int result = -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ public static void HandleThemeChange()
{
var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(oobeWindow);
ThemeHelpers.SetImmersiveDarkMode(hWnd, isDark);
oobeWindow.SetTheme(isDark);
SetContentTheme(isDark, oobeWindow);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
x:Class="Microsoft.PowerToys.Settings.UI.OOBE.Views.OobeShellPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:animations="using:CommunityToolkit.WinUI.UI.Animations"
xmlns:animations="using:CommunityToolkit.WinUI.Animations"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="using:CommunityToolkit.WinUI.UI"
xmlns:ui="using:CommunityToolkit.WinUI"
HighContrastAdjustment="None"
Loaded="ShellPage_Loaded"
mc:Ignorable="d">
Expand Down Expand Up @@ -171,7 +171,7 @@
<NavigationView.FooterMenuItems>
<NavigationViewItem
x:Uid="Shell_WhatsNew"
Icon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
Icon="{ui:FontIcon
Glyph=&#xF133;}"
Tag="WhatsNew" />
</NavigationView.FooterMenuItems>
Expand Down
Loading

0 comments on commit ba47798

Please sign in to comment.