From 6e846f91e919295ab317e0f79ed06900a0092953 Mon Sep 17 00:00:00 2001 From: mrducky Date: Thu, 19 Feb 2026 00:51:34 +0000 Subject: [PATCH 1/3] in WordCheck, if no langs specified, suppress all input boxes to highlight all uncommon script. --- tools/proofers/spellcheck_text.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/proofers/spellcheck_text.inc b/tools/proofers/spellcheck_text.inc index aa3560730..7ad7f4933 100644 --- a/tools/proofers/spellcheck_text.inc +++ b/tools/proofers/spellcheck_text.inc @@ -49,8 +49,12 @@ function spellcheck_text($orig_text, $projectid, $imagefile, $languages, $accept // prepare the text for checking, in this case change all EOLs to spaces $orig_text = str_replace('[lf]', ' ', $orig_text); - [$badWordHash, $languages, $messages] = - get_bad_word_levels_for_project_text($orig_text, $projectid, $languages, $accepted_words); + if (!empty($languages)) { + [$badWordHash, $languages, $messages] = + get_bad_word_levels_for_project_text($orig_text, $projectid, $languages, $accepted_words); + } else { + [$badWordHash, $languages, $messages] = [ [], [], [] ]; + } [$uncommonScriptWords, $uncommonScripts] = get_words_with_uncommon_scripts(array_keys(get_distinct_words_in_text($orig_text))); From aa5967ead80b2b5b33d07eeb6985b5b6c760a9a6 Mon Sep 17 00:00:00 2001 From: mrducky Date: Sat, 21 Feb 2026 13:58:51 +0000 Subject: [PATCH 2/3] Add comment about showing uncommon script highlighting for all the text --- tools/proofers/spellcheck_text.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/proofers/spellcheck_text.inc b/tools/proofers/spellcheck_text.inc index 7ad7f4933..69b258c39 100644 --- a/tools/proofers/spellcheck_text.inc +++ b/tools/proofers/spellcheck_text.inc @@ -49,6 +49,8 @@ function spellcheck_text($orig_text, $projectid, $imagefile, $languages, $accept // prepare the text for checking, in this case change all EOLs to spaces $orig_text = str_replace('[lf]', ' ', $orig_text); + // If the user deselected all languages, then fully suppress all bad words in order to + // suppress all input boxes so that uncommon script highlighting covers the entire text. if (!empty($languages)) { [$badWordHash, $languages, $messages] = get_bad_word_levels_for_project_text($orig_text, $projectid, $languages, $accepted_words); From 7349a03f7939099af79a736596eb9e1d13b2620a Mon Sep 17 00:00:00 2001 From: mrducky Date: Sat, 21 Feb 2026 14:10:20 +0000 Subject: [PATCH 3/3] fix linting error --- tools/proofers/spellcheck_text.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/proofers/spellcheck_text.inc b/tools/proofers/spellcheck_text.inc index 69b258c39..44514fff5 100644 --- a/tools/proofers/spellcheck_text.inc +++ b/tools/proofers/spellcheck_text.inc @@ -55,7 +55,7 @@ function spellcheck_text($orig_text, $projectid, $imagefile, $languages, $accept [$badWordHash, $languages, $messages] = get_bad_word_levels_for_project_text($orig_text, $projectid, $languages, $accepted_words); } else { - [$badWordHash, $languages, $messages] = [ [], [], [] ]; + [$badWordHash, $languages, $messages] = [[], [], []]; } [$uncommonScriptWords, $uncommonScripts] =