mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
FIX: Allow message format translations to be overridden
This commit is contained in:
@ -110,14 +110,14 @@ module I18n
|
||||
by_site = @overrides_by_site[site] = {}
|
||||
|
||||
# Load overrides
|
||||
translations_overrides = TranslationOverride.where(locale: locale).pluck(:translation_key, :value)
|
||||
translations_overrides = TranslationOverride.where(locale: locale).pluck(:translation_key, :value, :compiled_js)
|
||||
|
||||
if translations_overrides.empty?
|
||||
by_site[locale] = {}
|
||||
else
|
||||
translations_overrides.each do |tuple|
|
||||
by_locale = by_site[locale] ||= {}
|
||||
by_locale[tuple[0]] = tuple[1]
|
||||
by_locale[tuple[0]] = tuple[2] || tuple[1]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user