Repository navigation
Access to Gettext.plural_keys - #122
Merged
Merged
Conversation
…an add more mappings than the :en default.
|
+1 |
Collaborator
|
This looks great, but would love to see a test for it! |
Contributor
Author
|
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? |
radar
reviewed
Nov 16, 2016
| 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] |
Collaborator
There was a problem hiding this comment.
args.empty? would look better here imo.
Collaborator
tlatsas
force-pushed
the
gettext_plural_keys_access
branch
from
December 24, 2016 13:22
98e8d79 to
0cc2cad
Compare
Contributor
|
@radar added a test, however all tests with Gemfile.rails* fail with: |
Collaborator
Contributor
|
Should I merge master on this branch or rebase this on top of master? |
Collaborator
|
@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 👍 |
Collaborator
|
LGTM. Thanks for your work on this! |
|
@radar maybe you should also remove the "waiting" label, cheers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.