Skip to content

fix(i18n): json_encode JS placeholders, fix reportit domains, and clean PO defects - #168

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

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

Conversation

@somethingwithproof

Copy link
Copy Markdown
Member

Fixes mechanical localization issues in plugin_reportit:

  • Embed the 4 translated placeholder strings in reportit.php with json_encode(...), fixing active JavaScript SyntaxError failures under nl-NL and uk-UA.
  • Fix the misspelled 'reportid' textdomain in view.php and pass 'reportit' to the 21 missing plugin-domain time-frame labels in include/global_arrays.php, updating tests/Unit/I18nTextDomainTest.php and tests/bin/patch-coverage.php.
  • Fix locales/po/pt-PT.po Plural-Forms to nplurals=2; plural=n != 1;, remove stray <br> tags across ar-SA, bg-BG, de-DE, and el-GR, decode baked HTML entities in de-DE.po (&#10;) and he-IL.po (&quot;), and recompile all 6 modified .mo binaries.

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

…an PO defects

Fixes mechanical localization issues in `plugin_reportit`:

- Embed the 4 translated placeholder strings in `reportit.php` with `json_encode(...)`, fixing active JavaScript `SyntaxError` failures under `nl-NL` and `uk-UA`.
- Fix the misspelled `'reportid'` textdomain in `view.php` and pass `'reportit'` to the 21 missing plugin-domain time-frame labels in `include/global_arrays.php`, updating `tests/Unit/I18nTextDomainTest.php` and `tests/bin/patch-coverage.php`.
- Fix `locales/po/pt-PT.po` `Plural-Forms` to `nplurals=2; plural=n != 1;`, remove stray `<br>` tags across `ar-SA`, `bg-BG`, `de-DE`, and `el-GR`, decode baked HTML entities in `de-DE.po` (`&#10;`) and `he-IL.po` (`&quot;`), and recompile all 6 modified `.mo` binaries.

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

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

Copy link
Copy Markdown

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