From 10434c553aa3dbdf8019f4615728b5088c307795 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Wed, 21 Sep 2022 20:09:40 +0200 Subject: [PATCH] Made translations read-only when using DeepL in automatic mode --- I18N Commander/UI WinForms/Components/Translation.cs | 1 + I18N Commander/UI WinForms/Components/Translations.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/I18N Commander/UI WinForms/Components/Translation.cs b/I18N Commander/UI WinForms/Components/Translation.cs index e438bae..6dfac30 100644 --- a/I18N Commander/UI WinForms/Components/Translation.cs +++ b/I18N Commander/UI WinForms/Components/Translation.cs @@ -49,6 +49,7 @@ public sealed partial class Translation : UserControl private async Task LateSetup(AppSettings.CultureInfo cultureInfo) { this.isDeepLSourceCulture = await AppSettings.GetDeepLSourceCultureIndex() == cultureInfo.Index; + this.textBox.ReadOnly = !(this.isDeepLSourceCulture || await AppSettings.GetDeepLAction() == SettingDeepLAction.MANUAL); this.buttonDeepL.Visible = await AppSettings.GetDeepLMode() != SettingDeepLMode.DISABLED; this.buttonDeepL.Image = this.isDeepLSourceCulture ? Icons.icons8_trigger_1__svg : Icons.deepl_logo_icon_170284; diff --git a/I18N Commander/UI WinForms/Components/Translations.cs b/I18N Commander/UI WinForms/Components/Translations.cs index 178ddd8..78a11ec 100644 --- a/I18N Commander/UI WinForms/Components/Translations.cs +++ b/I18N Commander/UI WinForms/Components/Translations.cs @@ -103,7 +103,7 @@ public partial class Translations : UserControl internal async Task MainCultureWasChanged() { - if(this.mainCulture is null || await AppSettings.GetDeepLMode() == SettingDeepLMode.DISABLED || await AppSettings.GetDeepLAction() == SettingDeepLAction.MANUAL) + if(this.mainCulture is null || await AppSettings.GetDeepLMode() == SettingDeepLMode.DISABLED) return; var allTasks = new List();