Skip to content

Commit

Permalink
fix i18n fallback to default locale when no options hash
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed May 13, 2010
1 parent f47250f commit 69ec39d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# set default locale (Eglish) to be a fallback for missing translations
I18n.exception_handler = lambda do |e, locale, key, options|
if I18n::MissingTranslationData === e and locale != I18n.default_locale
I18n.translate(key, options.update(:locale => I18n.default_locale, :raise => true))
I18n.translate(key, (options || {}).update(:locale => I18n.default_locale, :raise => true))
else
raise e
end
Expand Down

0 comments on commit 69ec39d

Please sign in to comment.