Skip to content

Commit

Permalink
Add default value for AVAILABLE_LOCALES
Browse files Browse the repository at this point in the history
  • Loading branch information
sanG-github committed Apr 12, 2024
1 parent 85249fc commit 09f8639
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .template/spec/base/config/environments/production_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ def mailer_default_url_config
def i18n_config
<<~RUBY
# eg: AVAILABLE_LOCALES = 'en,th'
config.i18n.available_locales = ENV.fetch('AVAILABLE_LOCALES').split(',')
config.i18n.available_locales = ENV.fetch('AVAILABLE_LOCALES', 'en').split(',')
# eg: DEFAULT_LOCALE = 'en'
config.i18n.default_locale = ENV.fetch('DEFAULT_LOCALE')
config.i18n.default_locale = ENV.fetch('DEFAULT_LOCALE', 'en')
# eg: FALLBACK_LOCALES = 'en,th'
config.i18n.fallbacks = ENV.fetch('FALLBACK_LOCALES').split(',')
config.i18n.fallbacks = ENV.fetch('FALLBACK_LOCALES', 'en').split(',')
RUBY
end
end
6 changes: 3 additions & 3 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
environment do
<<~RUBY
# eg: AVAILABLE_LOCALES = 'en,th'
config.i18n.available_locales = ENV.fetch('AVAILABLE_LOCALES').split(',')
config.i18n.available_locales = ENV.fetch('AVAILABLE_LOCALES', 'en').split(',')
# eg: DEFAULT_LOCALE = 'en'
config.i18n.default_locale = ENV.fetch('DEFAULT_LOCALE')
config.i18n.default_locale = ENV.fetch('DEFAULT_LOCALE', 'en')
# eg: FALLBACK_LOCALES = 'en,th'
config.i18n.fallbacks = ENV.fetch('FALLBACK_LOCALES').split(',')
config.i18n.fallbacks = ENV.fetch('FALLBACK_LOCALES', 'en').split(',')
RUBY
end

0 comments on commit 09f8639

Please sign in to comment.