-
-
Notifications
You must be signed in to change notification settings - Fork 861
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⚡ improvement(index): Allow pluralization customization via construct…
…or options (closes #464) (#482) by @Raiondesu * improvement(getChoiceIndex): make getChoiceIndex overridable This provides better pluralization customization. :D * update(docs): fit the new functionality * build(dist): generate dist files * revert(dist): unbuild files to correspond with guidelines * docs(pluralization): fix typo * improvement(test/unit): add test case for custom pluralization * docs(pluralization): remove unnecessary code from new pluralization example * update(types): add types for the new pluralization feature * ⚡improvement(types): remove duplicate type definitions Replace Number and Date format options with standard TS `Intl` types. * ⚡improvement(tests): Let types allow to pass getChoiceIndex into options * ⚡improvement(index): Set getChoiceIndex for current instance from opts Fixes #464 * 🐛fix(types): fix type aliases for format options * ⚡improvement(index): allow to pass a pluralization rules map instead Fixes #464 * 📃docs(api): fix md typo * ⚡improvement(types/flow): add `pluralizationRules` to the instance types * 📃docs(pluralization): add the documentation for #464 functionality * 📃docs(pluralization): fix typo * ⭐️new(test): add a test case for #464 * 📃docs(pluralization): improve custom pluralization definitions * ⭐new(test): add a test for backward compatibility with #451 and 8.4.0 * improvement(index): apply the pluralization rule to the instance For better extensibility. * 📃docs(api): improve `pluralizationRules` property definition * docs(pluralization): fix jsdoc comment misplacement * Revert "⚡improvement(types): remove duplicate type definitions" This reverts commit 286bc2e. * ⚡revert(types): Bring back original VueI18n aliases for format options
- Loading branch information
Showing
6 changed files
with
251 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.