From e967c09ed77da3a96465c5961a1230c0fce0f273 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Mon, 27 Feb 2012 09:14:06 -0300 Subject: [PATCH] Don't require compiled locales to run --- lib/noosfero/i18n.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) 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