mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: admin locales were not getting converted to message format
This commit is contained in:
@@ -100,15 +100,16 @@ module JsLocaleHelper
|
||||
locale_str = locale.to_s
|
||||
translations = Marshal.load(Marshal.dump(translations_for(locale_str)))
|
||||
|
||||
message_formats = strip_out_message_formats!(translations[locale_str]['js'])
|
||||
message_formats.merge!(strip_out_message_formats!(translations[locale_str]['admin_js']))
|
||||
result = generate_message_format(message_formats, locale_str)
|
||||
|
||||
translations.keys.each do |locale|
|
||||
translations[locale].keys.each do |k|
|
||||
translations[locale].delete(k) unless k == "js"
|
||||
end
|
||||
end
|
||||
|
||||
message_formats = strip_out_message_formats!(translations[locale_str]['js'])
|
||||
result = generate_message_format(message_formats, locale_str)
|
||||
|
||||
# I18n
|
||||
result << "I18n.translations = #{translations.to_json};\n"
|
||||
result << "I18n.locale = '#{locale_str}';\n"
|
||||
|
Reference in New Issue
Block a user