Hi,

On Wed, Dec 07, 2005 at 09:20:03AM +1100, Brendan O'Dea wrote:
> Package: po4a
> Version: 0.22-1
> Severity: wishlist
> Tags: patch
> 
> --quiet should set $opts{verbose} to 0, rather than -1 to supress
> messages.
> 
> The following patch assumes that the intended behaviour was:
> 
>     po4a      conf    # verbose=1 (default)

I would prefer a less verbose default (0).
The verbose option may be used by the modules and could be really verbose
(unchecked).

I've also put some print under the "unless --quiet" condition.

I intend to commit the attached patch.

Kind Regards,
-- 
Nekral
Index: po4a
===================================================================
RCS file: /cvsroot/po4a/po4a/po4a,v
retrieving revision 1.47
diff -u -r1.47 po4a
--- po4a        27 Nov 2005 16:17:20 -0000      1.47
+++ po4a        7 Dec 2005 22:18:27 -0000
@@ -358,8 +358,8 @@
     ) or pod2usage();
 
     $opts{"verbose"} = scalar @verbose;
-    $opts{"verbose"} =  1 if $opts{"debug"};
-    $opts{"verbose"} = -1 if $opts{"quiet"};
+    $opts{"verbose"} = 0 if $opts{"quiet"};
+    $opts{"verbose"} ||= 1 if $opts{"debug"};
 
     # options to transmit to the modules
     %{$opts{"options"}} = (
@@ -620,7 +620,8 @@
         $potfile->write_if_needed($pot_filename);
     }
 
-    print wrap_msg(gettext(" (%d entries)"), $potfile->count_entries());
+    print wrap_msg(gettext(" (%d entries)"), $potfile->count_entries())
+        unless ($po4a_opts{"quiet"});
 } else {
     $potfile->read($pot_filename);
 }
@@ -651,10 +652,10 @@
            foreach my $master (sort keys %document) {
                my $pot=Locale::Po4a::Po->new();
                my $po=Locale::Po4a::Po->new();
-               print "  $master:";
-               print "(pot)";
+               print "  $master:" unless ($po4a_opts{"quiet"});
+               print "(pot)" unless ($po4a_opts{"quiet"});
                $pot=$potfile->filter("(reference=$master:)");
-               print "(po) ";
+               print "(po) " unless ($po4a_opts{"quiet"});
                $po=$poorig->filter("(reference=$master:)");
                unlink($pot_filename) if -e $pot_filename;
                unlink($po_filename) if -e $po_filename;

Reply via email to