We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using the example in the documentation with 'car' and 'apple' : https://vue-i18n.intlify.dev/guide/essentials/pluralization.html There is a strange behavior with car when the second argument is 0 (count). Plural is used instead of singular.
The default plural rule with the first ternary operation is bugged if we provide 0 !
function pluralDefault(choice, choicesLength) { choice = Math.abs(choice); if (choicesLength === 2) { // prettier-ignore return choice ? choice > 1 ? 1 : 0 : 1; } return choice ? Math.min(choice, 2) : 0; }
For count from 0 to 1, singular must be used ?
Here a sample of the issue : https://stackblitz.com/edit/vitejs-vite-vow5pz?file=src%2FApp.vue
WSL / Ubuntu / "vue-i18n": "^9.2.2"
No response
The text was updated successfully, but these errors were encountered:
This looks like it is working as intended to me, only 1 can be singular, anything more or less is not singular.
Your example actually demonstrates this well
Using singular for zero amounts would be grammatically incorrect, this probably differs across languages.
Sorry, something went wrong.
Ok I understand, both can be used depending on the context. It's strange, as a French, to see plural with a 0 quantity ! Thank you for your response.
No branches or pull requests
Reporting a bug?
Using the example in the documentation with 'car' and 'apple' : https://vue-i18n.intlify.dev/guide/essentials/pluralization.html
There is a strange behavior with car when the second argument is 0 (count). Plural is used instead of singular.
The default plural rule with the first ternary operation is bugged if we provide 0 !
Expected behavior
For count from 0 to 1, singular must be used ?
Reproduction
Here a sample of the issue : https://stackblitz.com/edit/vitejs-vite-vow5pz?file=src%2FApp.vue
System Info
Screenshot
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: