Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The plural is wrongly specified.
It creates bugs as "1 vote" displayed in a poll instead of "0 votes".
In the fr.po, you need to replace "Plural-Forms: nplurals=2; plural=(n > 1);" by "Plural-Forms: nplurals=2; plural=(n != 1);"
Comments
Comment #1
alkahan CreditAttribution: alkahan commentedComment #2
syllance CreditAttribution: syllance commentedtechnically speaking, i think the bug is not on the plural form definition, as 0 should use the same form than 1 in our french case :)
the call to format_plural often use "1 " as singular, which in our case effectively displays 1 vote when there are 0.
if format_plural is called with "%count " even for singular form, then this is working.
unfortunately, the API doc for format_plural explicitely say to use distinct case for singular, and gives an example with "1 ", which is often used in the code, leaving few chances for the zero case to be managed the same way than the singular form.
Definition of plural forms indeed have to be defined as you say to avoid displaying 1 for 0 with code that explicitely use "1 " as singular.
Thanks
Comment #3
Damien Tournoud CreditAttribution: Damien Tournoud commentedMainly fixed in core and main contributed modules.