GRN-86: Change the way the locales are handled (#417)

* Changed the way locales are shown

* Updated the rest of the locales

* Changed the way available_locales are defined

* Updated locales in Russian

* Updated locaales for German
This commit is contained in:
Jesus Federico
2019-03-28 11:02:36 -04:00
committed by GitHub
parent 7474a3c6a0
commit 5ba5b663ac
18 changed files with 30 additions and 819 deletions

View File

@ -2,12 +2,11 @@
# Load available languages.
locales = "#{Rails.root}/config/locales/*"
configured_languages = []
Dir.glob(locales) do |loc|
locales = Dir.glob("#{Rails.root}/config/locales/*")
locales.each do |loc|
configured_languages.push(loc.split('/').last.split('.').first)
end
Rails.configuration.languages = configured_languages
Rails.configuration.i18n.available_locales = configured_languages