Skip to content

feat: add plural form fallbacks#1237

Open
ajmnz wants to merge 1 commit into
aralroca:canaryfrom
ajmnz:master
Open

feat: add plural form fallbacks#1237
ajmnz wants to merge 1 commit into
aralroca:canaryfrom
ajmnz:master

Conversation

@ajmnz

@ajmnz ajmnz commented Feb 13, 2025

Copy link
Copy Markdown
Contributor

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