mirror of
https://github.com/Cacti/plugin_thold.git
synced 2026-10-23 11:36:57 +09:00
Replace the diff-line scan in tests/bin/check-i18n-pot.php, which had false-positive and false-negative cases, with a tokenizer-based comparison. For the merge-base and for HEAD it tokenizes every template-feeding PHP file (the find . -maxdepth 2 set build_gettext.sh scans), finds the Cacti i18n helper calls, and collects the literal string arguments that actually form each pot entry (msgctxt/msgid/plural per the xgettext -k spec). A call only contributes when those positions are constant strings, mirroring xgettext. If the extracted set differs between base and HEAD, locales/po/cacti.pot must be part of the PR. Reading whole files rather than diff lines means surrounding-code edits and quote-style-only changes no longer trigger it, and multi-line calls are handled correctly. Same fix validated in plugin_reportit #150.