Bug 488564 - Use new plural formula for Hebrew replacing the former one
Summary: Use new plural formula for Hebrew replacing the former one
Status: REPORTED
Alias: None
Product: lokalize
Classification: Applications
Component: general (show other bugs)
Version: 24.05.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Simon Depiets
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-16 04:49 UTC by Yaron Shahrabani
Modified: 2024-07-26 12:15 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yaron Shahrabani 2024-06-16 04:49:49 UTC
SUMMARY
Hebrew plural forms use an old formula instead of a new one

STEPS TO REPRODUCE
1. Make sure that your project is using the templates
2. Create a new translation from a template
3. Observe the newly created file's header

OBSERVED RESULT
The header should contain:
nplurals=2; plural=(n != 1);

EXPECTED RESULT
It should contain:
nplurals=4; plural=(n==1 ? 0 : n==2 ? 1 : n>10 && n%10==0 ? 2 :

Thanks!
Comment 2 Yaron Shahrabani 2024-06-17 06:05:09 UTC
Yes, this is the plural form that was used for over 20 years, and although it was wrong it was very complicated to change.

Several years ago my friends filed a request against CLDR asking them to change the plural forms to match the way people speak rather than how the language rules are formed.

So in Hebrew, there are several special cases where we need to use the 3rd form (dual): time terms (Hour->Hours, Week->Weeks, etc.) but that still doesn't fully reflect how people speak Hebrew, because when talking about many years (20 years, 15 years, etc.) we switch back to the singular form (20 year, 15 year, etc.).

Although the language rules permit using the general plural form for many years this is not how the native Hebrew speakers speak.

So the timeline is:
1. Two forms.
2. 4 forms.
3. (From 2021) 3 forms (eliminating the 4th rule).

The decision about the 4 forms was a community consensus while the decision from 2021 was outrageous and unacceptable because a single contributor just presented why he thinks it shouldn't be that way and the CLDR quorum simply accepted that without consulting other parties.

So I'm sticking with option number 2 which is more native although pretty tedious most of the time.
I've filed a request to turn the tables on the decision from 2021, the original contributor is not responding so far but I'm going to make sure we'll get those rules back since it's better to choose not to use the extra forms but not being able to use them is limiting and incorrect.

I can attach more links to this decision if it's not enough.
So far nobody reached out to gettext to request an alignment with the CLDR decision because we all thought it was automatic but apparently, we need to do it manually.
Comment 3 Albert Astals Cid 2024-06-17 15:21:07 UTC
I would really like to align with what gettext does, so please talk to them, given that Lokalize is mostly a "po file editor", defaulting to what the "po file application" defaults seems the best idea.
Comment 4 Yaron Shahrabani 2024-06-17 18:53:40 UTC
GNOME Translation Editor/gTranslator, poedit, Weblate, Crowdin, Facebook, TranslateWiki, Pontoon, and most of the popular platforms use four plural forms for Hebrew (Transifex also did until the recent three forms change; there's an auto update from CLDR they can't control).

We've tried contacting Gettext, but it's not easy. Most of the suppliers are working with CLDR anyway, so we didn't insist.
I understand your position, but the majority of localization platforms have moved on. There's no reason to stay behind because Gettext is unwilling to cooperate.
I can try opening a bug against gettext, but in the meantime, it's just really frustrating for me to do this manually for each file, and currently, I'm the only Hebrew translator anyway.

I wish there were a way to change the plural form manually, just like in poedit. It would be much easier, and we didn't have to decide; I would just set it the way I want, and that's it.

Thanks.
Comment 5 Albert Astals Cid 2024-06-17 21:29:20 UTC
> We've tried contacting Gettext, but it's not easy.

There's a mailing list https://lists.gnu.org/mailman/listinfo/bug-gettext what is not easy about subscribing and sending an email?
Comment 6 Yaron Shahrabani 2024-07-04 20:05:01 UTC
(In reply to Albert Astals Cid from comment #5)
> > We've tried contacting Gettext, but it's not easy.
> 
> There's a mailing list https://lists.gnu.org/mailman/listinfo/bug-gettext
> what is not easy about subscribing and sending an email?

The required rules are no longer the latest due to this request:
https://unicode-org.atlassian.net/browse/CLDR-9790
https://unicode-org.atlassian.net/browse/CLDR-11815
https://unicode-org.atlassian.net/browse/CLDR-11816
https://unicode-org.atlassian.net/browse/CLDR-14634

We'll have to wait until my request for revert becomes active, otherwise, it's going to be a whole lot of mess:
https://unicode-org.atlassian.net/browse/CLDR-17469

So I can send a request but I can't guarantee that I can agree with the outcome.
Comment 7 Yaron Shahrabani 2024-07-26 07:29:43 UTC
Let's take it from another angle, how about adding an option to change the plural forms manually like POEdit does?
Comment 8 Albert Astals Cid 2024-07-26 12:15:22 UTC
If you have time to code that, that would be a nice addition.