Skip to content
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

feat: use Intl.PluralRules for plural keys #43

Merged
merged 2 commits into from
Mar 22, 2024

Conversation

vladimirfilosof
Copy link
Contributor

@vladimirfilosof vladimirfilosof commented Jan 25, 2024

Now plural format can be:

{
	"one": "{{count}} thing",
	"zero": "Nothing found",
	"other": "{{count}} things",
}

src/types.ts Outdated Show resolved Hide resolved
src/plural/general.ts Outdated Show resolved Hide resolved
@dgaponov
Copy link
Collaborator

I did a little refactoring. You can watch and check PR from me #44
The main suggestion is to put the logic of the plural forms in a separate file.

@dgaponov dgaponov changed the title Add object format for plural feat: use Intl.PluralRules for plural keys Mar 20, 2024
@vladimirfilosof vladimirfilosof force-pushed the add-object-format-for-plural branch 2 times, most recently from fe84ac6 to 1ade82e Compare March 21, 2024 15:51
@dgaponov dgaponov force-pushed the add-object-format-for-plural branch 2 times, most recently from 8fc74a5 to 0c64055 Compare March 22, 2024 13:17
@dgaponov dgaponov force-pushed the add-object-format-for-plural branch from 0c64055 to 41e06e4 Compare March 22, 2024 13:37
@vladimirfilosof vladimirfilosof merged commit 1777df6 into main Mar 22, 2024
2 checks passed
@vladimirfilosof vladimirfilosof deleted the add-object-format-for-plural branch March 22, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants