From f070d913b7cde7a8b7804a145dc114b6461b855e Mon Sep 17 00:00:00 2001 From: Waldi Ravens Date: Tue, 28 Jul 2015 19:30:37 +0200 Subject: [PATCH 1/2] dictionaries: automated XML upkeep --- Dictionaries/eng_OCRFixReplaceList.xml | 2 +- Dictionaries/hrv_OCRFixReplaceList.xml | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Dictionaries/eng_OCRFixReplaceList.xml b/Dictionaries/eng_OCRFixReplaceList.xml index c39bee1a2..c1f0efe54 100644 --- a/Dictionaries/eng_OCRFixReplaceList.xml +++ b/Dictionaries/eng_OCRFixReplaceList.xml @@ -2190,4 +2190,4 @@ - + \ No newline at end of file diff --git a/Dictionaries/hrv_OCRFixReplaceList.xml b/Dictionaries/hrv_OCRFixReplaceList.xml index b2b5c9afb..1b677ea0b 100644 --- a/Dictionaries/hrv_OCRFixReplaceList.xml +++ b/Dictionaries/hrv_OCRFixReplaceList.xml @@ -314,7 +314,6 @@ - @@ -473,8 +472,8 @@ - - + + @@ -647,7 +646,7 @@ - + @@ -959,9 +958,8 @@ - - + @@ -992,7 +990,6 @@ - @@ -1174,7 +1171,7 @@ - + @@ -1435,4 +1432,4 @@ - + \ No newline at end of file From d8e712412279eca82b6311e29639a5a56da2f7a8 Mon Sep 17 00:00:00 2001 From: Waldi Ravens Date: Tue, 28 Jul 2015 19:52:12 +0200 Subject: [PATCH 2/2] Formatting (whitespace only) --- src/Forms/Main.cs | 14 +++++++------- src/Forms/RemoveTextFromHearImpaired.cs | 2 +- src/Logic/Forms/RemoveTextForHISettings.cs | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Forms/Main.cs b/src/Forms/Main.cs index 21e4965e6..3cb78c98c 100644 --- a/src/Forms/Main.cs +++ b/src/Forms/Main.cs @@ -3207,7 +3207,7 @@ namespace Nikse.SubtitleEdit.Forms public string NormalizeUnicode(string text) { const char defHyphen = '-'; // - Hyphen-minus (\u002D) (Basic Latin) - const char defColon = ':'; // : Colon (\u003A) (Basic Latin) + const char defColon = ':'; // : Colon (\u003A) (Basic Latin) // Hyphens text = text.Replace('\u2043', defHyphen); // ⁃ Hyphen bullet (\u2043) @@ -3220,7 +3220,7 @@ namespace Nikse.SubtitleEdit.Forms // Colons: text = text.Replace('\u02F8', defColon); // ˸ Modifier Letter Raised Colon (\u02F8) text = text.Replace('\uFF1A', defColon); // : Fullwidth Colon (\uFF1A) - text = text.Replace('\uF313', defColon); // ︓ Presentation Form for Vertical Colon (\uF313) + text = text.Replace('\uFE13', defColon); // ︓ Presentation Form for Vertical Colon (\uFE13) // Others text = text.Replace("…", "..."); @@ -3233,11 +3233,11 @@ namespace Nikse.SubtitleEdit.Forms text = text.Replace("\uFEFF", string.Empty); // Zero Width No-Break Space // Intellectual property - text = text.Replace("\u00A9", "(Copyright)"); // copyright © - text = text.Replace("\u2117", "(Sound-recording Copyright)"); // sound-recording copyright ℗ - text = text.Replace("\u00AE", "(Registered Trademark)"); // registered trademark ® - text = text.Replace("\u2120", "(Service Mark)"); // service mark ℠ - text = text.Replace("\u2122", "(Trademark)"); // trademark ™ + text = text.Replace("\u00A9", "(Copyright)"); // © copyright + text = text.Replace("\u2117", "(Sound-recording Copyright)"); // ℗ sound-recording copyright + text = text.Replace("\u00AE", "(Registered Trademark)"); // ® registered trademark + text = text.Replace("\u2120", "(Service Mark)"); // ℠ service mark + text = text.Replace("\u2122", "(Trademark)"); // ™ trademark return text; } diff --git a/src/Forms/RemoveTextFromHearImpaired.cs b/src/Forms/RemoveTextFromHearImpaired.cs index 6518a287d..00dcb4307 100644 --- a/src/Forms/RemoveTextFromHearImpaired.cs +++ b/src/Forms/RemoveTextFromHearImpaired.cs @@ -272,7 +272,7 @@ namespace Nikse.SubtitleEdit.Forms // only works when used from "Form Load" comboBoxCustomStart.Text = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCustomBefore; comboBoxCustomEnd.Text = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCustomAfter; - comboBoxRemoveIfTextContains.Text = Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfContainsText; + comboBoxRemoveIfTextContains.Text = Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfContainsText; } } diff --git a/src/Logic/Forms/RemoveTextForHISettings.cs b/src/Logic/Forms/RemoveTextForHISettings.cs index f3d605997..c6e4f43b1 100644 --- a/src/Logic/Forms/RemoveTextForHISettings.cs +++ b/src/Logic/Forms/RemoveTextForHISettings.cs @@ -30,7 +30,7 @@ namespace Nikse.SubtitleEdit.Logic.Forms ColonSeparateLine = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBeforeColonOnlyOnSeparateLine; RemoveWhereContains = Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfContains; RemoveIfTextContains = new List(); - foreach (string item in Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfContainsText.Split(new char[] { ','},StringSplitOptions.RemoveEmptyEntries)) + foreach (string item in Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfContainsText.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)) { RemoveIfTextContains.Add(item.Trim()); }