Commit 520d07a0bab50dcac7235c54dd43b5313fe131b7
1 parent
073f57b5
Exists in
master
and in
28 other branches
s/Rails.root + x/Rails.root.join(x)/
Showing
1 changed file
with
5 additions
and
4 deletions
Show diff stats
lib/noosfero/i18n.rb
... | ... | @@ -154,11 +154,12 @@ module ActionController::Caching::Fragments |
154 | 154 | end |
155 | 155 | |
156 | 156 | # translations in place? |
157 | -if File.exists?(Rails.root + '/locale') | |
157 | +locale_dir = Rails.root.join('locale') | |
158 | +if File.exists?(locale_dir) | |
158 | 159 | repos = [ |
159 | - FastGettext::TranslationRepository.build('noosfero', :type => 'mo', :path => Rails.root + '/locale'), | |
160 | - FastGettext::TranslationRepository.build('iso_3166', :type => 'mo', :path => Rails.root + '/locale'), | |
161 | - FastGettext::TranslationRepository.build('rails', :type => 'mo', :path => Rails.root + '/locale'), | |
160 | + FastGettext::TranslationRepository.build('noosfero', :type => 'mo', :path => locale_dir), | |
161 | + FastGettext::TranslationRepository.build('iso_3166', :type => 'mo', :path => locale_dir), | |
162 | + FastGettext::TranslationRepository.build('rails', :type => 'mo', :path => locale_dir), | |
162 | 163 | ] |
163 | 164 | |
164 | 165 | FastGettext.add_text_domain 'noosferofull', :type => :chain, :chain => repos | ... | ... |