DEV: Rails 6 compatability

Without forcing a reload on start internal state in the accelerator can be
off. In Rails 5 not translation is being called so this is not an issue but
in 6 it is called earlier on.
This commit is contained in:
Sam Saffron 2019-04-29 17:12:47 +10:00
parent 1b1cfd4507
commit 3b95f34e7b

View File

@ -6,6 +6,7 @@ require 'i18n/backend/fallback_locale_list'
I18n.backend = I18n::Backend::DiscourseI18n.new
I18n.fallbacks = I18n::Backend::FallbackLocaleList.new
I18n.config.missing_interpolation_argument_handler = proc { throw(:exception) }
I18n.reload!
I18n.init_accelerator!
unless Rails.env.test?