From 55b6adf5c9879167b7efbdcd7f7501e6b2405ded Mon Sep 17 00:00:00 2001 From: niksedk Date: Thu, 5 Nov 2026 10:28:33 +0100 Subject: [PATCH] American to British: stop converting words with another meaning pants (verb), tire (verb), draft (document), practice/license (British nouns), program (computer), meter (device) and install are standard British English in those senses, so US->BR replaced correct text ("She pants" -> "She trousers"). They now only apply British to American. SubtitleEdit/subtitleedit#16366 Co-Authored-By: Claude Opus 5.5 --- se5/AmericanToBritish.Tests/BatchModeTests.cs | 10 +++++++ se5/Plugin-Shared/WordList.xml | 28 +++++++++---------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/se5/AmericanToBritish.Tests/BatchModeTests.cs b/se5/AmericanToBritish.Tests/BatchModeTests.cs index 99127d4d..3f7b0b48 100644 --- a/se5/AmericanToBritish.Tests/BatchModeTests.cs +++ b/se5/AmericanToBritish.Tests/BatchModeTests.cs @@ -38,6 +38,16 @@ public void Batch_ConvertsAllLines() Assert.Null(response.SettingsVersion); } + [Fact] + public void Batch_LeavesWordsWithAnotherMeaningAlone() + { + // pants/tire/draft/practice... are also verbs or nouns that British English spells the same (issue #16366) + var texts = new[] { "She pants heavily.", "I never tire of it.", "The first draft.", "Doctor's practice.", "A computer program.", "Install it.", "A parking meter.", "Licence or license." }; + var response = BatchMode.BuildBatchResponse(Request(texts.Append("color").ToArray()), WordListPath); + + Assert.Equal(texts.Append("colour"), Texts(response)); + } + [Fact] public void Batch_KeepsTimings() { diff --git a/se5/Plugin-Shared/WordList.xml b/se5/Plugin-Shared/WordList.xml index 7c563c02..b190716a 100644 --- a/se5/Plugin-Shared/WordList.xml +++ b/se5/Plugin-Shared/WordList.xml @@ -262,12 +262,12 @@ - + - + @@ -506,10 +506,10 @@ - + - + @@ -545,7 +545,7 @@ - + @@ -577,8 +577,8 @@ - - + + @@ -686,7 +686,7 @@ - + @@ -745,16 +745,16 @@ - + - + - - + + @@ -934,8 +934,8 @@ - - + +