Skip to content

fix(i18n): bind thold textdomains, json_encode JS strings, and fix PO HTML/entity/plural defects - #886

Merged
TheWitness merged 3 commits into
developfrom
fix/i18n-mechanical-defects
Nov 26, 2026
Merged

TheWitness merged 3 commits into
developfrom
fix/i18n-mechanical-defects

Conversation

@somethingwithproof

Copy link
Copy Markdown
Member

Fixes mechanical localization issues in plugin_thold:

  • Pass 'thold' to 42 missing or uppercased ('THOLD') plugin textdomain calls across notify_lists.php, notify_queue.php, setup.php, thold.php, thold_templates.php, and includes/arrays.php.
  • Embed all 6 translated multiselect JavaScript strings in thold.php with json_encode(...) to prevent quote-breaking SyntaxError failures.
  • Fix locales/po/pt-PT.po Plural-Forms from plural=n > 1; to plural=n != 1; and strip 2 stray U+202B bidi overrides in he-IL.po.
  • Repair HTML markup defects across catalogs: unbalanced <body><body>...<b></b>Apparaat</b> in nl-NL.po, doubled <html><body> and translated <ОПИСАНИЕ> tags in ru-RU.po, bogus closing </GRAPH></SUBJECT></URL></HOSTNAME></DESCRIPTION> tags in ar-SA.po, extra <br> tags in pl-PL.po, stray <b> in ja-JP.po and zh-CN.po, missing <SITE>/<LOCATION>/<DNOTES> lines in zh-CN.po, and stale <br>RECORD NOT UPDATED! suffixes across 16 locales.
  • Decode baked HTML entities (&quot;, &#39;, double-escaped &amp;#060/&amp;#062) and recompile all 21 modified .mo binaries.

Verified with php -l, node --check on the rendered script block, msgfmt --check --check-format --check-header --check-domain, and tests/bin/validate-manifest.php.

… HTML/entity/plural defects

Fixes mechanical localization issues in `plugin_thold`:

- Pass `'thold'` to 42 missing or uppercased (`'THOLD'`) plugin textdomain calls across `notify_lists.php`, `notify_queue.php`, `setup.php`, `thold.php`, `thold_templates.php`, and `includes/arrays.php`.
- Embed all 6 translated multiselect JavaScript strings in `thold.php` with `json_encode(...)` to prevent quote-breaking `SyntaxError` failures.
- Fix `locales/po/pt-PT.po` `Plural-Forms` from `plural=n > 1;` to `plural=n != 1;` and strip 2 stray U+202B bidi overrides in `he-IL.po`.
- Repair HTML markup defects across catalogs: unbalanced `<body><body>...<b></b>Apparaat</b>` in `nl-NL.po`, doubled `<html><body>` and translated `<ОПИСАНИЕ>` tags in `ru-RU.po`, bogus closing `</GRAPH></SUBJECT></URL></HOSTNAME></DESCRIPTION>` tags in `ar-SA.po`, extra `<br>` tags in `pl-PL.po`, stray `<b>` in `ja-JP.po` and `zh-CN.po`, missing `<SITE>`/`<LOCATION>`/`<DNOTES>` lines in `zh-CN.po`, and stale `<br>RECORD NOT UPDATED!` suffixes across 16 locales.
- Decode baked HTML entities (`&quot;`, `&#39;`, double-escaped `&amp;#60`/`&amp;#62`) and recompile all 21 modified `.mo` binaries.

Verified with `php -l`, `node --check` on the rendered script block, `msgfmt --check --check-format --check-header --check-domain`, and `tests/bin/validate-manifest.php`.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
… template actions

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
…tests

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@sonarqubecloud

Copy link
Copy Markdown

@TheWitness
TheWitness merged commit fe7137a into develop Nov 26, 2026
8 checks passed
@TheWitness
TheWitness deleted the fix/i18n-mechanical-defects branch November 26, 2026 19:40
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.

3 participants