From 04ca5f7ae8f5faf1db5a9bb390473149c97eb04b Mon Sep 17 00:00:00 2001 From: rgarcia Date: Mon, 31 Oct 2016 11:50:07 +0100 Subject: [PATCH] adds french and brazilian portuguese locales --- config/application.rb | 6 +++--- doc/locales/{fr.yaml => fr.yml} | 0 doc/locales/{pt-br.yaml => pt-br.yml} | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename doc/locales/{fr.yaml => fr.yml} (100%) rename doc/locales/{pt-br.yaml => pt-br.yml} (100%) diff --git a/config/application.rb b/config/application.rb index 2b842992b..0da522fcf 100644 --- a/config/application.rb +++ b/config/application.rb @@ -20,10 +20,11 @@ module Consul # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] config.i18n.default_locale = :es - - config.i18n.available_locales = [:en, :es] + config.i18n.available_locales = [:en, :es, :fr, 'pt-BR'] + config.i18n.fallbacks = {'fr' => 'en', 'pt-br' => 'en'} # Add the new directories to the locales load path + config.i18n.load_path += Dir[Rails.root.join('doc', 'locales', '*.yml')] config.assets.paths << Rails.root.join("app", "assets", "fonts") @@ -44,7 +45,6 @@ module Consul config.autoload_paths << "#{Rails.root}/app/models/custom" config.paths['app/views'].unshift(Rails.root.join('app', 'views', 'custom')) config.i18n.load_path += Dir[Rails.root.join('config', 'locales', 'custom', '*.{rb,yml}')] - end end diff --git a/doc/locales/fr.yaml b/doc/locales/fr.yml similarity index 100% rename from doc/locales/fr.yaml rename to doc/locales/fr.yml diff --git a/doc/locales/pt-br.yaml b/doc/locales/pt-br.yml similarity index 100% rename from doc/locales/pt-br.yaml rename to doc/locales/pt-br.yml