Skip to content

Commit

Permalink
Remove localizations (#24376)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
Jay-o-Way and stefansjfw committed Mar 20, 2023
1 parent 5baa0b1 commit 08fe13a
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 25 deletions.
4 changes: 2 additions & 2 deletions src/modules/FileLocksmith/FileLocksmithLibInterop/interop.cpp
Expand Up @@ -151,7 +151,7 @@ namespace FileLocksmith::Interop

if (!stream)
{
return false;
return false;
}

stream.close();
Expand All @@ -178,7 +178,7 @@ namespace FileLocksmith::Interop
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()
{
HANDLE hToken;
Expand Down
Expand Up @@ -589,10 +589,10 @@ private bool SetHighContrastIcon(string path, string colorscheme)

internal void LogoPathFromUri(string uri, Theme theme)
{
// all https://msdn.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 8.1 https://msdn.microsoft.com/en-us/library/windows/apps/hh965372.aspx#target_size
// windows 8 https://msdn.microsoft.com/en-us/library/windows/apps/br211475.aspx
// all https://learn.microsoft.com/windows/uwp/controls-and-patterns/tiles-and-notifications-app-assets
// windows 10 https://msdn.microsoft.com/library/windows/apps/dn934817.aspx
// windows 8.1 https://msdn.microsoft.com/library/windows/apps/hh965372.aspx#target_size
// windows 8 https://msdn.microsoft.com/library/windows/apps/br211475.aspx
string path;
bool isLogoUriSet;

Expand Down
Expand Up @@ -821,7 +821,7 @@ private static IEnumerable<string> DesktopProgramPaths(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";
var paths = new List<string>();
using (var root = Registry.LocalMachine.OpenSubKey(appPaths))
Expand Down Expand Up @@ -954,7 +954,7 @@ private static bool TryGetIcoPathForRunCommandProgram(Win32Program program, out
return false;
}

// https://msdn.microsoft.com/en-us/library/windows/desktop/ee872121
// https://msdn.microsoft.com/library/windows/desktop/ee872121
try
{
var redirectionPath = ReparsePoint.GetTarget(program.FullPath);
Expand Down
Expand Up @@ -113,7 +113,7 @@ private static void EmptyRecycleBinTask(bool settingEmptyRBSuccesMsg)
{
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/
// 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.))
Expand All @@ -128,7 +128,7 @@ private static void EmptyRecycleBinTask(bool settingEmptyRBSuccesMsg)
var errorDesc = Win32Helpers.MessageFromHResult((int)result);
var name = "Plugin: " + Resources.Microsoft_plugin_sys_plugin_name;
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);
}

Expand Down
Expand Up @@ -53,7 +53,7 @@ internal static string GetStringFormat(FormatStringType targetFormat, bool timeL
}

/// <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>
/// <param name="date">date</param>
/// <returns>Number of week in the month</returns>
Expand Down
4 changes: 2 additions & 2 deletions src/modules/launcher/PowerLauncher/Helper/DragDataObject.cs
Expand Up @@ -58,7 +58,7 @@ private class DragDropHelper
{
}

// 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)]
private struct ShDragImage
{
Expand All @@ -68,7 +68,7 @@ private struct ShDragImage
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)]
[Guid("DE5BF786-477A-11D2-839D-00C04FD918D0")]
private interface IDragSourceHelper
Expand Down
Expand Up @@ -116,7 +116,7 @@ private static string CreateExceptionReport(System.Exception ex)
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()
{
try
Expand Down
Expand Up @@ -223,7 +223,7 @@ public enum HRESULT : uint
/// <summary>
/// The operation was canceled by the user. (Error source 7 means Win32.)
/// </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"/>
E_CANCELLED = 0x800704C7,
}
Expand Down
12 changes: 5 additions & 7 deletions src/modules/pasteplain/PastePlainModuleInterface/dllmain.cpp
Expand Up @@ -152,7 +152,7 @@ class PastePlain : public PowertoyModuleIface
}
}

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
if ((GetAsyncKeyState(static_cast<int>(modifier)) & 0x8000) != 0)
Expand Down Expand Up @@ -204,9 +204,9 @@ class PastePlain : public PowertoyModuleIface
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();
auto errorMessage = get_last_error_message(errorCode);
Expand All @@ -228,7 +228,7 @@ class PastePlain : public PowertoyModuleIface
UINT no_clipboard_history_or_roaming_format = 0;

// 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")))
{
DWORD errorCode = GetLastError();
Expand Down Expand Up @@ -295,7 +295,7 @@ class PastePlain : public PowertoyModuleIface
}
{
// Clear kb state and send Ctrl+V begin

// we can assume that the last pressed key is...
// (1) not a modifier key and
// (2) marked as handled (so it never gets a key down input event).
Expand Down Expand Up @@ -464,8 +464,6 @@ class PastePlain : public PowertoyModuleIface
Trace::EnablePastePlain(false);
}



virtual bool on_hotkey(size_t /*hotkeyId*/) override
{
if (m_enabled)
Expand Down
Expand Up @@ -17,7 +17,7 @@ public static class SvgPreviewHandlerHelper
{
/// <summary>
/// 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>
private static Dictionary<string, bool> blockedElementsName = new Dictionary<string, bool>
{
Expand Down
Expand Up @@ -73,7 +73,7 @@ private static async Task<string> GetReleaseNotesMarkdown()
using var getReleaseInfoClient = new HttpClient(proxyClientHandler);

// 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");
releaseNotesJSON = await getReleaseInfoClient.GetStringAsync("https://api.github.com/repos/microsoft/PowerToys/releases");
IList<PowerToysReleaseInfo> releases = JsonSerializer.Deserialize<IList<PowerToysReleaseInfo>>(releaseNotesJSON);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/win-app-driver/README.md
Expand Up @@ -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

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`
* `AccessibilityInsights` you can download [here](https://aka.ms/accessibilityinsights-windows/download)
Expand Down

0 comments on commit 08fe13a

Please sign in to comment.