Fix i18n fallback configuration conflicts with environment configurations (#6843)

remotes/1727458204337373841/tmp_refs/heads/signup-info-prompt
Akihiko Odaki 2018-03-21 00:36:20 +09:00 committed by Eugen Rochko
parent 9381a7d9d5
commit 61dcb686a8
2 changed files with 3 additions and 5 deletions

View File

@ -76,9 +76,7 @@ module Mastodon
] ]
config.i18n.default_locale = ENV['DEFAULT_LOCALE']&.to_sym config.i18n.default_locale = ENV['DEFAULT_LOCALE']&.to_sym
if config.i18n.available_locales.include?(config.i18n.default_locale) unless config.i18n.available_locales.include?(config.i18n.default_locale)
config.i18n.fallbacks = [:en]
else
config.i18n.default_locale = :en config.i18n.default_locale = :en
end end

View File

@ -55,8 +55,8 @@ Rails.application.configure do
# config.action_mailer.raise_delivery_errors = false # config.action_mailer.raise_delivery_errors = false
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found). # English when a translation cannot be found).
config.i18n.fallbacks = true config.i18n.fallbacks = [:en]
# Send deprecation notices to registered listeners. # Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify config.active_support.deprecation = :notify