Skip to content

Instantly share code, notes, and snippets.

@romuloceccon
Created December 4, 2013 13:55
Show Gist options
  • Select an option

  • Save romuloceccon/7787758 to your computer and use it in GitHub Desktop.

Select an option

Save romuloceccon/7787758 to your computer and use it in GitHub Desktop.
Minimal Rails 4.0.2 application that reproduces an issue where the I18n::Fallbacks module will raise spuriours I18n::InvalidLocale errors where translating an attribute name that does not exist in the translation file.
require File.expand_path('../boot', __FILE__)
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env)
module A
class Application < Rails::Application
config.i18n.default_locale = "pt-BR"
I18n.enforce_available_locales = true
end
end
pt-BR:
hello: "Olá mundo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment