mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
Remove localizations (#24376)
* round 1 mostly /en-us/ and the like * round 2 * revert files b/c feedback * revert files b/c feedback * revert files b/c feedback * Update cziplib * Redo interop * Revert security.md --------- Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
This commit is contained in:
@@ -151,7 +151,7 @@ namespace FileLocksmith::Interop
|
|||||||
|
|
||||||
if (!stream)
|
if (!stream)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
stream.close();
|
stream.close();
|
||||||
@@ -178,7 +178,7 @@ namespace FileLocksmith::Interop
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Adapted from "https://learn.microsoft.com/en-us/windows/win32/secauthz/enabling-and-disabling-privileges-in-c--" */
|
/* Adapted from "https://learn.microsoft.com/windows/win32/secauthz/enabling-and-disabling-privileges-in-c--" */
|
||||||
static System::Boolean SetDebugPrivilege()
|
static System::Boolean SetDebugPrivilege()
|
||||||
{
|
{
|
||||||
HANDLE hToken;
|
HANDLE hToken;
|
||||||
|
|||||||
@@ -589,10 +589,10 @@ namespace Microsoft.Plugin.Program.Programs
|
|||||||
|
|
||||||
internal void LogoPathFromUri(string uri, Theme theme)
|
internal void LogoPathFromUri(string uri, Theme theme)
|
||||||
{
|
{
|
||||||
// all https://msdn.microsoft.com/windows/uwp/controls-and-patterns/tiles-and-notifications-app-assets
|
// all https://learn.microsoft.com/windows/uwp/controls-and-patterns/tiles-and-notifications-app-assets
|
||||||
// windows 10 https://msdn.microsoft.com/en-us/library/windows/apps/dn934817.aspx
|
// windows 10 https://msdn.microsoft.com/library/windows/apps/dn934817.aspx
|
||||||
// windows 8.1 https://msdn.microsoft.com/en-us/library/windows/apps/hh965372.aspx#target_size
|
// windows 8.1 https://msdn.microsoft.com/library/windows/apps/hh965372.aspx#target_size
|
||||||
// windows 8 https://msdn.microsoft.com/en-us/library/windows/apps/br211475.aspx
|
// windows 8 https://msdn.microsoft.com/library/windows/apps/br211475.aspx
|
||||||
string path;
|
string path;
|
||||||
bool isLogoUriSet;
|
bool isLogoUriSet;
|
||||||
|
|
||||||
|
|||||||
@@ -821,7 +821,7 @@ namespace Microsoft.Plugin.Program.Programs
|
|||||||
|
|
||||||
private static IEnumerable<string> RegistryAppProgramPaths(IList<string> suffixes)
|
private static IEnumerable<string> RegistryAppProgramPaths(IList<string> suffixes)
|
||||||
{
|
{
|
||||||
// https://msdn.microsoft.com/en-us/library/windows/desktop/ee872121
|
// https://msdn.microsoft.com/library/windows/desktop/ee872121
|
||||||
const string appPaths = @"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths";
|
const string appPaths = @"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths";
|
||||||
var paths = new List<string>();
|
var paths = new List<string>();
|
||||||
using (var root = Registry.LocalMachine.OpenSubKey(appPaths))
|
using (var root = Registry.LocalMachine.OpenSubKey(appPaths))
|
||||||
@@ -954,7 +954,7 @@ namespace Microsoft.Plugin.Program.Programs
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://msdn.microsoft.com/en-us/library/windows/desktop/ee872121
|
// https://msdn.microsoft.com/library/windows/desktop/ee872121
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var redirectionPath = ReparsePoint.GetTarget(program.FullPath);
|
var redirectionPath = ReparsePoint.GetTarget(program.FullPath);
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ namespace Microsoft.PowerToys.Run.Plugin.System.Components
|
|||||||
{
|
{
|
||||||
executingEmptyRecycleBinTask = true;
|
executingEmptyRecycleBinTask = true;
|
||||||
|
|
||||||
// https://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shemptyrecyclebina/
|
// https://learn.microsoft.com/windows/win32/api/shellapi/nf-shellapi-shemptyrecyclebina/
|
||||||
// http://www.pinvoke.net/default.aspx/shell32/SHEmptyRecycleBin.html/
|
// http://www.pinvoke.net/default.aspx/shell32/SHEmptyRecycleBin.html/
|
||||||
// If the recycle bin is already empty, it will return -2147418113 (0x8000FFFF (E_UNEXPECTED))
|
// If the recycle bin is already empty, it will return -2147418113 (0x8000FFFF (E_UNEXPECTED))
|
||||||
// If the user canceled the deletion task it will return 2147943623 (0x800704C7 (E_CANCELLED - The operation was canceled by the user.))
|
// If the user canceled the deletion task it will return 2147943623 (0x800704C7 (E_CANCELLED - The operation was canceled by the user.))
|
||||||
@@ -128,7 +128,7 @@ namespace Microsoft.PowerToys.Run.Plugin.System.Components
|
|||||||
var errorDesc = Win32Helpers.MessageFromHResult((int)result);
|
var errorDesc = Win32Helpers.MessageFromHResult((int)result);
|
||||||
var name = "Plugin: " + Resources.Microsoft_plugin_sys_plugin_name;
|
var name = "Plugin: " + Resources.Microsoft_plugin_sys_plugin_name;
|
||||||
var message = $"{Resources.Microsoft_plugin_sys_RecycleBin_ErrorMsg} {errorDesc}";
|
var message = $"{Resources.Microsoft_plugin_sys_RecycleBin_ErrorMsg} {errorDesc}";
|
||||||
Log.Error(message + " - Please refer to https://msdn.microsoft.com/en-us/library/windows/desktop/aa378137 for more information.", typeof(Commands));
|
Log.Error(message + " - Please refer to https://msdn.microsoft.com/library/windows/desktop/aa378137 for more information.", typeof(Commands));
|
||||||
_ = MessageBox.Show(message, name, MessageBoxButton.OK, MessageBoxImage.Error);
|
_ = MessageBox.Show(message, name, MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Components
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the number week in the month (Used code from 'David Morton' from <see href="https://social.msdn.microsoft.com/Forums/vstudio/en-US/bf504bba-85cb-492d-a8f7-4ccabdf882cb/get-week-number-for-month"/>)
|
/// Returns the number week in the month (Used code from 'David Morton' from <see href="https://social.msdn.microsoft.com/Forums/vstudio/bf504bba-85cb-492d-a8f7-4ccabdf882cb/get-week-number-for-month"/>)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="date">date</param>
|
/// <param name="date">date</param>
|
||||||
/// <returns>Number of week in the month</returns>
|
/// <returns>Number of week in the month</returns>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ namespace PowerLauncher.Helper
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/ns-shobjidl_core-shdragimage
|
// https://learn.microsoft.com/windows/win32/api/shobjidl_core/ns-shobjidl_core-shdragimage
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
private struct ShDragImage
|
private struct ShDragImage
|
||||||
{
|
{
|
||||||
@@ -68,7 +68,7 @@ namespace PowerLauncher.Helper
|
|||||||
public int CrColorKey;
|
public int CrColorKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-idragsourcehelper
|
// https://learn.microsoft.com/windows/win32/api/shobjidl_core/nn-shobjidl_core-idragsourcehelper
|
||||||
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
||||||
[Guid("DE5BF786-477A-11D2-839D-00C04FD918D0")]
|
[Guid("DE5BF786-477A-11D2-839D-00C04FD918D0")]
|
||||||
private interface IDragSourceHelper
|
private interface IDragSourceHelper
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ namespace Wox.Infrastructure.Exception
|
|||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
// http://msdn.microsoft.com/en-us/library/hh925568%28v=vs.110%29.aspx
|
// http://msdn.microsoft.com/library/hh925568%28v=vs.110%29.aspx
|
||||||
private static List<string> GetFrameworkVersionFromRegistry()
|
private static List<string> GetFrameworkVersionFromRegistry()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ namespace Wox.Plugin.Common.Win32
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The operation was canceled by the user. (Error source 7 means Win32.)
|
/// The operation was canceled by the user. (Error source 7 means Win32.)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <SeeAlso href="https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--1000-1299-"/>
|
/// <SeeAlso href="https://learn.microsoft.com/windows/win32/debug/system-error-codes--1000-1299-"/>
|
||||||
/// <SeeAlso href="https://en.wikipedia.org/wiki/HRESULT"/>
|
/// <SeeAlso href="https://en.wikipedia.org/wiki/HRESULT"/>
|
||||||
E_CANCELLED = 0x800704C7,
|
E_CANCELLED = 0x800704C7,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void try_inject_modifier_key_up(std::vector<INPUT> &inputs, short modifier)
|
void try_inject_modifier_key_up(std::vector<INPUT>& inputs, short modifier)
|
||||||
{
|
{
|
||||||
// Most significant bit is set if key is down
|
// Most significant bit is set if key is down
|
||||||
if ((GetAsyncKeyState(static_cast<int>(modifier)) & 0x8000) != 0)
|
if ((GetAsyncKeyState(static_cast<int>(modifier)) & 0x8000) != 0)
|
||||||
@@ -204,9 +204,9 @@ private:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
wchar_t* pch_data= static_cast<wchar_t*>(GlobalLock(h_clipboard_data));
|
wchar_t* pch_data = static_cast<wchar_t*>(GlobalLock(h_clipboard_data));
|
||||||
|
|
||||||
if (NULL == pch_data )
|
if (NULL == pch_data)
|
||||||
{
|
{
|
||||||
DWORD errorCode = GetLastError();
|
DWORD errorCode = GetLastError();
|
||||||
auto errorMessage = get_last_error_message(errorCode);
|
auto errorMessage = get_last_error_message(errorCode);
|
||||||
@@ -228,7 +228,7 @@ private:
|
|||||||
UINT no_clipboard_history_or_roaming_format = 0;
|
UINT no_clipboard_history_or_roaming_format = 0;
|
||||||
|
|
||||||
// Get the format identifier for not adding the data to the clipboard history or roaming.
|
// Get the format identifier for not adding the data to the clipboard history or roaming.
|
||||||
// https://learn.microsoft.com/en-us/windows/win32/dataxchg/clipboard-formats#cloud-clipboard-and-clipboard-history-formats
|
// https://learn.microsoft.com/windows/win32/dataxchg/clipboard-formats#cloud-clipboard-and-clipboard-history-formats
|
||||||
if (0 == (no_clipboard_history_or_roaming_format = RegisterClipboardFormat(L"ExcludeClipboardContentFromMonitorProcessing")))
|
if (0 == (no_clipboard_history_or_roaming_format = RegisterClipboardFormat(L"ExcludeClipboardContentFromMonitorProcessing")))
|
||||||
{
|
{
|
||||||
DWORD errorCode = GetLastError();
|
DWORD errorCode = GetLastError();
|
||||||
@@ -295,7 +295,7 @@ private:
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
// Clear kb state and send Ctrl+V begin
|
// Clear kb state and send Ctrl+V begin
|
||||||
|
|
||||||
// we can assume that the last pressed key is...
|
// we can assume that the last pressed key is...
|
||||||
// (1) not a modifier key and
|
// (1) not a modifier key and
|
||||||
// (2) marked as handled (so it never gets a key down input event).
|
// (2) marked as handled (so it never gets a key down input event).
|
||||||
@@ -464,8 +464,6 @@ public:
|
|||||||
Trace::EnablePastePlain(false);
|
Trace::EnablePastePlain(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual bool on_hotkey(size_t /*hotkeyId*/) override
|
virtual bool on_hotkey(size_t /*hotkeyId*/) override
|
||||||
{
|
{
|
||||||
if (m_enabled)
|
if (m_enabled)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace Common.Utilities
|
|||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Dictionary of elements in lower case that are blocked from Svg for preview pane.
|
/// Dictionary of elements in lower case that are blocked from Svg for preview pane.
|
||||||
/// Reference for list of Svg Elements: https://developer.mozilla.org/en-US/docs/Web/SVG/Element.
|
/// Reference for list of Svg Elements: https://developer.mozilla.org/docs/Web/SVG/Element.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static Dictionary<string, bool> blockedElementsName = new Dictionary<string, bool>
|
private static Dictionary<string, bool> blockedElementsName = new Dictionary<string, bool>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
|||||||
using var getReleaseInfoClient = new HttpClient(proxyClientHandler);
|
using var getReleaseInfoClient = new HttpClient(proxyClientHandler);
|
||||||
|
|
||||||
// GitHub APIs require sending an user agent
|
// GitHub APIs require sending an user agent
|
||||||
// https://docs.github.com/en/rest/overview/resources-in-the-rest-api#user-agent-required
|
// https://docs.github.com/rest/overview/resources-in-the-rest-api#user-agent-required
|
||||||
getReleaseInfoClient.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", "PowerToys");
|
getReleaseInfoClient.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", "PowerToys");
|
||||||
releaseNotesJSON = await getReleaseInfoClient.GetStringAsync("https://api.github.com/repos/microsoft/PowerToys/releases");
|
releaseNotesJSON = await getReleaseInfoClient.GetStringAsync("https://api.github.com/repos/microsoft/PowerToys/releases");
|
||||||
IList<PowerToysReleaseInfo> releases = JsonSerializer.Deserialize<IList<PowerToysReleaseInfo>>(releaseNotesJSON);
|
IList<PowerToysReleaseInfo> releases = JsonSerializer.Deserialize<IList<PowerToysReleaseInfo>>(releaseNotesJSON);
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ If a remote test machine is being used, the IP of the test machine must be used
|
|||||||
|
|
||||||
### Extra tools and information
|
### Extra tools and information
|
||||||
|
|
||||||
For tests creation you will need a tool that enables you select any UI element and view the element's accessibility data. For this purpose you could use [AccessibilityInsights](https://accessibilityinsights.io/docs/en/windows/overview) or [Inspect](https://learn.microsoft.com/windows/win32/winauto/inspect-objects?redirectedfrom=MSDN).
|
For tests creation you will need a tool that enables you select any UI element and view the element's accessibility data. For this purpose you could use [AccessibilityInsights](https://accessibilityinsights.io/docs/windows/overview) or [Inspect](https://learn.microsoft.com/windows/win32/winauto/inspect-objects?redirectedfrom=MSDN).
|
||||||
|
|
||||||
* `inspect.exe` you can find installed at `C:\Program Files (x86)\Windows Kits\10\bin\<version>\<platform>\inspect.exe`
|
* `inspect.exe` you can find installed at `C:\Program Files (x86)\Windows Kits\10\bin\<version>\<platform>\inspect.exe`
|
||||||
* `AccessibilityInsights` you can download [here](https://aka.ms/accessibilityinsights-windows/download)
|
* `AccessibilityInsights` you can download [here](https://aka.ms/accessibilityinsights-windows/download)
|
||||||
|
|||||||
Reference in New Issue
Block a user