Commit 424988e4accd0e25ded0a67a5713446b60f7c4d0
1 parent
0ef46dbf
Exists in
master
and in
15 other branches
gettext.rake: explicitly define locales if po/ is not available
That is the case on the Debian package
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
lib/tasks/gettext.rake
@@ -16,6 +16,11 @@ GetText::Tools::Task.define do |task| | @@ -16,6 +16,11 @@ GetText::Tools::Task.define do |task| | ||
16 | 'public/*.html.erb', | 16 | 'public/*.html.erb', |
17 | 'public/designs/themes/{base,noosfero,profile-base}/*.{rhtml,html.erb}', | 17 | 'public/designs/themes/{base,noosfero,profile-base}/*.{rhtml,html.erb}', |
18 | ].map { |pattern| Dir.glob(pattern) }.flatten | 18 | ].map { |pattern| Dir.glob(pattern) }.flatten |
19 | + | ||
20 | + # installed, no po/ available | ||
21 | + if !File.directory?(task.po_base_directory) | ||
22 | + task.locales = Dir.chdir(task.mo_base_directory) { Dir.glob('*') } | ||
23 | + end | ||
19 | end | 24 | end |
20 | 25 | ||
21 | task 'gettext:mo:update' => :symlinkmo | 26 | task 'gettext:mo:update' => :symlinkmo |