bump the i18n gem to 0.6.0beta1 and update docs for the i18n exception handler [#6739 state:committed]
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
parent
dd44626c7f
commit
a5b0f7064c
@ -21,7 +21,7 @@
|
||||
s.add_dependency('activemodel', version)
|
||||
s.add_dependency('rack-cache', '~> 1.0.0')
|
||||
s.add_dependency('builder', '~> 3.0.0')
|
||||
s.add_dependency('i18n', '~> 0.5.0')
|
||||
s.add_dependency('i18n', '~> 0.6.0beta1')
|
||||
s.add_dependency('rack', '~> 1.2.1')
|
||||
s.add_dependency('rack-test', '~> 0.5.7')
|
||||
s.add_dependency('rack-mount', '~> 0.7.1')
|
||||
|
@ -5,7 +5,7 @@ module I18n
|
||||
class ExceptionHandler
|
||||
include Module.new {
|
||||
def call(exception, locale, key, options)
|
||||
exception.is_a?(MissingTranslationData) ? super.html_safe : super
|
||||
exception.is_a?(MissingTranslation) ? super.html_safe : super
|
||||
end
|
||||
}
|
||||
end
|
||||
@ -17,8 +17,8 @@ module Helpers
|
||||
module TranslationHelper
|
||||
# Delegates to I18n#translate but also performs three additional functions.
|
||||
#
|
||||
# First, it'll pass the :rescue_format => :html option to I18n so that any caught
|
||||
# MissingTranslationData exceptions will be turned into inline spans that
|
||||
# First, it'll pass the :rescue_format => :html option to I18n so that any
|
||||
# thrown MissingTranslation messages will be turned into inline spans that
|
||||
#
|
||||
# * have a "translation-missing" class set,
|
||||
# * contain the missing key as a title attribute and
|
||||
|
@ -19,6 +19,6 @@
|
||||
|
||||
s.add_dependency('activesupport', version)
|
||||
s.add_dependency('builder', '~> 3.0.0')
|
||||
s.add_dependency('i18n', '~> 0.5.0')
|
||||
s.add_dependency('i18n', '~> 0.6.0beta1')
|
||||
s.add_dependency('bcrypt-ruby', '~> 2.1.4')
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user