Merge remote branch 'ed0h/i18n-fallbacks'

Conflicts:
	pkg/ubuntu/dist
This commit is contained in:
Raphael 2010-11-01 15:57:43 -07:00
commit 377cae8cba
2 changed files with 5 additions and 2 deletions

View file

@ -35,7 +35,6 @@ class ApplicationController < ActionController::Base
end
def set_locale
I18n.default_locale = DEFAULT_LANGUAGE
if current_user
I18n.locale = current_user.language
else

View file

@ -4,4 +4,8 @@
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
I18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')]
I18n.default_locale = :en
I18n.default_locale = DEFAULT_LANGUAGE
I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
AVAILABLE_LANGUAGE_CODES.each do |c|
I18n.fallbacks[c.to_sym] = [c.to_sym, DEFAULT_LANGUAGE.to_sym, :en]
end