mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Translation should return overrides first before attempting to fallback.
https://meta.discourse.org/t/errors-after-migrating-to-a-new-version-1-9-0-beta3/65709/14?u=tgxworld
This commit is contained in:
@@ -74,9 +74,8 @@ module I18n
|
||||
existing_translations = super(locale, key, scope, options)
|
||||
overrides = options.dig(:overrides, locale)
|
||||
|
||||
if overrides && existing_translations
|
||||
if options[:count]
|
||||
|
||||
if overrides && !scope&.include?(:models)
|
||||
if existing_translations && options[:count]
|
||||
remapped_translations =
|
||||
if existing_translations.is_a?(Hash)
|
||||
Hash[existing_translations.map { |k, v| ["#{key}.#{k}", v] }]
|
||||
|
||||
Reference in New Issue
Block a user