diff --git a/.github/workflows/spelling2.yml b/.github/workflows/spelling2.yml index 0cbb2ce08c..e38784d148 100644 --- a/.github/workflows/spelling2.yml +++ b/.github/workflows/spelling2.yml @@ -68,7 +68,7 @@ jobs: steps: - name: check-spelling id: spelling - uses: check-spelling/check-spelling@v0.0.21 + uses: check-spelling/check-spelling@v0.0.22 with: config: .github/actions/spell-check suppress_push_for_open_pull_request: 1 @@ -97,7 +97,7 @@ jobs: if: (success() || failure()) && needs.spelling.outputs.followup && github.event_name == 'push' steps: - name: comment - uses: check-spelling/check-spelling@v0.0.21 + uses: check-spelling/check-spelling@v0.0.22 with: config: .github/actions/spell-check checkout: true @@ -114,7 +114,7 @@ jobs: if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request') steps: - name: comment - uses: check-spelling/check-spelling@v0.0.21 + uses: check-spelling/check-spelling@v0.0.22 with: config: .github/actions/spell-check checkout: true diff --git a/Cpp.Build.props b/Cpp.Build.props index 2da75a8587..5eb275a507 100644 --- a/Cpp.Build.props +++ b/Cpp.Build.props @@ -42,6 +42,9 @@ arm64 false $(MSBuildThisFileFullPath)\..\deps\;$(MSBuildThisFileFullPath)\..\packages\;$(ExternalIncludePath) + + + Guard @@ -53,9 +56,12 @@ false true stdcpplatest - false + false /await %(AdditionalOptions) _UNICODE;UNICODE;%(PreprocessorDefinitions) + + Guard + ProgramDatabase Windows diff --git a/doc/devdocs/modules/launcher/plugins/system.md b/doc/devdocs/modules/launcher/plugins/system.md index dcf6c3d9f8..72f2cf38fc 100644 --- a/doc/devdocs/modules/launcher/plugins/system.md +++ b/doc/devdocs/modules/launcher/plugins/system.md @@ -15,7 +15,7 @@ Available commands: * Hibernate * Open / Empty Recycle Bin * UEFI Firmware Settings (Only available on systems, that boot in UEFI mode.) -* IP / MAC / Address => Show informations about network connections. +* IP / MAC / Address => Show information about network connections. ## Optional plugin settings @@ -46,7 +46,7 @@ Available commands: ### [`NetworkConnectionProperties.cs`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.System/Components/NetworkConnectionProperties.cs) - The [`NetworkConnectionProperties`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.System/Components/NetworkConnectionProperties.cs) class contains methods to get the properties of a network interface/connection. -- An instance of this class collects/provides all required informations about one connection/adapter. +- An instance of this class collects/provides all required information about one connection/adapter. ### [`SystemPluginContext.cs`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.System/Components/SystemPluginContext.cs) - An instance of the class [`SystemPluginContext`](/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.System/Components/SystemPluginContext.cs) contains/defines the context data of a system plugin result. We select the context menu based on the defined properties. diff --git a/src/common/interop/keyboard_layout.cpp b/src/common/interop/keyboard_layout.cpp index afac8fe141..7e0a13e848 100644 --- a/src/common/interop/keyboard_layout.cpp +++ b/src/common/interop/keyboard_layout.cpp @@ -238,6 +238,7 @@ void LayoutMap::LayoutMapImpl::UpdateLayout() keyboardLayoutMap[VK_NONCONVERT] = L"IME Non-Convert"; keyboardLayoutMap[VK_ACCEPT] = L"IME Kana"; keyboardLayoutMap[VK_MODECHANGE] = L"IME Mode Change"; + keyboardLayoutMap[VK_DECIMAL] = L". (Numpad)"; keyboardLayoutMap[CommonSharedConstants::VK_DISABLED] = L"Disable"; } diff --git a/src/modules/Hosts/Hosts/Strings/en-us/Resources.resw b/src/modules/Hosts/Hosts/Strings/en-us/Resources.resw index c40e36aaaf..75303506e6 100644 --- a/src/modules/Hosts/Hosts/Strings/en-us/Resources.resw +++ b/src/modules/Hosts/Hosts/Strings/en-us/Resources.resw @@ -239,7 +239,7 @@ "Hosts" refers to the system hosts file, do not loc - Seperate multiple hosts by space (e.g. server server.local). Maximum 9 hosts per entry. + Separate multiple hosts by space (e.g. server server.local). Maximum 9 hosts per entry. Do not localize "server" and "server.local" diff --git a/src/modules/ShortcutGuide/ShortcutGuide/shortcut_guide.cpp b/src/modules/ShortcutGuide/ShortcutGuide/shortcut_guide.cpp index f1c843d615..719f713e79 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/shortcut_guide.cpp +++ b/src/modules/ShortcutGuide/ShortcutGuide/shortcut_guide.cpp @@ -73,7 +73,7 @@ namespace result.hwnd = active_window; // In reality, Windows Snap works if even one of those styles is set // for a window, it is just limited. If there is no WS_MAXIMIZEBOX using - // WinKey + Up just won't maximize the window. Similary, without + // WinKey + Up just won't maximize the window. Similarly, without // WS_MINIMIZEBOX the window will not get minimized. A "Save As..." dialog // is a example of such window - it can be snapped to both sides and to // all screen corners, but will not get maximized nor minimized. diff --git a/src/modules/imageresizer/codeAnalysis/GlobalSuppressions.cs b/src/modules/imageresizer/codeAnalysis/GlobalSuppressions.cs index 421fd16329..0c41e79839 100644 --- a/src/modules/imageresizer/codeAnalysis/GlobalSuppressions.cs +++ b/src/modules/imageresizer/codeAnalysis/GlobalSuppressions.cs @@ -13,10 +13,10 @@ using System.Diagnostics.CodeAnalysis; [assembly: SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1101:PrefixLocalCallsWithThis", Justification = "We follow the C# Core Coding Style which avoids using `this` unless absolutely necessary.")] [assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1200:UsingDirectivesMustBePlacedWithinNamespace", Justification = "We follow the C# Core Coding Style which puts using statements outside the namespace.")] -[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1201:ElementsMustAppearInTheCorrectOrder", Justification = "It is not a priority and have hight impact in code changes.")] -[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1202:ElementsMustBeOrderedByAccess", Justification = "It is not a priority and have hight impact in code changes.")] -[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1203:ConstantsMustAppearBeforeFields", Justification = "It is not a priority and have hight impact in code changes.")] -[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1204:StaticElementsMustAppearBeforeInstanceElements", Justification = "It is not a priority and have hight impact in code changes.")] +[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1201:ElementsMustAppearInTheCorrectOrder", Justification = "It is not a priority and has a high impact in code changes.")] +[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1202:ElementsMustBeOrderedByAccess", Justification = "It is not a priority and has a high impact in code changes.")] +[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1203:ConstantsMustAppearBeforeFields", Justification = "It is not a priority and has a high impact in code changes.")] +[assembly: SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1204:StaticElementsMustAppearBeforeInstanceElements", Justification = "It is not a priority and has a high impact in code changes.")] [assembly: SuppressMessage("StyleCop.CSharp.NamingRules", "SA1309:FieldNamesMustNotBeginWithUnderscore", Justification = "We follow the C# Core Coding Style which uses underscores as prefixes rather than using `this.`.")] diff --git a/src/modules/imageresizer/ui/Extensions/BitmapMetadataExtension.cs b/src/modules/imageresizer/ui/Extensions/BitmapMetadataExtension.cs index 6ed051d4f3..f5f7449834 100644 --- a/src/modules/imageresizer/ui/Extensions/BitmapMetadataExtension.cs +++ b/src/modules/imageresizer/ui/Extensions/BitmapMetadataExtension.cs @@ -183,7 +183,7 @@ namespace ImageResizer.Extensions /// Prints all metadata to debug console /// /// - /// Intented for debug only!!! + /// Intended for debug only!!! /// public static void PrintsAllMetadataToDebugOutput(this BitmapMetadata metadata) { @@ -205,7 +205,7 @@ namespace ImageResizer.Extensions /// Iterates recursively through all metadata /// /// - /// Intented for debug only!!! + /// Intended for debug only!!! /// public static List<(string MetadataPath, object Value)> GetListOfMetadataForDebug(this BitmapMetadata metadata) { diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Components/ResultHelper.cs b/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Components/ResultHelper.cs index d9ee193e8a..b7b4484dfc 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Components/ResultHelper.cs +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Components/ResultHelper.cs @@ -43,7 +43,7 @@ namespace Microsoft.Plugin.WindowWalker.Components return true; }, - // For debugging you can set the second parameter to true to see more informations. + // For debugging you can set the second parameter to true to see more information. ToolTipData = GetToolTip(x.Result, false), }); } diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Properties/Resources.Designer.cs b/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Properties/Resources.Designer.cs index d7ff3a4c36..024368b158 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Properties/Resources.Designer.cs +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.WindowWalker/Properties/Resources.Designer.cs @@ -79,7 +79,7 @@ namespace Microsoft.Plugin.WindowWalker.Properties { } /// - /// Looks up a localized string similar to Folder windows doesn't run in separate processes. (Klick to open Explorer properties.). + /// Looks up a localized string similar to Folder windows doesn't run in separate processes. (Click to open Explorer properties.). /// public static string wox_plugin_windowwalker_ExplorerInfoSubTitle { get { diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Registry/Helper/ContextMenuHelper.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Registry/Helper/ContextMenuHelper.cs index ad959441e1..39858ecea1 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Registry/Helper/ContextMenuHelper.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.Registry/Helper/ContextMenuHelper.cs @@ -22,7 +22,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Registry.Helper /// Return a list with all context menu entries for the given /// Symbols taken from /// - /// The result for the context menu entires + /// The result for the context menu entries /// The name of the this assembly /// A list with context menu entries internal static List GetContextMenu(Result result, string assemblyName) diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.System/Components/NetworkConnectionProperties.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.System/Components/NetworkConnectionProperties.cs index d806efdb7a..aaba05682e 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.System/Components/NetworkConnectionProperties.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.System/Components/NetworkConnectionProperties.cs @@ -15,7 +15,7 @@ using Microsoft.PowerToys.Run.Plugin.System.Properties; namespace Microsoft.PowerToys.Run.Plugin.System.Components { /// - /// This class represents the informations for a network connection/interface + /// This class represents the information for a network connection/interface /// internal sealed class NetworkConnectionProperties { diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.System/Main.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.System/Main.cs index 93c6758766..0591f4d1a1 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.System/Main.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.System/Main.cs @@ -124,7 +124,7 @@ namespace Microsoft.PowerToys.Run.Plugin.System // { // results.Add(new Result() // { - // Title = "Getting network informations. Please wait ...", + // Title = "Getting network information. Please wait ...", // IcoPath = $"Images\\networkAdapter.{IconTheme}.png", // Score = StringMatcher.FuzzySearch("address", "ip address").Score, // }); diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Components/AvailableResultsList.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Components/AvailableResultsList.cs index e051d89568..2fc553f822 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Components/AvailableResultsList.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Components/AvailableResultsList.cs @@ -59,7 +59,7 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Components if (isKeywordSearch || !TimeDateSettings.Instance.OnlyDateTimeNowGlobal) { - // We use long instead of int for unix time stamp because int ist to small after 03:14:07 UTC 2038-01-19 + // We use long instead of int for unix time stamp because int is too small after 03:14:07 UTC 2038-01-19 long unixTimestamp = (long)dateTimeNowUtc.Subtract(new DateTime(1970, 1, 1)).TotalSeconds; int weekOfYear = calendar.GetWeekOfYear(dateTimeNow, DateTimeFormatInfo.CurrentInfo.CalendarWeekRule, DateTimeFormatInfo.CurrentInfo.FirstDayOfWeek); string era = DateTimeFormatInfo.CurrentInfo.GetEraName(calendar.GetEra(dateTimeNow)); diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Components/TimeAndDateHelper.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Components/TimeAndDateHelper.cs index 86e8ca2274..86294474c6 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Components/TimeAndDateHelper.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeDate/Components/TimeAndDateHelper.cs @@ -99,7 +99,7 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Components else if (Regex.IsMatch(input, @"^u\d+") && input.Length <= 12 && long.TryParse(input.TrimStart('u'), out long secondsInt)) { // unix time stamp - // we use long instead of int because int ist to small after 03:14:07 UTC 2038-01-19 + // we use long instead of int because int is too small after 03:14:07 UTC 2038-01-19 timestamp = new DateTime(1970, 1, 1).AddSeconds(secondsInt).ToLocalTime(); return true; } diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Helper/ContextMenuHelper.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Helper/ContextMenuHelper.cs index 735199c0de..e25d331424 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Helper/ContextMenuHelper.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Helper/ContextMenuHelper.cs @@ -21,7 +21,7 @@ namespace Microsoft.PowerToys.Run.Plugin.WindowsSettings.Helper /// Return a list with all context menu entries for the given /// Symbols taken from /// - /// The result for the context menu entires + /// The result for the context menu entries /// The name of the this assembly /// A list with context menu entries internal static List GetContextMenu(in Result result, in string assemblyName) diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Helper/ResultHelper.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Helper/ResultHelper.cs index 7240ee0fdc..53cf403f60 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Helper/ResultHelper.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.WindowsSettings/Helper/ResultHelper.cs @@ -67,7 +67,7 @@ namespace Microsoft.PowerToys.Run.Plugin.WindowsSettings.Helper /// /// Add a tool-tip to the given , based o the given . /// - /// The that contain informations for the tool-tip. + /// The that contains information for the tool-tip. /// The that need a tool-tip. private static void AddOptionalToolTip(WindowsSetting entry, Result result) { diff --git a/src/modules/launcher/PowerLauncher/Helper/EnvironmentHelper.cs b/src/modules/launcher/PowerLauncher/Helper/EnvironmentHelper.cs index cbb98683e8..fd9a8e2ef6 100644 --- a/src/modules/launcher/PowerLauncher/Helper/EnvironmentHelper.cs +++ b/src/modules/launcher/PowerLauncher/Helper/EnvironmentHelper.cs @@ -214,7 +214,7 @@ namespace PowerLauncher.Helper } /// - /// Returns the variables for the specified target. Errors that occurs will be catched and logged. + /// Returns the variables for the specified target. Errors that occurs will be caught and logged. /// /// The target variable source of the type /// A dictionary with the variable or an empty dictionary on errors. diff --git a/src/modules/launcher/PowerLauncher/Plugin/PluginConfig.cs b/src/modules/launcher/PowerLauncher/Plugin/PluginConfig.cs index 5c160db40d..fa445f135b 100644 --- a/src/modules/launcher/PowerLauncher/Plugin/PluginConfig.cs +++ b/src/modules/launcher/PowerLauncher/Plugin/PluginConfig.cs @@ -39,7 +39,7 @@ namespace PowerLauncher.Plugin private static void ParsePluginConfigs(IEnumerable directories) { - // todo use linq when diable plugin is implemented since parallel.foreach + list is not thread saft + // todo use linq when disable plugin is implemented since parallel.foreach + list is not thread saft foreach (var directory in directories) { if (File.Exists(Path.Combine(directory, "NeedDelete.txt"))) diff --git a/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs b/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs index b03269698a..098e16a9ba 100644 --- a/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs +++ b/src/modules/launcher/PowerLauncher/ViewModel/MainViewModel.cs @@ -1065,7 +1065,6 @@ namespace PowerLauncher.ViewModel { if (contextMenuItems.AcceleratorKey == acceleratorKey && contextMenuItems.AcceleratorModifiers == acceleratorModifiers) { - MainWindowVisibility = Visibility.Collapsed; contextMenuItems.Command.Execute(null); } } diff --git a/src/modules/launcher/Wox.Plugin/Common/VirtualDesktop/VirtualDesktopHelper.cs b/src/modules/launcher/Wox.Plugin/Common/VirtualDesktop/VirtualDesktopHelper.cs index 602bf05efe..e7039b1c96 100644 --- a/src/modules/launcher/Wox.Plugin/Common/VirtualDesktop/VirtualDesktopHelper.cs +++ b/src/modules/launcher/Wox.Plugin/Common/VirtualDesktop/VirtualDesktopHelper.cs @@ -16,7 +16,7 @@ namespace Wox.Plugin.Common.VirtualDesktop.Helper { /// /// Helper class to work with Virtual Desktops. - /// This helper uses only public available and documented COM-Interfaces or informations from registry. + /// This helper uses only public available and documented COM-Interfaces or information from registry. /// /// /// To use this helper you have to create an instance of it and access the method via the helper instance. diff --git a/src/modules/launcher/Wox.Plugin/Common/Win32/NativeMethods.cs b/src/modules/launcher/Wox.Plugin/Common/Win32/NativeMethods.cs index 8f02de16c5..140a6c37b8 100644 --- a/src/modules/launcher/Wox.Plugin/Common/Win32/NativeMethods.cs +++ b/src/modules/launcher/Wox.Plugin/Common/Win32/NativeMethods.cs @@ -1077,7 +1077,7 @@ namespace Wox.Plugin.Common.Win32 /// /// The window itself contains child windows that should take part in dialog box, navigation. If this /// style is specified, the dialog manager recurses into children of this window when performing - /// navigation operations such as handling tha TAB key, an arrow key, or a keyboard mnemonic. + /// navigation operations such as handling the TAB key, an arrow key, or a keyboard mnemonic. /// WS_EX_CONTROLPARENT = 0x10000, diff --git a/src/modules/peek/Peek.Common/Helpers/PropertyStoreHelper.cs b/src/modules/peek/Peek.Common/Helpers/PropertyStoreHelper.cs index 6c5e752416..a1c5b6678e 100644 --- a/src/modules/peek/Peek.Common/Helpers/PropertyStoreHelper.cs +++ b/src/modules/peek/Peek.Common/Helpers/PropertyStoreHelper.cs @@ -65,7 +65,7 @@ namespace Peek.Common.Helpers /// /// The file/folder path /// The property store flags - /// an IPropertyStroe interface + /// an IPropertyStore interface private static DisposablePropertyStore GetPropertyStoreFromPath(string path, GETPROPERTYSTOREFLAGS flags = GETPROPERTYSTOREFLAGS.GPS_EXTRINSICPROPERTIES | GETPROPERTYSTOREFLAGS.GPS_BESTEFFORT) { IShellItem2? shellItem2 = null; diff --git a/src/modules/poweraccent/PowerAccent.Core/Languages.cs b/src/modules/poweraccent/PowerAccent.Core/Languages.cs index 6eece7b6f2..0695b27f06 100644 --- a/src/modules/poweraccent/PowerAccent.Core/Languages.cs +++ b/src/modules/poweraccent/PowerAccent.Core/Languages.cs @@ -260,7 +260,9 @@ namespace PowerAccent.Core { LetterKey.VK_A => new[] { "á" }, LetterKey.VK_E => new[] { "é", "€" }, + LetterKey.VK_H => new[] { "ḥ" }, LetterKey.VK_I => new[] { "í" }, + LetterKey.VK_L => new[] { "ḷ" }, LetterKey.VK_N => new[] { "ñ" }, LetterKey.VK_O => new[] { "ó" }, LetterKey.VK_U => new[] { "ú", "ü" }, diff --git a/src/modules/previewpane/MonacoPreviewHandler/MonacoPreviewHandlerControl.cs b/src/modules/previewpane/MonacoPreviewHandler/MonacoPreviewHandlerControl.cs index ca16bcc835..7480acd1dc 100644 --- a/src/modules/previewpane/MonacoPreviewHandler/MonacoPreviewHandlerControl.cs +++ b/src/modules/previewpane/MonacoPreviewHandler/MonacoPreviewHandlerControl.cs @@ -165,7 +165,7 @@ namespace Microsoft.PowerToys.PreviewHandler.Monaco } catch (NullReferenceException e) { - Logger.LogError("NullReferenceException catched. Skipping exception.", e); + Logger.LogError("NullReferenceException caught. Skipping exception.", e); } } catch (WebView2RuntimeNotFoundException e) diff --git a/src/settings-ui/Settings.UI.Library/ColorPickerProperties.cs b/src/settings-ui/Settings.UI.Library/ColorPickerProperties.cs index 09dde9318c..6f974faba7 100644 --- a/src/settings-ui/Settings.UI.Library/ColorPickerProperties.cs +++ b/src/settings-ui/Settings.UI.Library/ColorPickerProperties.cs @@ -51,7 +51,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library [JsonPropertyName("activationaction")] public ColorPickerActivationAction ActivationAction { get; set; } - // Property ColorHistory is not used, the color history is saved separatedly in the colorHistory.json file + // Property ColorHistory is not used, the color history is saved separately in the colorHistory.json file [JsonPropertyName("colorhistory")] public List ColorHistory { get; set; } diff --git a/src/settings-ui/Settings.UI.Library/Enumerations/ColorRepresentationType.cs b/src/settings-ui/Settings.UI.Library/Enumerations/ColorRepresentationType.cs index 5bebe799a8..09ef003e88 100644 --- a/src/settings-ui/Settings.UI.Library/Enumerations/ColorRepresentationType.cs +++ b/src/settings-ui/Settings.UI.Library/Enumerations/ColorRepresentationType.cs @@ -4,7 +4,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.Enumerations { - // NOTE: don't change the order (numbers) of the enumeration entires + // NOTE: don't change the order (numbers) of the enumeration entries /// /// The type of the color representation diff --git a/src/settings-ui/Settings.UI.Library/SettingsBackupAndRestoreUtils.cs b/src/settings-ui/Settings.UI.Library/SettingsBackupAndRestoreUtils.cs index 759e86d751..8315c52bdb 100644 --- a/src/settings-ui/Settings.UI.Library/SettingsBackupAndRestoreUtils.cs +++ b/src/settings-ui/Settings.UI.Library/SettingsBackupAndRestoreUtils.cs @@ -292,9 +292,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library } // get data needed for process - var backupRetoreSettings = JsonNode.Parse(GetBackupRestoreSettingsJson()); - var currentSettingsFiles = GetSettingsFiles(backupRetoreSettings, appBasePath).ToList().ToDictionary(x => x.Substring(appBasePath.Length)); - var backupSettingsFiles = GetSettingsFiles(backupRetoreSettings, latestSettingsFolder).ToList().ToDictionary(x => x.Substring(latestSettingsFolder.Length)); + var backupRestoreSettings = JsonNode.Parse(GetBackupRestoreSettingsJson()); + var currentSettingsFiles = GetSettingsFiles(backupRestoreSettings, appBasePath).ToList().ToDictionary(x => x.Substring(appBasePath.Length)); + var backupSettingsFiles = GetSettingsFiles(backupRestoreSettings, latestSettingsFolder).ToList().ToDictionary(x => x.Substring(latestSettingsFolder.Length)); if (backupSettingsFiles.Count == 0) { @@ -306,13 +306,13 @@ namespace Microsoft.PowerToys.Settings.UI.Library foreach (var currentFile in backupSettingsFiles) { var relativePath = currentFile.Value.Substring(latestSettingsFolder.Length + 1); - var retoreFullPath = Path.Combine(appBasePath, relativePath); - var settingsToRestoreJson = GetExportVersion(backupRetoreSettings, currentFile.Key, currentFile.Value); + var restoreFullPath = Path.Combine(appBasePath, relativePath); + var settingsToRestoreJson = GetExportVersion(backupRestoreSettings, currentFile.Key, currentFile.Value); if (currentSettingsFiles.TryGetValue(currentFile.Key, out string value)) { // we have a setting file to restore to - var currentSettingsFileJson = GetExportVersion(backupRetoreSettings, currentFile.Key, value); + var currentSettingsFileJson = GetExportVersion(backupRestoreSettings, currentFile.Key, value); if (JsonNormalizer.Normalize(settingsToRestoreJson) != JsonNormalizer.Normalize(currentSettingsFileJson)) { @@ -339,7 +339,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library if (anyFilesUpdated) { // something was changed do we need to return true to indicate a restart is needed. - var restartAfterRestore = (bool?)backupRetoreSettings!["RestartAfterRestore"]; + var restartAfterRestore = (bool?)backupRestoreSettings!["RestartAfterRestore"]; if (!restartAfterRestore.HasValue || restartAfterRestore.Value) { return (true, $"RESTART APP", "Success"); @@ -639,11 +639,11 @@ namespace Microsoft.PowerToys.Settings.UI.Library } // get data needed for process - var backupRetoreSettings = JsonNode.Parse(GetBackupRestoreSettingsJson()); - var currentSettingsFiles = GetSettingsFiles(backupRetoreSettings, appBasePath).ToList().ToDictionary(x => x.Substring(appBasePath.Length)); + var backupRestoreSettings = JsonNode.Parse(GetBackupRestoreSettingsJson()); + var currentSettingsFiles = GetSettingsFiles(backupRestoreSettings, appBasePath).ToList().ToDictionary(x => x.Substring(appBasePath.Length)); var fullBackupDir = Path.Combine(Path.GetTempPath(), $"settings_{DateTime.UtcNow.ToFileTimeUtc().ToString(CultureInfo.InvariantCulture)}"); var latestSettingsFolder = GetLatestSettingsFolder(); - var lastBackupSettingsFiles = GetSettingsFiles(backupRetoreSettings, latestSettingsFolder).ToList().ToDictionary(x => x.Substring(latestSettingsFolder.Length)); + var lastBackupSettingsFiles = GetSettingsFiles(backupRestoreSettings, latestSettingsFolder).ToList().ToDictionary(x => x.Substring(latestSettingsFolder.Length)); lastBackupExists = lastBackupSettingsFiles.Count > 0; @@ -661,13 +661,13 @@ namespace Microsoft.PowerToys.Settings.UI.Library tempFile = currentFile; // need to check and back this up; - var currentSettingsFileToBackup = GetExportVersion(backupRetoreSettings, currentFile.Key, currentFile.Value); + var currentSettingsFileToBackup = GetExportVersion(backupRestoreSettings, currentFile.Key, currentFile.Value); var doBackup = false; if (lastBackupSettingsFiles.TryGetValue(currentFile.Key, out string value)) { // there is a previous backup for this, get an export version of it. - var lastSettingsFileDoc = GetExportVersion(backupRetoreSettings, currentFile.Key, value); + var lastSettingsFileDoc = GetExportVersion(backupRestoreSettings, currentFile.Key, value); // check to see if the new export version would be same as last export version. if (JsonNormalizer.Normalize(currentSettingsFileToBackup) != JsonNormalizer.Normalize(lastSettingsFileDoc)) @@ -804,9 +804,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library /// Method GetExportVersion gets the version of the settings file that we want to backup. /// It will be formatted and all problematic settings removed from it. /// - public static string GetExportVersion(JsonNode backupRetoreSettings, string settingFileKey, string settingsFileName) + public static string GetExportVersion(JsonNode backupRestoreSettings, string settingFileKey, string settingsFileName) { - var ignoredSettings = GetIgnoredSettings(backupRetoreSettings, settingFileKey); + var ignoredSettings = GetIgnoredSettings(backupRestoreSettings, settingFileKey); var settingsFile = JsonDocument.Parse(File.ReadAllText(settingsFileName)); var outputBuffer = new ArrayBufferWriter(); @@ -828,7 +828,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library if (settingFileKey.Equals("\\PowerToys Run\\settings.json", StringComparison.OrdinalIgnoreCase)) { // PowerToys Run hack fix-up - var ptRunIgnoredSettings = GetPTRunIgnoredSettings(backupRetoreSettings); + var ptRunIgnoredSettings = GetPTRunIgnoredSettings(backupRestoreSettings); var ptrSettings = JsonNode.Parse(Encoding.UTF8.GetString(outputBuffer.WrittenSpan)); foreach (JsonObject pluginToChange in ptRunIgnoredSettings) @@ -856,16 +856,16 @@ namespace Microsoft.PowerToys.Settings.UI.Library /// /// Method GetPTRunIgnoredSettings gets the 'Run-Plugin-level' settings we should ignore because they are problematic to backup/restore. /// - private static JsonArray GetPTRunIgnoredSettings(JsonNode backupRetoreSettings) + private static JsonArray GetPTRunIgnoredSettings(JsonNode backupRestoreSettings) { - if (backupRetoreSettings == null) + if (backupRestoreSettings == null) { - throw new ArgumentNullException(nameof(backupRetoreSettings)); + throw new ArgumentNullException(nameof(backupRestoreSettings)); } - if (backupRetoreSettings["IgnoredPTRunSettings"] != null) + if (backupRestoreSettings["IgnoredPTRunSettings"] != null) { - return (JsonArray)backupRetoreSettings["IgnoredPTRunSettings"]; + return (JsonArray)backupRestoreSettings["IgnoredPTRunSettings"]; } return new JsonArray(); @@ -874,11 +874,11 @@ namespace Microsoft.PowerToys.Settings.UI.Library /// /// Method GetIgnoredSettings gets the 'top-level' settings we should ignore because they are problematic to backup/restore. /// - private static string[] GetIgnoredSettings(JsonNode backupRetoreSettings, string settingFileKey) + private static string[] GetIgnoredSettings(JsonNode backupRestoreSettings, string settingFileKey) { - if (backupRetoreSettings == null) + if (backupRestoreSettings == null) { - throw new ArgumentNullException(nameof(backupRetoreSettings)); + throw new ArgumentNullException(nameof(backupRestoreSettings)); } if (settingFileKey.StartsWith("\\", StringComparison.OrdinalIgnoreCase)) @@ -886,11 +886,11 @@ namespace Microsoft.PowerToys.Settings.UI.Library settingFileKey = settingFileKey.Substring(1); } - if (backupRetoreSettings["IgnoredSettings"] != null) + if (backupRestoreSettings["IgnoredSettings"] != null) { - if (backupRetoreSettings["IgnoredSettings"][settingFileKey] != null) + if (backupRestoreSettings["IgnoredSettings"][settingFileKey] != null) { - var settingsArray = (JsonArray)backupRetoreSettings["IgnoredSettings"][settingFileKey]; + var settingsArray = (JsonArray)backupRestoreSettings["IgnoredSettings"][settingFileKey]; Console.WriteLine("settingsArray " + settingsArray.GetType().FullName); diff --git a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw index e72af7e323..700fbab13c 100644 --- a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw @@ -3677,7 +3677,7 @@ Activate by holding the key for the character you want to add an accent to, then Security key - Chose the encoding of the hosts file + Choose the encoding of the hosts file "Hosts" refers to the system hosts file, do not loc diff --git a/src/settings-ui/Settings.UI/ViewModels/GeneralViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/GeneralViewModel.cs index f16584c6c8..afee54379d 100644 --- a/src/settings-ui/Settings.UI/ViewModels/GeneralViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/GeneralViewModel.cs @@ -703,7 +703,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels } /// - /// Method SelectSettingBackupDir opens folder browser to select a backup and retore location. + /// Method SelectSettingBackupDir opens folder browser to select a backup and restore location. /// private async void SelectSettingBackupDir() { diff --git a/src/settings-ui/Settings.UI/ViewModels/PluginAdditionalOptionViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/PluginAdditionalOptionViewModel.cs index c54d217906..4463b1287b 100644 --- a/src/settings-ui/Settings.UI/ViewModels/PluginAdditionalOptionViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/PluginAdditionalOptionViewModel.cs @@ -67,7 +67,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels // TextBox setting public bool ShowTextBox => _additionalOption.PluginOptionType == PluginAdditionalOption.AdditionalOptionType.Textbox; - public int TextBoxMaxLength => (_additionalOption.TextBoxMaxLength == null) ? 0 : _additionalOption.TextBoxMaxLength.Value; // 0 ist the default and means no limit. + public int TextBoxMaxLength => (_additionalOption.TextBoxMaxLength == null) ? 0 : _additionalOption.TextBoxMaxLength.Value; // 0 is the default and means no limit. public string TextValue {