Skip to content

fix(i18n): use monitor text domain for monitor_list setting and refresh cacti.pot - #293

Merged
somethingwithproof merged 4 commits into
developfrom
fix/i18n-monitor-domain-and-pot
Nov 24, 2026
Merged

somethingwithproof merged 4 commits into
developfrom
fix/i18n-monitor-domain-and-pot

Conversation

@somethingwithproof

@somethingwithproof somethingwithproof commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Fixes #292
Related: Cacti/cacti#8907, Cacti/cacti#8924

Changes

  • Pass the 'monitor' gettext text domain instead of 'thold' for the monitor_list setting label and description in setup.php, and for the Criticality label in setup.php that passed none.
  • Refresh locales/po/cacti.pot to include the current monitor_enable/monitor_disable confirmation strings and drop the removed placeholder variant (leaving per-language .po/.mo catalogs untouched for Weblate).
  • Add tests/Unit/I18nTextDomainTest.php (scan in tests/bin/check-i18n-domain.php, PHP tokenizer based): every translation helper call in the plugin's own PHP files must pass the 'monitor' text domain; four existing calls without it are listed with their counts.
  • Add unit test coverage for monitor_config_settings() in tests/Unit/MonitorConfigSettingsTest.php and a guarded get_current_page() stub in tests/bootstrap-unit.php.
  • Update CHANGELOG.md.

Verification

  • php -l on all plugin PHP files
  • php tests/bin/validate-manifest.php
  • php tests/bin/check-i18n-pot.php origin/develop
  • msgfmt --check-format -o /dev/null locales/po/cacti.pot
  • Pest unit suite: 153 passed (451 assertions, 0 failed)

…sh cacti.pot

Pass the 'monitor' gettext domain instead of 'thold' for the
monitor_list setting label and description in setup.php so translations
resolve against monitor's catalog at runtime.

Refresh locales/po/cacti.pot to include the two current monitor_enable
and monitor_disable confirmation strings and drop the removed
placeholder variant. Leave per-language .po and .mo catalogs untouched.

Fixes #292.
Related: Cacti/cacti#8907, Cacti/cacti#8924

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

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Remove locales/LC_MESSAGES/ka.mo left behind after the locale rename
to ka-GE (no matching ka.po exists; ka-GE.mo is already present).

Refs #292, Cacti/cacti#8925.

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

Copy link
Copy Markdown

@somethingwithproof
somethingwithproof merged commit 724e064 into develop Nov 24, 2026
9 checks passed
@somethingwithproof
somethingwithproof deleted the fix/i18n-monitor-domain-and-pot branch November 24, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

i18n: wrong 'thold' text domain, POT drift, dynamic __() call, msgfmt error, and mojibake/foreign-script leaks

2 participants