Browse Source

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

pull/4/head
Akihiko Odaki 6 years ago
committed by Eugen Rochko
parent
commit
61dcb686a8
2 changed files with 3 additions and 5 deletions
  1. +1
    -3
      config/application.rb
  2. +2
    -2
      config/environments/production.rb

+ 1
- 3
config/application.rb View File

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

+ 2
- 2
config/environments/production.rb View File

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

Loading…
Cancel
Save