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

Add exists? to fallbacks backend #326

Closed
wants to merge 1 commit into from
Closed

Add exists? to fallbacks backend #326

wants to merge 1 commit into from

Conversation

gschlager
Copy link
Contributor

I18n.exists? and I18n.translate should behave the same when the Fallbacks backend is used.

This adds the exists? method to the Fallbacks backend, so that I18n.exists? returns true when the key exists in one of the fallback locales. Up until now it always returns false when the key doesn't exist in the given locale, even though a call to translate would actually return a value.

@radar
Copy link
Collaborator

radar commented Nov 16, 2016

Looks good to me @gschlager. Just waiting on the Travis build to go green.

@radar
Copy link
Collaborator

radar commented Nov 16, 2016

Looks like Travis isn't happy with your branch. I've got one called pr-326 which is up-to-date with the latest master which should make it happy. I'll wait for this one to go green.

@radar
Copy link
Collaborator

radar commented Nov 16, 2016

Just merged pr-326 to master. Thanks @gschlager!

@radar radar closed this Nov 16, 2016
@radar radar added this to the 0.8.0 milestone Nov 16, 2016
@gschlager gschlager deleted the fallbacks branch November 16, 2016 21:42
@toncid
Copy link

toncid commented Mar 29, 2017

Hello, we used to rely on the fact that exists? did not fall back. Is there a workaround for the new behavior?

@radar
Copy link
Collaborator

radar commented Mar 29, 2017

Hi @toncid, please open a new issue regarding this with steps to reproduce the behaviour that you were dependent on and I can take a look.

@toncid
Copy link

toncid commented Mar 30, 2017

Hello @radar, the issue is now reported: #365

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