Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions lib/alavetelitheme.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,20 @@ class ActionController::Base
# Tell FastGettext about the theme's translations: look in the theme's
# locale-theme directory for a translation in the first place, and if
# it isn't found, look in the Alaveteli locale directory next:
repos = [
FastGettext::TranslationRepository.build('app',
:path => File.join(File.dirname(__FILE__), '..', 'locale-theme'),
:type => :po),
FastGettext::TranslationRepository.build('app',
:path => 'locale',
:type => :po)
]
repos = [ FastGettext::TranslationRepository.
build('app',
:path => File.join(File.dirname(__FILE__), '..', 'locale-theme'),
:type => :po)
]
if AlaveteliConfiguration::enable_alaveteli_pro
pro_repo = FastGettext::TranslationRepository.build('app',
:path => 'locale_alaveteli_pro',
:type => :po)
repos << pro_repo
end
repos << FastGettext::TranslationRepository.build(
'app',
:path => 'locale',
:type => :po)

AlaveteliLocalization.set_default_text_domain('app', repos)