From 9268c163a9b99d73f643d3dd9f30384a41ba3c4b Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Wed, 2 May 2012 10:54:59 -0300 Subject: [PATCH] Allow translations that miss online documentation --- lib/tasks/doc.rake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/tasks/doc.rake b/lib/tasks/doc.rake index e3cbbe6..54a843f 100644 --- a/lib/tasks/doc.rake +++ b/lib/tasks/doc.rake @@ -123,9 +123,7 @@ namespace :noosfero do task :rebuild => [:clean, :build] def percent_translated(po_file) - if !File.exists?(po_file) - raise "#{po_file}: not found" - end + return 0 unless File.exists?(po_file) output = `LANG=C msgfmt --output /dev/null --statistics #{po_file} 2>&1` puts output translated = (output =~ /([0-9]+) translated messages/) ? $1.to_i : 0 -- libgit2 0.21.2