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

[5.4] Bring the pluralization rules back #17826

Merged
merged 3 commits into from
Feb 8, 2017
Merged

[5.4] Bring the pluralization rules back #17826

merged 3 commits into from
Feb 8, 2017

Conversation

themsaid
Copy link
Member

@themsaid themsaid commented Feb 8, 2017

When we dropped Symfony's Translator in #15563, pluralisation rules for different languages were dropped.

This PR brings the rules back.

*
* @param string $locale
* @param int $number
*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cs

case 'tk':
case 'ur':
case 'zu':
return ($number == 1) ? 0 : 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for brackets

case 'xbr':
case 'ti':
case 'wa':
return (($number == 0) || ($number == 1)) ? 0 : 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

way too many brackets than needed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is copied as is from Symfony's Message Selector.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean the switch statement.

@taylorotwell taylorotwell merged commit a6a805f into laravel:5.4 Feb 8, 2017
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.

3 participants