From aae958979581ad77bf770ca23a63436b5609117f Mon Sep 17 00:00:00 2001 From: niksedk Date: Mon, 12 Oct 2026 02:59:54 +0200 Subject: [PATCH] AmericanToBritish: keep phrases ("por favor" no longer becomes "por favour") Built-in entries in WordList.xml plus the local list's entries (which may now be phrases) are masked before the rules run, so a word inside them is left untouched while still converted elsewhere. Fixes SubtitleEdit/subtitleedit#15946 Co-Authored-By: Claude Opus 5.5 --- se5/AmericanToBritish/README.md | 4 +- se5/AmericanToBritish/WordListWindow.axaml | 4 +- se5/Plugin-Shared/EnglishVariantConverter.cs | 97 ++++++++++++++++++++ se5/Plugin-Shared/WordList.xml | 3 + 4 files changed, 105 insertions(+), 3 deletions(-) diff --git a/se5/AmericanToBritish/README.md b/se5/AmericanToBritish/README.md index b978244e..e3408da8 100644 --- a/se5/AmericanToBritish/README.md +++ b/se5/AmericanToBritish/README.md @@ -20,7 +20,9 @@ and format as the Subtitle Edit 4 plugin, so an existing list keeps working: ``` A `Word` with the same American spelling as a built-in pair replaces it; `Ignore` -turns a built-in pair off. +turns a built-in pair off. An `Ignore` can also be a phrase, which is then left +untouched wherever it occurs (`` keeps "favor" there while +it is still converted elsewhere). A few such phrases are built in, e.g. "por favor". First Subtitle Edit 5 plugin built on top of the shared [`Plugin-Shared`](../Plugin-Shared/) library — Avalonia app boot, theme passing, diff --git a/se5/AmericanToBritish/WordListWindow.axaml b/se5/AmericanToBritish/WordListWindow.axaml index e30c2569..aa747384 100644 --- a/se5/AmericanToBritish/WordListWindow.axaml +++ b/se5/AmericanToBritish/WordListWindow.axaml @@ -94,13 +94,13 @@ Opacity="0.7" TextWrapping="Wrap" Margin="0,0,0,8" - Text="American words from the built-in list that should never be converted." /> + Text="American words from the built-in list that should never be converted, or whole phrases to leave untouched (e.g. "por favor")." />