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

Fix issue with disabled subtrees and pluralization for KeyValue backend #402

Merged
merged 1 commit into from
Jan 18, 2018

Conversation

fatkodima
Copy link
Contributor

Fixes #325.

The idea behind the fix, roughly speaking: for KeyValue#lookup when value was not found and subtrees are disabled to return some kind of lazy wrapper around possible existing subtree, instead of nil, to check against when searching pluralizations.

I'm not super confident about implementation and possibly this can be done in a better way.

@radar
Copy link
Collaborator

radar commented Jan 16, 2018

I'm happy to accept this patch as-is. If there is a better implementation, then I am sure someone will submit a patch to do it. Thank you @fatkodima.

Also: I think there was just one build on Travis that was breaking (I've since re-run it). If it breaks again, would you mind looking at it and seeing if you could fix it? That would be great :D

@fatkodima
Copy link
Contributor Author

fatkodima commented Jan 16, 2018

@radar ❤️ No problems.

@radar radar merged commit 6636178 into ruby-i18n:master Jan 18, 2018
@fatkodima fatkodima deleted the subtrees-bug branch January 18, 2018 22:27
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.

Doesn't work pluralization with I18n::Backend::KeyValue as i18n backend with disabled subtrees.
2 participants