2015-07-16 00:04:45 +08:00
|
|
|
# order: after 02-freedom_patches.rb
|
|
|
|
|
2015-11-14 04:42:01 +08:00
|
|
|
require 'i18n/backend/discourse_i18n'
|
2018-01-22 21:42:12 +08:00
|
|
|
require 'i18n/backend/fallback_locale_list'
|
|
|
|
|
2015-11-14 04:42:01 +08:00
|
|
|
I18n.backend = I18n::Backend::DiscourseI18n.new
|
2018-01-22 21:42:12 +08:00
|
|
|
I18n.fallbacks = I18n::Backend::FallbackLocaleList.new
|
2015-09-03 03:28:50 +08:00
|
|
|
I18n.config.missing_interpolation_argument_handler = proc { throw(:exception) }
|
2015-11-24 05:45:05 +08:00
|
|
|
I18n.init_accelerator!
|
2015-11-18 05:14:42 +08:00
|
|
|
|
2015-11-24 05:45:05 +08:00
|
|
|
unless Rails.env.test?
|
|
|
|
MessageBus.subscribe("/i18n-flush") { I18n.reload! }
|
|
|
|
end
|