Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #57588, comment 2


Ignore:
Timestamp:
11/06/2024 08:56:34 PM (3 months ago)
Author:
jaanise
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #57588, comment 2

    initial v1  
    1 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).
     1Returning 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 translations).
    22
    33Using 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.