[Po4a-devel][CVS] po4a/lib/Locale/Po4a Sgml.pm,1.23,1.24

Martin Quinson po4a-devel@lists.alioth.debian.org
Fri, 16 Jul 2004 04:12:00 +0000


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv12397/lib/Locale/Po4a

Modified Files:
	Sgml.pm 
Log Message:
Implement a quiet mode

Index: Sgml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Sgml.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- Sgml.pm	14 Jul 2004 19:08:03 -0000	1.23
+++ Sgml.pm	16 Jul 2004 04:11:58 -0000	1.24
@@ -235,13 +235,15 @@
     # don't translate entries composed of one entity
     if ( (($string =~ /^&[^;]*;$/) || ($options{'wrap'} && $string =~ /^\s*&[^;]*;\s*$/))
 	 && !($self->{options}{'include-all'}) ){
-	warn sprintf(gettext("po4a::sgml: msgid skipped to help translators (contains only an entity)"), $string)."\n";
+	warn sprintf(gettext("po4a::sgml: msgid skipped to help translators (contains only an entity)"), $string)."\n"
+	       unless $self->verbose() <= 0;
 	return $string;
     }
     # don't translate entries composed of tags only
     if ( $string =~ /^(((<[^>]*>)|\s)*)$/
 	 && !($self->{options}{'include-all'}) ) {
-	warn sprintf(gettext("po4a::sgml: msgid skipped to help translators (contains only tags)"), $string)."\n";
+	warn sprintf(gettext("po4a::sgml: msgid skipped to help translators (contains only tags)"), $string)."\n"
+	       unless $self->verbose() <= 0;
 	return $string;
     }
 
@@ -295,7 +297,8 @@
 	warn sprintf(gettext(
 		"po4a::sgml: Trying to handle a XML document as a SGML one.\n".
 		"po4a::sgml: Feel lucky if it works, help us implementing a proper XML\n".
-		"po4a::sgml: backend if it does not."),$filename)."\n";
+		"po4a::sgml: backend if it does not."),$filename)."\n"
+	  unless $self->verbose() <= 0;
 	$xmlprolog=$1;
     }
     # Get the prolog