Browse Source

Actually set treshold values

development
Godwin 9 years ago
parent
commit
63b4287ef3
  1. 6
      config/application.rb
  2. 2
      config/environments/development.rb
  3. 2
      config/environments/preview.rb
  4. 2
      config/environments/production.rb

6
config/application.rb

@ -32,9 +32,15 @@ module BikeBike
if Rails.env == 'development' || Rails.env == 'test'
I18n.config.language_detection_method = I18n::Config::DETECT_LANGUAGE_FROM_URL_PARAM
I18n.config.language_threshold = 1
else
# detect the language using the subdimain
I18n.config.language_detection_method = I18n::Config::DETECT_LANGUAGE_FROM_SUBDOMAIN
if Rails.env == 'preview'
I18n.config.language_threshold = 1
else
I18n.config.language_threshold = 90
end
end
# if we are in our preview environment, set the locale regex to detect the preview- prefix
I18n.config.host_locale_regex = /^preview\-([a-z]{2})\.bikebike\.org$/ if Rails.env == 'preview'

2
config/environments/development.rb

@ -56,6 +56,4 @@ BikeBike::Application.configure do
#config.assets.precompile = false
Paypal.sandbox!
#Paypal.sandbox = false
config.i18n.language_threshold = 1
end

2
config/environments/preview.rb

@ -99,6 +99,4 @@ BikeBike::Application.configure do
}
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true
config.i18n.language_threshold = 1
end

2
config/environments/production.rb

@ -100,6 +100,4 @@ BikeBike::Application.configure do
}
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true
config.i18n.language_threshold = 90
end

Loading…
Cancel
Save