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: add plural form fallbacks #1237

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ajmnz
Copy link
Contributor

@ajmnz ajmnz commented Feb 13, 2025

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)

Added a new configuration option at plurals.fallbackForm to specify a default fallback plural form.

When the source language doesn't utilize all available plural forms, you either have to duplicate keys for the unused forms or risk missing translations when adding a language with additional plural forms.

For example, Catalan uses one and other, while Romanian has one, few, and other. This feature allows setting a fallback form (e.g., other), ensuring that in this case, few resolves to other.

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

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

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