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

Default Plural Form Support #61

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

aalmonte
Copy link

@rmariuzzo Please consider this change

Adds a default plural form support for use with locales not listed in getPluralForm function.

By default supports plural forms 0 and 1. This allows to use locales not listed in __getPluralForm function.
@aalmonte aalmonte requested a review from rmariuzzo as a code owner November 29, 2017 15:42
@rmariuzzo
Copy link
Owner

Hey @aalmonte! As I could read you want the default plural form to be the first entry if none was found?

@aalmonte
Copy link
Author

Hi @rmariuzzo not really. This change supports the case in which locale is set to a value not considered in switch cases of __getPluralForm function. In that case the plural form is considered to be the first part of the message for count == 1 and the second for other cases. Also I added a check inside choice function to see if the plural form exists in current message.

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