[wp-trac] [WordPress Trac] #57588: The picking of plural form #0 is hard-coded for singular strings
WordPress Trac
noreply at wordpress.org
Wed Nov 6 20:55:10 UTC 2024
#57588: The picking of plural form #0 is hard-coded for singular strings
-------------------------------+------------------------------
Reporter: jaanise | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: I18N | Version: 6.1
Severity: minor | Resolution:
Keywords: 2nd-opinion close | Focuses:
-------------------------------+------------------------------
Comment (by jaanise):
Returning translation #0 is just wrong. If the code asks for not-counted
string, I would guess it's almost always intended to be for count "1", not
for the count that happens to be with index #0 in the PO file definition.
Different languages may have the count "1" version under different
indexes, even the same language may have it under different indexes in
different PO files (defined by different Plural-forms) (which is not a
good and widespread practice, but it is possible, it is allowed by the
format, and, for example, there are two different Plural-form definitions
actually used in Latvian transitions).
Using explicitly count "1" would not break the result in most cases, most
people won't notice anything (including the sloppy programmers and those
who test their plugins only in English, for example) but it would
fix/patch the sloppy programming cases for other languages and cases where
count "1" is not under index #0.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57588#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list