Skip to content

Add editable whitelist for "Remove if all uppercase" (#11563)#11968

Merged
niksedk merged 2 commits into
SubtitleEdit:mainfrom
muaz978:feature/remove-hi-uppercase-whitelist
Jun 29, 2026
Merged

Add editable whitelist for "Remove if all uppercase" (#11563)#11968
niksedk merged 2 commits into
SubtitleEdit:mainfrom
muaz978:feature/remove-hi-uppercase-whitelist

Conversation

@muaz978

@muaz978 muaz978 commented Jun 29, 2026

Copy link
Copy Markdown

Fixes #11563.

Problem: 'Remove text for hearing impaired' → 'Remove if all uppercase' deleted short all-caps lines like OK, WWE and other acronyms, because the keep-list was hardcoded (YES/NO/WHY/HI/OK + single char) and not user-editable.

Fix: replace the hardcoded list with a configurable, comma-separated whitelist (default YES, NO, WHY, HI, OK, TV, OK.) shown as a text box next to the 'If line is uppercase' checkbox. All-uppercase lines matching the whitelist (case-insensitive) are kept; single-letter lines like I are always kept.

Wired through libse (RemoveTextForHISettings / RemoveTextForHI + the persisted default) and the SE5 settings/view-model/window, so it benefits both the dialog and batch convert.

Muaz and others added 2 commits June 29, 2026 06:27
)

"Remove text for hearing impaired" → "Remove if all uppercase" deleted short
all-caps lines like "OK", "WWE" and other acronyms, because the keep-list was
hardcoded (YES/NO/WHY/HI/OK + single char) and not user-editable.

Replace the hardcoded list with a configurable, comma-separated whitelist
(default "YES, NO, WHY, HI, OK, TV, OK.") surfaced as a text box next to the
"If line is uppercase" checkbox. All-uppercase lines that match the whitelist
(case-insensitive) are kept; single-letter lines such as "I" are always kept.

Wired through libse (RemoveTextForHISettings / RemoveTextForHI, plus the
persisted RemoveTextForHearingImpairedSettings default) and the SE5 settings/
view-model/window, so it benefits the dialog and the batch-convert path.
The new "keep these words" tooltip now respects Se.Settings.Appearance.ShowHints
like the rest of the UI. Also removed "OK." from the default whitelist - the
matcher trims trailing '.' before comparing, so "OK." could never match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@niksedk niksedk merged commit 01955cd into SubtitleEdit:main Jun 29, 2026
1 of 2 checks passed
@muaz978 muaz978 deleted the feature/remove-hi-uppercase-whitelist branch June 29, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Remove text for hearing impaired" removes text which it shouldn't.

2 participants