comparison po/stats.pl @ 20637:8cffc806cd7e

Watch for CTRL+C when running stats.pl and exit, rather than making you hit CTRL+C a billion times
author Mark Doliner <mark@kingant.net>
date Tue, 25 Sep 2007 07:08:29 +0000
parents 44b4e8bd759b
children 6d15c55ef3cd
comparison
equal deleted inserted replaced
20636:4604cad304cb 20637:8cffc806cd7e
61 foreach $index (0 .. $#pos) { 61 foreach $index (0 .. $#pos) {
62 $trans = $fuzz = $untrans = 0; 62 $trans = $fuzz = $untrans = 0;
63 $po = $pos[$index]; 63 $po = $pos[$index];
64 print STDERR "$po..." if($ARGV[0] eq '-v'); 64 print STDERR "$po..." if($ARGV[0] eq '-v');
65 system("msgmerge $po.po $PACKAGE.pot -o $po.new 2>/dev/null"); 65 system("msgmerge $po.po $PACKAGE.pot -o $po.new 2>/dev/null");
66 if (($? & 127) == 2) {
67 printf STDERR "Caught keyboard interrupt--exiting\n";
68 exit
69 }
66 $_ = `msgfmt --statistics $po.new -o /dev/null 2>&1`; 70 $_ = `msgfmt --statistics $po.new -o /dev/null 2>&1`;
67 chomp; 71 chomp;
68 if(/(\d+) translated message/) { $trans = $1; } 72 if(/(\d+) translated message/) { $trans = $1; }
69 if(/(\d+) fuzzy translation/) { $fuzz = $1; } 73 if(/(\d+) fuzzy translation/) { $fuzz = $1; }
70 if(/(\d+) untranslated message/) { $untrans = $1; } 74 if(/(\d+) untranslated message/) { $untrans = $1; }