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

Update to support pluralizable objects for default string #901

Open
wants to merge 5 commits into
base: canary
Choose a base branch
from

Conversation

guscost-opensea
Copy link

What is the purpose of this pull request? (put an "X" next to item)

[ ] Documentation update
[ ] Bug fix
[x] New feature
[ ] Other, please explain:

What changes did you make? (Give an overview)

Updated the t function to accept a default option that is a pluralizable object. If the object passed as the default contains an other key (and does not contain any keys that are not either in Intl.PluralRules, or an integer), then the default is treated as a plural string, and the t function needs to be passed a count variable to pluralize correctly.

Which issue (if any) does this pull request address?
N/A

Is there anything you'd like reviewers to focus on?

The choice to accept a special object by convention, rather than something totally different like an array of suffixed keys, or something else.

@guscost-opensea guscost-opensea changed the title Pluralize defaults Update to support pluralizable objects for default string Aug 24, 2022
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.

1 participant