raise exception on missing translations in test and dev environment

This commit is contained in:
Taylor Griffin committed 2014-09-18 06:24:59 +10:00
1 parent f355c393f0
commit 87df8661c7
1 file changed
+6
+6
View File
@@ -1,2 +1,8 @@
I18n.load_path += Dir[Rails.root.join('config', 'locales', '*.{rb,yml}')]
if Rails.env.development? || Rails.env.test?
I18n.exception_handler = lambda do |exception, locale, key, options|
raise "Missing translation: #{key}"
end
end