mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Ensure that the right locale exists before merging.
This commit is contained in:
@@ -7,7 +7,9 @@ module JsLocaleHelper
|
|||||||
translations = {}
|
translations = {}
|
||||||
|
|
||||||
Dir["#{Rails.root}/plugins/*/config/locales/client.#{locale_str}.yml"].each do |file|
|
Dir["#{Rails.root}/plugins/*/config/locales/client.#{locale_str}.yml"].each do |file|
|
||||||
translations.deep_merge! YAML::load(File.open(file))[locale_str]
|
if plugin_translations = YAML::load(File.open(file))[locale_str]
|
||||||
|
translations.deep_merge!(plugin_translations)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
translations
|
translations
|
||||||
|
|||||||
Reference in New Issue
Block a user