diff --git a/lib/noosfero/i18n.rb b/lib/noosfero/i18n.rb index 36449e3..f7b4d2d 100644 --- a/lib/noosfero/i18n.rb +++ b/lib/noosfero/i18n.rb @@ -8,13 +8,12 @@ end # translations in place? locale_dir = Rails.root.join('locale') +repos = [] if File.exists?(locale_dir) - repos = [ - FastGettext::TranslationRepository.build('noosfero', :type => 'mo', :path => locale_dir), - FastGettext::TranslationRepository.build('iso_3166', :type => 'mo', :path => locale_dir), - FastGettext::TranslationRepository.build('rails', :type => 'mo', :path => locale_dir), - ] - - FastGettext.add_text_domain 'noosferofull', :type => :chain, :chain => repos - FastGettext.default_text_domain = 'noosferofull' + repos << FastGettext::TranslationRepository.build('noosfero', :type => 'mo', :path => locale_dir) + repos << FastGettext::TranslationRepository.build('iso_3166', :type => 'mo', :path => locale_dir) + repos << FastGettext::TranslationRepository.build('rails', :type => 'mo', :path => locale_dir) end + +FastGettext.add_text_domain 'noosferofull', :type => :chain, :chain => repos +FastGettext.default_text_domain = 'noosferofull' -- libgit2 0.21.2