[Koha-cvs] CVS: koha/misc/translator TmplTokenizer.pm,1.12,1.13

Ambrose C. LI acli at users.sourceforge.net
Fri Feb 20 03:48:42 CET 2004


Update of /cvsroot/koha/koha/misc/translator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv979

Modified Files:
	TmplTokenizer.pm 
Log Message:
Try to not display like 40-line warnings too often


Index: TmplTokenizer.pm
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/TmplTokenizer.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** TmplTokenizer.pm	20 Feb 2004 00:39:26 -0000	1.12
--- TmplTokenizer.pm	20 Feb 2004 02:48:39 -0000	1.13
***************
*** 336,340 ****
  		my($head, $tail, $post) = ($1, $2, $3);
  		if ($tail eq '' && $post =~ $re_tmpl_var) {
! 		    warn_normal "Possible SGML \"closed start tag\" notation: $head<\n", $this->line_number;
  		} else {
  		    ($kind, $it) = (TmplTokenType::TAG, "$head>");
--- 336,342 ----
  		my($head, $tail, $post) = ($1, $2, $3);
  		if ($tail eq '' && $post =~ $re_tmpl_var) {
! 		    # Don't bother to show the warning if we're too confused
! 		    warn_normal "Possible SGML \"closed start tag\" notation: $head<\n", $this->line_number
! 			    if split(/\n/, $head) < 10;
  		} else {
  		    ($kind, $it) = (TmplTokenType::TAG, "$head>");
***************
*** 377,382 ****
  	}
      }
!     warn_normal "Unrecognizable token found: $it\n", $this->line_number_start
! 	    if $kind == TmplTokenType::UNKNOWN;
      return defined $it? (ref $it? $it: TmplToken->new($it, $kind, $this->line_number, $this->filename)): undef;
  }
--- 379,386 ----
  	}
      }
!     warn_normal "Unrecognizable token found: "
! 	    . (split(/\n/, $it) < 10? $it: '(too confused to show details)')
! 	    . "\n", $this->line_number_start
! 	if $kind == TmplTokenType::UNKNOWN;
      return defined $it? (ref $it? $it: TmplToken->new($it, $kind, $this->line_number, $this->filename)): undef;
  }





More information about the Koha-cvs mailing list