Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Translumo.OCR/Annotations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public sealed class NonNegativeValueAttribute : Attribute { }
/// <summary>
/// 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 <see cref="System.ArgumentNullException"/> constuctor.
/// like 'string paramName' parameter of the <see cref="System.ArgumentNullException"/> constructor.
/// </summary>
/// <example><code>
/// void Foo(string param) {
Expand Down Expand Up @@ -1701,4 +1701,4 @@ public sealed class XamlOneWayBindingModeByDefaultAttribute : Attribute { }
public sealed class XamlTwoWayBindingModeByDefaultAttribute : Attribute { }

#endregion
}
}
8 changes: 4 additions & 4 deletions src/Translumo.OCR/WindowsOCR/WindowsOCRHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Translumo.OCR.WindowsOCR
{
public static class WindowsOCRHelper
{
public static async Task<bool> InstallOcrLanguageCapatibility(string languageCode)
public static async Task<bool> InstallOcrLanguageCapability(string languageCode)
{
var process = CreateOcrCapabilityInstallProcess(languageCode);
if (process == null)
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -144,4 +144,4 @@ public string GetNameWithoutVersion()
return $"Language.OCR~~~{NameTag}";
}
}
}
}
4 changes: 2 additions & 2 deletions src/Translumo.TTS/WindowsTTSHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Translumo.TTS
{
public static class WindowsTTSHelper
{
public static async Task<bool> InstallTTSLanguageCapatibility(string languageCode)
public static async Task<bool> InstallTTSLanguageCapability(string languageCode)
{
var process = CreateTTSCapabilityInstallProcess(languageCode);
if (process == null)
Expand Down Expand Up @@ -133,4 +133,4 @@ public static List<VoiceInfo> GetAvailableVoicesForLanguage(string languageTag)
return result;
}
}
}
}
4 changes: 2 additions & 2 deletions src/Translumo.Translation/Deepl/DeepLRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Translumo.Utils/Annotations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public sealed class NonNegativeValueAttribute : Attribute { }
/// <summary>
/// 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 <see cref="System.ArgumentNullException"/> constuctor.
/// like 'string paramName' parameter of the <see cref="System.ArgumentNullException"/> constructor.
/// </summary>
/// <example><code>
/// void Foo(string param) {
Expand Down Expand Up @@ -1701,4 +1701,4 @@ public sealed class XamlOneWayBindingModeByDefaultAttribute : Attribute { }
public sealed class XamlTwoWayBindingModeByDefaultAttribute : Attribute { }

#endregion
}
}
4 changes: 2 additions & 2 deletions src/Translumo.Utils/BindableBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ protected virtual void SetProperty<T>(ref T member, T value, [CallerMemberName]
return;
}

var previuosValue = member;
var previousValue = member;
member = value;
try
{
OnPropertyChanged(propertyName);
}
catch
{
member = previuosValue;
member = previousValue;
OnPropertyChanged(propertyName);
throw;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Translumo/Dialog/Stages/StagesFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
3 changes: 1 addition & 2 deletions src/Translumo/HotKeys/HotKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -176,4 +176,3 @@ public enum KeyModifier
Win = 0x0008
}
}

6 changes: 3 additions & 3 deletions src/Translumo/HotKeys/HotKeysConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ public GamepadHotKeyInfo SettingVisibilityGamepadKey

public GamepadHotKeyInfo ShowSelectionAreaGamepadKey
{
get => _showSelctionAreaGamepadKey;
get => _showSelectionAreaGamepadKey;
set
{
SetProperty(ref _showSelctionAreaGamepadKey, value);
SetProperty(ref _showSelectionAreaGamepadKey, value);
}
}

Expand Down Expand Up @@ -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);
}
Expand Down
8 changes: 4 additions & 4 deletions src/Translumo/Services/ScreenDXCapturer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -41,7 +41,7 @@ public ScreenDXCapturer(ScreenCaptureConfiguration configuration)

public void Initialize()
{
if (_initalized)
if (_initialized)
{
Dispose();
}
Expand Down Expand Up @@ -76,7 +76,7 @@ public void Initialize()
_screenTexture = new Texture2D(_device, _textureDesc);
_duplicatedOutput = _output1.DuplicateOutput(_device);

_initalized = true;
_initialized = true;
}

public byte[] CaptureScreen()
Expand Down Expand Up @@ -131,7 +131,7 @@ public void Dispose()
_output1?.Dispose();
_output1 = null;

_initalized = false;
_initialized = false;
}

private byte[] MakeScreenshotInternal(RectangleF captureArea, int curAttempt)
Expand Down