Arabic plural forms are not being used

AI-generated summary

SafaAlfulaij reports an issue with Arabic plural forms not being used correctly in the system. The current implementation only uses the “one” and “other” forms, while Arabic has six plural forms.

SafaAlfulaij provides an example, where the “two” form is not used when the count is 2. Instead, the “other” form is used incorrectly.

SafaAlfulaij shares a screenshot to illustrate the issue, showing the incorrect usage of the “other” form for a count of 2.

gerhard identifies the problem as missing pluralization rules for the client and points to an example of correct implementation for another language. gerhard also confirms that the server-side pluralization rules are correct.

SafaAlfulaij creates a pull request to address the issue.

There is a problem with Arabic plural forms, as the only used forms are "one" and "other", while there are a total of 6 forms! For example (F:Form): F_zero: A F_one: B F_two: C f_few: D f_many: F f_other: F

“other” is selected for count=2 while there is a form for it (two) and it’s not used (And it has a translation).

On first glance everything looks fine.

Can you give an example for a string where the pluralization doesn’t work? What text is shown and what would you expect instead? A screenshot would help too.

The translation for the string is (Form is in brackets):
"لا إعجابات" (zero) "إعجاب واحد" (one) "إعجابان" (two) "{{count}} إعجابات" (few) "{{count}} إعجابا" (many) "{{count}} إعجاب" (other)
As you see, in the green box the "one" form is used (1 like) In the red box, the "other" form is used while it should be the "two" (2 likes)
1 Mi Piace

I see. The pluralization rules for the client are missing.

In case you want to create a pull request, take a look at this example (of course the pluralization rules for Arabic are different):
https://github.com/discourse/discourse/blob/master/app/assets/javascripts/locales/cs.js.erb

The pluralization rules for the server look fine:

3 Mi Piace

Done! Add Arabic Pluralization Rules for Client by SafaAlfulaij · Pull Request #4423 · discourse/discourse · GitHub
Thanks! :slight_smile:

2 Mi Piace

So, Ping? :innocent: