mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
FIX: plugin translations overwrite each other
This commit is contained in:
parent
2d398903c0
commit
ac8203b601
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ module JsLocaleHelper
|
|||
# load plugins translations
|
||||
plugin_translations = {}
|
||||
Dir["#{Rails.root}/plugins/*/config/locales/client.#{locale_str}.yml"].each do |file|
|
||||
plugin_translations.merge! YAML::load(File.open(file))
|
||||
plugin_translations.deep_merge! YAML::load(File.open(file))
|
||||
end
|
||||
# merge translations (plugin translations overwrite default translations)
|
||||
translations[locale_str]['js'].deep_merge!(plugin_translations[locale_str]['js']) if translations[locale_str] && plugin_translations[locale_str] && plugin_translations[locale_str]['js']
|
||||
|
|
Loading…
Reference in a new issue