Skip to content

Commit

Permalink
Adding comment to configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
andyduong1920 committed Oct 14, 2020
1 parent 5233f9d commit f2e57fb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .template/spec/base/config/environments/production_spec.rb
Expand Up @@ -34,9 +34,14 @@ def mailer_default_url_config

def i18n_config
<<~EOT
config.i18n.available_locales = ENV.fetch('AVAILABLE_LOCALES').split(', ')
# eg: AVAILABLE_LOCALES = 'en,th'
config.i18n.available_locales = ENV.fetch('AVAILABLE_LOCALES').split(',')
# eg: DEFAULT_LOCALE = 'en'
config.i18n.default_locale = ENV.fetch('DEFAULT_LOCALE')
config.i18n.fallbacks = ENV.fetch('FALLBACK_LOCALES').split(', ')
# eg: FALLBACK_LOCALES = 'en,th'
config.i18n.fallbacks = ENV.fetch('FALLBACK_LOCALES').split(',')
EOT
end
end
9 changes: 7 additions & 2 deletions config/environments/production.rb
Expand Up @@ -20,9 +20,14 @@
# Adding the correct fallback configuration along with default locale and available locales
environment do
<<~EOT
config.i18n.available_locales = ENV.fetch('AVAILABLE_LOCALES').split(', ')
# eg: AVAILABLE_LOCALES = 'en,th'
config.i18n.available_locales = ENV.fetch('AVAILABLE_LOCALES').split(',')
# eg: DEFAULT_LOCALE = 'en'
config.i18n.default_locale = ENV.fetch('DEFAULT_LOCALE')
config.i18n.fallbacks = ENV.fetch('FALLBACK_LOCALES').split(', ')
# eg: FALLBACK_LOCALES = 'en,th'
config.i18n.fallbacks = ENV.fetch('FALLBACK_LOCALES').split(',')
EOT
end

0 comments on commit f2e57fb

Please sign in to comment.