2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

FEATURE: support for emoji sets

Added following emoji sets
  - Apple/International
  - Emoji One (default)
  - Android/Google
  - Twitter

FIX: translations from plugins weren't properly merged with default translations
FEATURE: new 'site_setting_changed' event
This commit is contained in:
Régis Hanol 2014-12-11 17:08:47 +01:00
parent 32b52642ab
commit e6e7948617
4398 changed files with 8376 additions and 975 deletions

View file

@ -13,6 +13,7 @@ module JsLocaleHelper
Dir["#{Rails.root}/plugins/*/config/locales/client.#{locale_str}.yml"].each do |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']
@ -22,7 +23,7 @@ module JsLocaleHelper
# For now, let's leave it split out in the translation file in case we want to split
# it again later, so we'll merge the JSON ourselves.
admin_contents = translations[locale_str].delete('admin_js')
translations[locale_str]['js'].merge!(admin_contents) if admin_contents.present?
translations[locale_str]['js'].deep_merge!(admin_contents) if admin_contents.present?
translations[locale_str]['js'].deep_merge!(plugin_translations[locale_str]['admin_js']) if translations[locale_str] && plugin_translations[locale_str] && plugin_translations[locale_str]['admin_js']
message_formats = strip_out_message_formats!(translations[locale_str]['js'])