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 error when including Fallbacks on non-Simple backend #260

Merged

Commits on May 29, 2014

  1. Fix error when including Fallbacks on non-Simple backend

    Commit 12aa0f0 introduced a bug, where
    if `Fallbacks` module is included in a class that doesnt define
    `translations` the code would fail. This is a pretty common
    scenario, for instance when the backend is a `Chain`. Also this was
    pretty common case to fail in rails, as its include Fallbacks in the
    I18n.backend, like this:
    ```
    I18n.backend.class.send(:include, I18n::Backend::Fallbacks)
    ```
    
    This stops using the `translations` method in the fallbacks, and instead
    ignores `I18n::InvalidLocale` errors.
    
    [fixes ruby-i18n#238]
    [fixes ruby-i18n#258]
    [fixes ruby-i18n#259]
    arthurnn committed May 29, 2014
    Configuration menu
    Copy the full SHA
    f4d1d8f View commit details
    Browse the repository at this point in the history