Custom pluralization rule is not working
See original GitHub issueReporting a bug?
Hi, I am trying to use custom pluralization function but it seems it is not working as expected:
The result is:
<p>1 машина</p>
<p>2 машины</p>
<p>4 машины</p>
<p>12 машины</p>
<p>21 машины</p>
Expected behavior
<p>1 машина</p>
<p>2 машины</p>
<p>4 машины</p>
<p>12 машин</p>
<p>21 машина</p>
12 and 21 result is wrong.
Reproduction
https://github.com/RollingTL/Testing-intlify-vue-i18n-next-custom-pluralization
System Info
Mac OS
Screenshot
No response
Additional context
No response
Validations
- Read the Contributing Guidelines
- Read the Documentation
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion
- The provided reproduction is a minimal reproducible example of the bug.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to declare custom Pluralization Rules vue-i18n Vue 3?
I've quickly looked into the sources of vue-i18n and noticed that there are both pluralRules and pluralizationRules with the same type.
Read more >Pluralization | Vue I18n
Custom Pluralization Such pluralization, however, does not apply to all languages (Slavic languages, for example, have different pluralization ...
Read more >Pluralization | Vue I18n
Custom pluralization Such pluralization, however, does not apply to all languages (Slavic languages, for example, have different pluralization ...
Read more >Plural Localization Formatter - Unity - Manual
The Plural Localization Formatter supports cardinal pluralization rules to choose different text. A full list of the plural rules per locale ...
Read more >Intl.PluralRules - JavaScript - MDN Web Docs
Chrome Edge
PluralRules Full support. Chrome63. Toggle history Full support. Edge18. Tog...
PluralRules() constructor Full support. Chrome63. Toggle history Full support. Edge18. Tog...
resolvedOptions Full support....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The problem is still found instead of ‘pluralizationRules’ as in documentation it should be ‘pluralRules’
or change the code to be pluralizationRules
After reading sources I have found the problem Instead of pluralizationRules as in documentation the option should be pluralRules.
It is necessary to change documentation to fit source or source to fit documentation.