From f2e57fb89e3449810d80ac0a93a42a45e892d09e Mon Sep 17 00:00:00 2001 From: An Duong Date: Wed, 14 Oct 2020 10:23:04 +0700 Subject: [PATCH] Adding comment to configuration --- .../spec/base/config/environments/production_spec.rb | 9 +++++++-- config/environments/production.rb | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.template/spec/base/config/environments/production_spec.rb b/.template/spec/base/config/environments/production_spec.rb index 094048ef..9a1d71a0 100644 --- a/.template/spec/base/config/environments/production_spec.rb +++ b/.template/spec/base/config/environments/production_spec.rb @@ -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 diff --git a/config/environments/production.rb b/config/environments/production.rb index d2415baf..92555b19 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -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