From 052926def1d0308d3283e3498d20742773f40be7 Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Wed, 25 Nov 2026 16:53:39 -0800 Subject: [PATCH] fix(i18n): mark literal % in syslog search help string as no-php-format Annotate the logical search help __esc() call in syslog.php with /* xgettext:no-php-format */ and update locales/po/cacti.pot from #, php-format to #, no-php-format so literal SQL LIKE % syntax is not flagged as a PHP printf format specifier in Weblate. Fixes Cacti/plugin_syslog#484 Signed-off-by: Thomas Vincent --- CHANGELOG.md | 1 + locales/po/cacti.pot | 2 +- syslog.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa82899b..2441859f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ --- develop --- +* issue#484: Mark the syslog search help string in `syslog.php` as `no-php-format` and update `locales/po/cacti.pot` so the literal `%` in `LIKE` syntax is not flagged as a PHP format specifier * issue#480: Split the syslog upgrade notice in `includes/installer.php` into separate balanced `

` translation strings, regenerate `locales/po/cacti.pot`, and remove orphan `locales/LC_MESSAGES/ka.mo` * feature: Add manually importable recommendation catalogues for Arista, Dell, Fortinet, HPE, Huawei, MikroTik, Nokia, NVIDIA and Palo Alto Networks in docs/.json.gz, built from each vendor's public message references * feature: Recommendations are matched only against the sending device's vendor (and vendor-neutral records) when the syslog host is a Cacti device whose vendor is recognised from its SNMP sysDescr or device template and has records; other hosts match every vendor, except that all-digit identifiers then match only vendor-neutral records diff --git a/locales/po/cacti.pot b/locales/po/cacti.pot index 7ffefc26..b38d6243 100644 --- a/locales/po/cacti.pot +++ b/locales/po/cacti.pot @@ -2507,7 +2507,7 @@ msgid "Grouped Messages" msgstr "" #: syslog.php -#, php-format +#, no-php-format msgid "Choose a field, operator, and value. AND takes precedence over OR; NOT excludes a condition. LIKE uses % for any number of characters and _ for one character. Dates use YYYY-MM-DD HH:MM:SS. IDs use nonnegative integers. By default, the last day of logs is shown unless the date range is adjusted." msgstr "" diff --git a/syslog.php b/syslog.php index 975d3f88..3365699b 100644 --- a/syslog.php +++ b/syslog.php @@ -2555,7 +2555,7 @@ function syslog_filter(string $sql_where, string $tab): void {

-
+