-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
Access to Gettext.plural_keys #122
Conversation
…an add more mappings than the :en default.
+1 |
This looks great, but would love to see a test for it! |
This branch is way too old and I have already merged it in my master. Shall I close this and open a new one or just apply the patch on the old branch? |
lib/i18n/gettext.rb
Outdated
def plural_keys(locale) | ||
@@plural_keys[locale] || @@plural_keys[:en] | ||
def plural_keys(*args) | ||
args.length == 0 ? @@plural_keys : @@plural_keys[args.first] || @@plural_keys[:en] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
args.empty?
would look better here imo.
98e8d79
to
0cc2cad
Compare
@radar added a test, however all tests with Gemfile.rails* fail with:
|
Should I merge master on this branch or rebase this on top of master? |
@tlatsas Yes please. |
@radar merged master and suite is ok, are we ok in order for you to proceed with the merge to upstream? Thanks 👍 |
LGTM. Thanks for your work on this! |
@radar maybe you should also remove the "waiting" label, cheers |
Allowing Gettext.plural_keys access gives to someone the opportunity to actually do custom mapping of pluralization forms to gettext msgids which currently is broken for all non english-like locales.