-
Problem report
-
Resolution: Fixed
-
Trivial
-
7.0.0alpha6, 7.0.0alpha7
-
None
-
Sprint 105 (Oct 2023)
-
0.125
The strings in question are:
- https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/ui/include/classes/helpers/CMaintenanceHelper.php#85
- https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/ui/include/classes/helpers/CMaintenanceHelper.php#71
It seems that the number of format specifiers like %1$s must be the same for singular an plural forms when _n / ngettext function is used. This is due to how the plural formula is specified for russian and ukranian languages.
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
This formula results in msgstr[0] translation be used for both signular and plural forms, and in case of format specifier number mismatch, it results in gettext failing
number of format specifications in 'msgid_plural' and 'msgstr[0]' does not match
Here is an example *.po file entry.
#: include/classes/helpers/CMaintenanceHelper.php:85 #, c-format msgid "At %1$s %2$s of every week" msgid_plural "At %1$s %2$s of every %3$s weeks" msgstr[0] "В %1$s %2$s каждую неделю" msgstr[1] "В %1$s %2$s каждые %3$s недели" msgstr[2] "В %1$s %2$s каждые %3$s недели"
Propose rephrasing the string in question to include the same number of format specifiers for both singular and plural form. Update development guidelines.