Stop British to American from rewriting standard American words - #287
Merged
Conversation
The SE5 British to American plugin runs the shared WordList.xml in reverse, which turned one-way vocabulary entries into corruptions of text that is already correct American English: car -> automobile, 'flat tire' -> 'apartment tire', 'lift the box' -> 'elevator the box', 'Egyptian mummy' -> 'Egyptian mommy', 'disc jockey' -> 'disk jockey', 'the analyses' -> 'the analyzes', and more. Add an optional only="UsToBr"/"BrToUs" attribute to word list pairs and honor it in EnglishVariantConverter. Tag the 21 pairs whose British side is also standard (often polysemous) American English so they only run American -> British. Remove two pairs that are wrong in both directions: 'pulled up'/'drew up' and 'luggage'/'baggage' (all four words are standard in both dialects). American -> British output is unchanged. Fixes SubtitleEdit/subtitleedit#14374 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes SubtitleEdit/subtitleedit#14374 ("car" → "automobile").
Problem
The SE5 British to American plugin runs the shared
WordList.xmlin reverse. The list mixes safe spelling variants (colour/color) with vocabulary pairs whose British side is also standard — and often polysemous — American English. Reversed, those corrupt text that is already correct American:Fix
WordList.xmlpairs now support an optionalonly="UsToBr"/only="BrToUs"attribute;EnglishVariantConverterskips pairs that don't match its direction.only="UsToBr".pulled up/drew up("drew up a contract" → "pulled up a contract") andluggage/baggage("emotional baggage" → "emotional luggage") — all four words are standard in both dialects.American → British output is unchanged — automobile→car, movie→film, elevator→lift etc. all still convert, which matches the reporter's own Harry Potter workflow.
Verification
Console harness against the built
Plugin-Shared: 20/20 checks pass — the 12 corruption cases above are now left untouched in Br→Us, real British spellings and vocabulary (colour, lorry, petrol, nappy, analyse-as-verb, programme) still convert, and all tagged pairs still convert Us→Br. Both plugin projects build with 0 errors;WordList.xmlvalidates (1845 pairs).🤖 Generated with Claude Code