From 540a07fea08022059b31841339ed57f038bd1419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Tue, 16 Jun 2026 04:56:49 +0000 Subject: [PATCH] Fix outstanding typos --- src/Translumo.OCR/Annotations.cs | 4 ++-- src/Translumo.OCR/WindowsOCR/WindowsOCRHelper.cs | 8 ++++---- src/Translumo.TTS/WindowsTTSHelper.cs | 4 ++-- src/Translumo.Translation/Deepl/DeepLRequest.cs | 4 ++-- src/Translumo.Utils/Annotations.cs | 4 ++-- src/Translumo.Utils/BindableBase.cs | 4 ++-- src/Translumo/Dialog/Stages/StagesFactory.cs | 4 ++-- src/Translumo/HotKeys/HotKey.cs | 3 +-- src/Translumo/HotKeys/HotKeysConfiguration.cs | 6 +++--- src/Translumo/Services/ScreenDXCapturer.cs | 8 ++++---- 10 files changed, 24 insertions(+), 25 deletions(-) diff --git a/src/Translumo.OCR/Annotations.cs b/src/Translumo.OCR/Annotations.cs index 5c61a893..4c1b8d47 100644 --- a/src/Translumo.OCR/Annotations.cs +++ b/src/Translumo.OCR/Annotations.cs @@ -252,7 +252,7 @@ public sealed class NonNegativeValueAttribute : Attribute { } /// /// Indicates that the function argument should be a string literal and match /// one of the parameters of the caller function. This annotation is used for paramerers - /// like 'string paramName' parameter of the constuctor. + /// like 'string paramName' parameter of the constructor. /// /// /// void Foo(string param) { @@ -1701,4 +1701,4 @@ public sealed class XamlOneWayBindingModeByDefaultAttribute : Attribute { } public sealed class XamlTwoWayBindingModeByDefaultAttribute : Attribute { } #endregion -} \ No newline at end of file +} diff --git a/src/Translumo.OCR/WindowsOCR/WindowsOCRHelper.cs b/src/Translumo.OCR/WindowsOCR/WindowsOCRHelper.cs index 3a28e1b4..6cd25056 100644 --- a/src/Translumo.OCR/WindowsOCR/WindowsOCRHelper.cs +++ b/src/Translumo.OCR/WindowsOCR/WindowsOCRHelper.cs @@ -10,7 +10,7 @@ namespace Translumo.OCR.WindowsOCR { public static class WindowsOCRHelper { - public static async Task InstallOcrLanguageCapatibility(string languageCode) + public static async Task InstallOcrLanguageCapability(string languageCode) { var process = CreateOcrCapabilityInstallProcess(languageCode); if (process == null) @@ -73,10 +73,10 @@ private static Process CreateOcrCapabilityInstallProcess(string nameTag) return process; // Return the process after completion } - private static Language GetInstalledWindowsOCRLanguageByTag(string languageTag, bool exactMathing = false) + private static Language GetInstalledWindowsOCRLanguageByTag(string languageTag, bool exactMatching = false) { var installedLanguages = OcrEngine.AvailableRecognizerLanguages; - if (exactMathing) + if (exactMatching) { return installedLanguages.FirstOrDefault(l => l.LanguageTag == languageTag); } @@ -144,4 +144,4 @@ public string GetNameWithoutVersion() return $"Language.OCR~~~{NameTag}"; } } -} \ No newline at end of file +} diff --git a/src/Translumo.TTS/WindowsTTSHelper.cs b/src/Translumo.TTS/WindowsTTSHelper.cs index 04adaf39..9e23ad37 100644 --- a/src/Translumo.TTS/WindowsTTSHelper.cs +++ b/src/Translumo.TTS/WindowsTTSHelper.cs @@ -6,7 +6,7 @@ namespace Translumo.TTS { public static class WindowsTTSHelper { - public static async Task InstallTTSLanguageCapatibility(string languageCode) + public static async Task InstallTTSLanguageCapability(string languageCode) { var process = CreateTTSCapabilityInstallProcess(languageCode); if (process == null) @@ -133,4 +133,4 @@ public static List GetAvailableVoicesForLanguage(string languageTag) return result; } } -} \ No newline at end of file +} diff --git a/src/Translumo.Translation/Deepl/DeepLRequest.cs b/src/Translumo.Translation/Deepl/DeepLRequest.cs index 19d70eeb..46b05eae 100644 --- a/src/Translumo.Translation/Deepl/DeepLRequest.cs +++ b/src/Translumo.Translation/Deepl/DeepLRequest.cs @@ -20,7 +20,7 @@ public class DeepLTranslatorRequest [JsonPropertyName("id")] public long Id { get; set; } - public DeepLTranslatorRequest(long id, string sentence, string sourceLanguage, string tragetLanguage, string regionalVariantCode) + public DeepLTranslatorRequest(long id, string sentence, string sourceLanguage, string targetLanguage, string regionalVariantCode) { this.Id = id; this.Jsonrpc = "2.0"; @@ -36,7 +36,7 @@ public DeepLTranslatorRequest(long id, string sentence, string sourceLanguage, s jobs.Add(new Job(regexResult[i].Value, prevValue, nextValue)); } - Params = new Parameters(jobs, new Lang(sourceLanguage, tragetLanguage), regionalVariantCode); + Params = new Parameters(jobs, new Lang(sourceLanguage, targetLanguage), regionalVariantCode); } public sealed class Parameters diff --git a/src/Translumo.Utils/Annotations.cs b/src/Translumo.Utils/Annotations.cs index 95aa751b..c4c690e5 100644 --- a/src/Translumo.Utils/Annotations.cs +++ b/src/Translumo.Utils/Annotations.cs @@ -252,7 +252,7 @@ public sealed class NonNegativeValueAttribute : Attribute { } /// /// Indicates that the function argument should be a string literal and match /// one of the parameters of the caller function. This annotation is used for paramerers - /// like 'string paramName' parameter of the constuctor. + /// like 'string paramName' parameter of the constructor. /// /// /// void Foo(string param) { @@ -1701,4 +1701,4 @@ public sealed class XamlOneWayBindingModeByDefaultAttribute : Attribute { } public sealed class XamlTwoWayBindingModeByDefaultAttribute : Attribute { } #endregion -} \ No newline at end of file +} diff --git a/src/Translumo.Utils/BindableBase.cs b/src/Translumo.Utils/BindableBase.cs index e45a12c0..3cea678a 100644 --- a/src/Translumo.Utils/BindableBase.cs +++ b/src/Translumo.Utils/BindableBase.cs @@ -14,7 +14,7 @@ protected virtual void SetProperty(ref T member, T value, [CallerMemberName] return; } - var previuosValue = member; + var previousValue = member; member = value; try { @@ -22,7 +22,7 @@ protected virtual void SetProperty(ref T member, T value, [CallerMemberName] } catch { - member = previuosValue; + member = previousValue; OnPropertyChanged(propertyName); throw; } diff --git a/src/Translumo/Dialog/Stages/StagesFactory.cs b/src/Translumo/Dialog/Stages/StagesFactory.cs index 9a33b29b..70a61b3c 100644 --- a/src/Translumo/Dialog/Stages/StagesFactory.cs +++ b/src/Translumo/Dialog/Stages/StagesFactory.cs @@ -35,7 +35,7 @@ public static InteractionStage CreateWindowsOcrCheckingStages( .AddNextStage( new ConditionalInteractionStage( dialogService, - async () => await OCR.WindowsOCR.WindowsOCRHelper.InstallOcrLanguageCapatibility(languageCode), + async () => await OCR.WindowsOCR.WindowsOCRHelper.InstallOcrLanguageCapability(languageCode), LocalizationManager.GetValue("Str.Stages.InstallationLangPack")) .AddNextStage( new DialogInteractionStage( @@ -72,7 +72,7 @@ public static InteractionStage CreateWindowsTtsCheckingStages( .AddNextStage( new ConditionalInteractionStage( dialogService, - async () => await TTS.WindowsTTSHelper.InstallTTSLanguageCapatibility(languageCode), + async () => await TTS.WindowsTTSHelper.InstallTTSLanguageCapability(languageCode), LocalizationManager.GetValue("Str.Stages.InstallationLangPack")) .AddNextStage( new DialogInteractionStage( diff --git a/src/Translumo/HotKeys/HotKey.cs b/src/Translumo/HotKeys/HotKey.cs index 90c80483..ff10f796 100644 --- a/src/Translumo/HotKeys/HotKey.cs +++ b/src/Translumo/HotKeys/HotKey.cs @@ -130,7 +130,7 @@ public void Dispose() { Dispose(true); // This object will be cleaned up by the Dispose method. - // Therefore, you should call GC.SupressFinalize to + // Therefore, you should call GC.SuppressFinalize to // take this object off the finalization queue // and prevent finalization code for this object // from executing a second time. @@ -176,4 +176,3 @@ public enum KeyModifier Win = 0x0008 } } - diff --git a/src/Translumo/HotKeys/HotKeysConfiguration.cs b/src/Translumo/HotKeys/HotKeysConfiguration.cs index 89b6e7dc..6072ae08 100644 --- a/src/Translumo/HotKeys/HotKeysConfiguration.cs +++ b/src/Translumo/HotKeys/HotKeysConfiguration.cs @@ -128,10 +128,10 @@ public GamepadHotKeyInfo SettingVisibilityGamepadKey public GamepadHotKeyInfo ShowSelectionAreaGamepadKey { - get => _showSelctionAreaGamepadKey; + get => _showSelectionAreaGamepadKey; set { - SetProperty(ref _showSelctionAreaGamepadKey, value); + SetProperty(ref _showSelectionAreaGamepadKey, value); } } @@ -165,7 +165,7 @@ public GamepadHotKeyInfo WindowStyleChangeGamepadKey private GamepadHotKeyInfo _selectAreaGamepadKey; private GamepadHotKeyInfo _translationStateGamepadKey; private GamepadHotKeyInfo _settingVisibilityGamepadKey; - private GamepadHotKeyInfo _showSelctionAreaGamepadKey; + private GamepadHotKeyInfo _showSelectionAreaGamepadKey; private GamepadHotKeyInfo _onceTranslateGamepadKey; private GamepadHotKeyInfo _windowStyleChangeGamepadKey = new GamepadHotKeyInfo(GamepadKeyCode.None); } diff --git a/src/Translumo/Services/ScreenDXCapturer.cs b/src/Translumo/Services/ScreenDXCapturer.cs index ad116b04..f886dc51 100644 --- a/src/Translumo/Services/ScreenDXCapturer.cs +++ b/src/Translumo/Services/ScreenDXCapturer.cs @@ -30,7 +30,7 @@ public class ScreenDXCapturer : IScreenCapturer private int _width; private int _height; - private bool _initalized = false; + private bool _initialized = false; private readonly ScreenCaptureConfiguration _configuration; @@ -41,7 +41,7 @@ public ScreenDXCapturer(ScreenCaptureConfiguration configuration) public void Initialize() { - if (_initalized) + if (_initialized) { Dispose(); } @@ -76,7 +76,7 @@ public void Initialize() _screenTexture = new Texture2D(_device, _textureDesc); _duplicatedOutput = _output1.DuplicateOutput(_device); - _initalized = true; + _initialized = true; } public byte[] CaptureScreen() @@ -131,7 +131,7 @@ public void Dispose() _output1?.Dispose(); _output1 = null; - _initalized = false; + _initialized = false; } private byte[] MakeScreenshotInternal(RectangleF captureArea, int curAttempt)