-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Translation] Improve the pluralization rule for French #16256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We now use Symfony's Translation component. Yay! We get more powerful pluralisation and better a fallback mechanism. Will want to implement the caching mechanism at some point too. The API is replicated in JavaScript, which could definitely use some testing. Validators have been refactored so that they are decoupled from models completely (i.e. they simply validate arrays of user input). Language packs should include Laravel's validation messages. ref #267
Hi,
|
I see you closed it, but what's about |
CLDR pluralization rules only support non-negative integers. And this is logical: language pluralization rules are based on a quantity, which cannot be negative or non-integer. So there is no way to pass such value in a pluralization rule selector and have it give you a meaningful value. |
Okay, thanks for the explaination! :) |
It should not! As @ghost explained, 1.5 is singular in French, plural in English, so you can't have both working if you force the integer cast, remove this typing please: @fabpot There is still a linguistic bug about decimal, this should be re-open and decimal numbers should be properly handled in different languages groups according to language plural rule, not truncated for every language. |
The current pluralization rule for French is not exactly right. Numbers like negatives (like -4) and decimals of 1 (like 1.78) should also be considered as singulars, not plurals. Correct me if I'm wrong, but the current rule sets only 0, decimals of 0, and 1, as singulars, and the rest as plurals.
Something like that is better:
(Sorry, I'm not a coder, so I can't really provide the appropriate patch myself)
The text was updated successfully, but these errors were encountered: