Fix broken specs.

This commit is contained in:
Guo Xiang Tan
2017-07-11 13:16:48 +09:00
parent b605d5d61b
commit 45f4ce379e
2 changed files with 4 additions and 2 deletions

View File

@ -72,9 +72,11 @@ module I18n
# the original translations before applying our overrides.
def lookup(locale, key, scope = [], options = {})
existing_translations = super(locale, key, scope, options)
return existing_translations if scope.is_a?(Array) && scope.include?(:models)
overrides = options.dig(:overrides, locale)
if overrides && !scope&.include?(:models)
if overrides
if existing_translations && options[:count]
remapped_translations =
if existing_translations.is_a?(Hash)