Commit bdf1aef929e059845d7b2a6f5dab991efad6d9ae
1 parent
fa6244fc
Exists in
staging
and in
26 other branches
Displaying doc translation progress with dots
Everybody loves dots. This way the upgrade process gets less verbose, and we can actually follow what's going on.
Showing
1 changed file
with
11 additions
and
1 deletions
Show diff stats
lib/tasks/doc.rake
... | ... | @@ -103,10 +103,20 @@ namespace :noosfero do |
103 | 103 | languages.each do |lang| |
104 | 104 | po = "po/#{lang}/noosfero-doc.po" |
105 | 105 | if File.exists?(po) |
106 | + puts "Translating: #{lang}" | |
106 | 107 | Dir['doc/noosfero/**/*.en.xhtml'].each do |doc| |
107 | 108 | target = doc.sub('.en.xhtml', ".#{lang}.xhtml") |
108 | - sh "po4a-translate -f xhtml -M utf8 -m #{doc} -p #{po} -L utf8 -l #{target} >/dev/null 2>&1" | |
109 | + command = "po4a-translate -f xhtml -M utf8 -m #{doc} -p #{po} -L utf8 -l #{target} >/dev/null 2>&1" | |
110 | + unless system(command) | |
111 | + puts "Failed in #{lang} translation!" | |
112 | + puts "Run the command manually to check:" | |
113 | + puts "$ #{command}" | |
114 | + raise "Failed." | |
115 | + end | |
116 | + print "." | |
117 | + $stdout.flush | |
109 | 118 | end |
119 | + puts | |
110 | 120 | end |
111 | 121 | end |
112 | 122 | end | ... | ... |