mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Allow delayed_job to use the locale defined for application
delayed_job requires a different configuration variable for locale than the application. See https://stackoverflow.com/questions/8478597/rails-3-set-i18n-locale-is-not-working for reference
This commit is contained in:
@@ -66,7 +66,8 @@ module Openfoodnetwork
|
||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||
config.i18n.default_locale = ENV["LOCALE"]
|
||||
|
||||
I18n.locale = config.i18n.locale = config.i18n.default_locale
|
||||
|
||||
# Setting this to true causes a performance regression in Rails 3.2.17
|
||||
# When we're on a version with the fix below, we can set it to true
|
||||
# https://github.com/svenfuchs/i18n/issues/230
|
||||
|
||||
Reference in New Issue
Block a user