Commit ef1148656a61028e5c8cbb939a8f368690f04957

Authored by Diego Camarinha
Committed by Rafael Manzo
1 parent 75e952c4

Resolving conflict on application.rb

config/application.rb
@@ -18,7 +18,8 @@ module Mezuro @@ -18,7 +18,8 @@ module Mezuro
18 18
19 # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. 19 # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
20 config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}').to_s] 20 config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}').to_s]
21 - config.i18n.default_locale = :en 21 + # config.i18n.default_locale = :de
  22 + config.available_locales = ['en', 'pt-BR']
22 config.i18n.enforce_available_locales = true 23 config.i18n.enforce_available_locales = true
23 24
24 # Do not swallow errors in after_commit/after_rollback callbacks. 25 # Do not swallow errors in after_commit/after_rollback callbacks.
spec/controllers/home_controller_spec.rb
@@ -18,7 +18,7 @@ describe HomeController, :type => :controller do @@ -18,7 +18,7 @@ describe HomeController, :type => :controller do
18 it 'should automatically use the language specified in the request headers' do 18 it 'should automatically use the language specified in the request headers' do
19 request.env['HTTP_ACCEPT_LANGUAGE'] = 'pt-BR' 19 request.env['HTTP_ACCEPT_LANGUAGE'] = 'pt-BR'
20 get :index 20 get :index
21 - expect(I18n.locale).to eq(:pt) 21 + expect(I18n.locale).to eq(:"pt-BR")
22 end 22 end
23 23
24 it 'should use a different region if still the best match' do 24 it 'should use a different region if still the best match' do
@@ -28,7 +28,7 @@ describe HomeController, :type => :controller do @@ -28,7 +28,7 @@ describe HomeController, :type => :controller do
28 end 28 end
29 29
30 it 'should use the default language if no available language matches the requested one' do 30 it 'should use the default language if no available language matches the requested one' do
31 - request.env['HTTP_ACCEPT_LANGUAGE'] = 'de' 31 + request.env['HTTP_ACCEPT_LANGUAGE'] = 'la'
32 get :index 32 get :index
33 expect(I18n.locale).to eq(:en) 33 expect(I18n.locale).to eq(:en)
34 end 34 end