提交 4c0bfdd8 编写于 作者: A Akira Matsuda 提交者: Jean Boussier

I18n.translate takes kwargs options

上级 6d12d9d7
......@@ -161,12 +161,12 @@ def i18n_format_options
options
end
def translate_number_value_with_default(key, i18n_options = {})
I18n.translate(key, { default: default_value(key), scope: :number }.merge!(i18n_options))
def translate_number_value_with_default(key, **i18n_options)
I18n.translate(key, **{default: default_value(key), scope: :number}.merge!(i18n_options))
end
def translate_in_locale(key, i18n_options = {})
translate_number_value_with_default(key, { locale: options[:locale] }.merge(i18n_options))
def translate_in_locale(key, **i18n_options)
translate_number_value_with_default(key, **{locale: options[:locale]}.merge(i18n_options))
end
def default_value(key)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册