Ticket #4515 (closed defect: invalid)

Opened 11 months ago

Last modified 11 months ago

Number of plurals in Spanish es.po

Reported by: dmartina Owned by:
Priority: major Milestone:
Component: translations Version: master
Keywords: transifex Spanish plurals Cc: dhmartina@…
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

I can't figure out how to explain the existence of three plural forms in Spanish language nor can I find any reference about it in the web. Neither can I revert the change in Transifex.

The change in po/es.po was done by commit [168ec330] "Update translations from Transifex" dated 2023-01-05.

   -"Plural-Forms: nplurals=2; plural=(n != 1);\n"
   +"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? "
   +"1 : 2;\n"

As stated in https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html the former seems to be right one for Spanish, Portuguese, English, German…

Change History

comment:1 Changed 11 months ago by dmartina

  • Cc dhmartina@… added
  • Component changed from mc-core to translations

comment:2 Changed 11 months ago by zaytsev

I've just checked the latest translation file and it has the following:

"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"

I also cannot find any way to change this in the interface. I can try to open a Transifex ticket though to ask them, why they did this change.

comment:3 Changed 11 months ago by zaytsev

  • Status changed from new to closed
  • Resolution set to invalid
  • Milestone Future Releases deleted

Here is the answer from the Transifex support:

I understand your and your translators' confusion, so let me help clarify this situation. The plural rules that we use come from Unicode CLDR, which is the industry standard for localization, and for Spanish (es), the number of plural forms they define is three. You can find more information by following this link [1], which leads to the most recent CLDR version (44).

While not initially intuitive, these additional forms can exist in many languages, and usually, there's a reason for them. However, they are not set in stone, as plural forms can be added or removed across versions.

Lastly, these rules are set globally from our side to ensure compatibility and can't be customized.

[1]: https://www.unicode.org/cldr/charts/44/supplemental/language_plural_rules.html#es

So the Unicode database maintainers have decided for whatever reasons to add a third plural to Spanish, and it will now slowly trickle downstream. I cannot judge whether this is right or wrong, but the bottom line is that it should be brought up with the Unicode people.

Therefore I will close this ticket for the time being.

comment:4 Changed 11 months ago by zaytsev

This document on GitHub describes requesting changes to the CLDR spec, in case you want to submit a request for Spanish:

https://github.com/unicode-org/cldr/blob/main/docs/requesting_changes.md

comment:5 Changed 11 months ago by dmartina

I see… Case [0] goes for singular forms, [2] for common plurals, and a special case [1] seems to be referred for exact millions. Consider something like '1000000 "OF" files', but '1000001 files'.

I have fixed the four plural aware strings present in Transifex por mc.pot for Spanish. Other latin based languages like Italian or Portuguese seem to be affected as well by this changed policy.

I'm afraid I can't figure out how to test these four strings. I tried to create 1M files and delete them, but this string doesn't seem to be properly pluralized.

Thanks,
David

Note: See TracTickets for help on using tickets.