Skip to content

fix(i18n): pass format args directly to __(), fix pt-PT plurals, and decode HTML entities - #487

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_syslog:

  • Remove the outer sprintf() wrapper around __() on two partition-maintenance messages in includes/functions.php so $table and $recovery_failed['missing'] are passed before 'syslog'. Wrapping __() inside sprintf() caused Cacti's __() to consume 'syslog' as the placeholder argument at runtime.
  • Fix locales/po/pt-PT.po Plural-Forms to nplurals=2; plural=n != 1;, strip 2 U+202B bidi overrides in he-IL.po, and decode baked HTML entities (" / ') across 9 catalogs (ar-SA, bg-BG, he-IL, hi-IN, ja-JP, ko-KR, nl-NL, tr-TR, vi-VN).
  • Recompile all 10 modified .mo binaries.

Verified with php -l, msgfmt --check --check-format --check-header --check-domain, and tests/bin/validate-manifest.php.

…decode HTML entities

Fixes mechanical localization issues in `plugin_syslog`:

- Remove the outer `sprintf()` wrapper around `__()` on two partition-maintenance messages in `includes/functions.php` so `$table` and `$recovery_failed['missing']` are passed before `'syslog'`. Wrapping `__()` inside `sprintf()` caused Cacti's `__()` to consume `'syslog'` as the placeholder argument at runtime.
- Fix `locales/po/pt-PT.po` `Plural-Forms` to `nplurals=2; plural=n != 1;`, strip 2 U+202B bidi overrides in `he-IL.po`, and decode baked HTML entities (`"` / `'`) across 9 catalogs (`ar-SA`, `bg-BG`, `he-IL`, `hi-IN`, `ja-JP`, `ko-KR`, `nl-NL`, `tr-TR`, `vi-VN`).
- Recompile all 10 modified `.mo` binaries.

Verified with `php -l`, `msgfmt --check --check-format --check-header --check-domain`, and `tests/bin/validate-manifest.php`.

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

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

Copy link
Copy Markdown

@TheWitness
TheWitness merged commit fd999ca into develop Nov 26, 2026
12 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