[Po4a-commits] po4a po4a-translate,1.26,1.27

Martin Quinson po4a-devel@lists.alioth.debian.org
Sun, 15 Aug 2004 06:33:30 +0000


Update of /cvsroot/po4a/po4a
In directory haydn:/tmp/cvs-serv20348

Modified Files:
	po4a-translate 
Log Message:
Increase verbosity when the -v flag is given several times

Index: po4a-translate
===================================================================
RCS file: /cvsroot/po4a/po4a/po4a-translate,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- po4a-translate	14 Aug 2004 14:32:19 -0000	1.26
+++ po4a-translate	15 Aug 2004 06:33:26 -0000	1.27
@@ -175,7 +175,7 @@
 
 Getopt::Long::Configure('no_auto_abbrev','no_ignore_case');
 my ($outfile,$width,$threshold)=('-',80,80);
-my ($help,$help_fmt,$verbose,$debug,@addfiles,$format,@options);
+my ($help,$help_fmt,@verbose,$debug,@addfiles,$format,@options);
 my ($master_filename,$po_filename);
 my ($mastchar,$addchar);
 GetOptions(
@@ -194,7 +194,7 @@
         'option|o=s'    => \@options,
     
 	'width|w=s'     => \$width,
-	'verbose|v'     => \$verbose,
+	'verbose|v'     => \@verbose,
 	'debug|d'       => \$debug,
 	'keep|k=s'      => \$threshold,
     
@@ -214,7 +214,7 @@
 push @masters,$master_filename;
 
 my %options = (
-    "verbose" => $verbose,
+    "verbose" => scalar @verbose,
     "debug" => $debug);
 
 foreach (@options) {
@@ -239,7 +239,7 @@
 
 print STDERR sprintf(gettext("%s is %s%% translated (%s of %s strings)."),
 		     $master_filename,$percent,$hit,$queries)."\n" 
-    if $verbose && ($percent>=$threshold);
+    if (scalar @verbose) && ($percent>=$threshold);
 
 
 if ($percent<$threshold)  {