1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/config/initializers/locale.rb
Sylvain 7ac119d4cf [bug] invoices are not generated in test/development if the configured locale is composed
Eg. If locale is fr-CA, it was crashing. If locale was only fr, is was working.
Now, composed locales print the watermark using the base locale and
hour_minute format is fetched from the base locale
2021-05-12 17:23:42 +02:00

19 lines
853 B
Ruby

# frozen_string_literal: true
# List of all allowed values for RAILS_LOCALE
I18n.config.available_locales += %i[de de-AT de-CH de-DE
en en-AU en-CA en-GB en-IE en-IN en-NZ en-US en-ZA
fr fa-CA fr-CH fr-CM fr-FR
es es-419 es-AR es-CL es-CO es-CR es-DO es-EC es-ES es-MX es-PA es-PE es-US es-VE
pt pt-BR
zu]
# we allow the Zulu locale (zu) as it is used for In-Context translation
# @see https://support.crowdin.com/in-context-localization/
#
# /!\ ALL locales SHOULD be configured accordingly with the default_locale. /!\
#
I18n.config.default_locale = Rails.application.secrets.rails_locale.to_s.split('-')[0]
I18n.config.locale = Rails.application.secrets.rails_locale