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

Adding pluralization #44

Merged
merged 1 commit into from
Aug 25, 2016
Merged

Adding pluralization #44

merged 1 commit into from
Aug 25, 2016

Conversation

mochetts
Copy link
Contributor

@mochetts mochetts commented Aug 23, 2016

This adds the pluralization enhancement asked in issue #33.

The idea is the same as Laravel follows. Have a pipe "|" separator to define plurals in each locale.

It should support what was supported so far (as it re-uses the translation functionality from before) plus adding a transformation when pipes are present in the locale and the user calls function $tc or Vue.tc.

So if the locale is
{some_placeholder: 'singular | plural'}

The result of
$tc('some_placeholder, 2)

Would be string 'plural'

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 91.388% when pulling 6a431ec on mmochetti:pluralization into 3e1bf8d on kazupon:dev.

@kazupon
Copy link
Owner

kazupon commented Aug 25, 2016

Awesome !! 💯
Thanks!!

@kazupon kazupon merged commit b5b84d8 into kazupon:dev Aug 25, 2016
@mochetts mochetts deleted the pluralization branch August 26, 2016 16:43
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