From 5b6154cf5355734d6722ec41e8305a2c425fc90f Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Mon, 13 Apr 2020 20:39:00 +0200 Subject: [PATCH] Auto disable "Fix continuation style" for ko zh ja th - thx Jamakmake :) --- src/Forms/FixCommonErrors.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Forms/FixCommonErrors.cs b/src/Forms/FixCommonErrors.cs index 688e5833c..6466e612c 100644 --- a/src/Forms/FixCommonErrors.cs +++ b/src/Forms/FixCommonErrors.cs @@ -113,6 +113,7 @@ namespace Nikse.SubtitleEdit.Forms private int _numberOfImportantLogMessages; private HashSet _allowedFixes; private bool _linesDeletedOrMerged; + private bool _oldFixContinuationStyleTicked; public SubtitleFormat Format => _format; @@ -363,7 +364,14 @@ namespace Nikse.SubtitleEdit.Forms _spanishInvertedQuestionAndExclamationMarksIndex = -1; _indexAloneLowercaseIToUppercaseIEnglish = -1; - FixCommonErrorsSettings ce = Configuration.Settings.CommonErrors; + var ce = Configuration.Settings.CommonErrors; + + _oldFixContinuationStyleTicked = ce.FixContinuationStyleTicked; + if (Language == "ko" || Language == "zh" || Language == "ja" || Language == "th") + { + ce.FixContinuationStyleTicked = false; + } + _fixActions = new List { new FixItem(_language.RemovedEmptyLinesUnsedLineBreaks, string.Empty, () => new FixEmptyLines().Fix(Subtitle, this), ce.EmptyLinesTicked), @@ -1064,6 +1072,11 @@ namespace Nikse.SubtitleEdit.Forms ce.FixDoubleDashTicked = listView1.Items[IndexFixDoubleDash].Checked; ce.FixDoubleGreaterThanTicked = listView1.Items[IndexFixDoubleGreaterThan].Checked; ce.FixContinuationStyleTicked = listView1.Items[IndexFixContinuationStyle].Checked; + if (Language == "ko" || Language == "zh" || Language == "ja" || Language == "th") + { + ce.FixContinuationStyleTicked = _oldFixContinuationStyleTicked; + } + if (Configuration.Settings.General.ContinuationStyle == ContinuationStyle.None) { ce.FixEllipsesStartTicked = listView1.Items[IndexFixEllipsesStart].Checked;