[Koha-cvs] CVS: koha/misc/translator text-extract2.pl,1.9,1.10

Ambrose Li acli at users.sourceforge.net
Fri Feb 13 01:42:54 CET 2004


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

Modified Files:
	text-extract2.pl 
Log Message:
Seems like I wasn't careful enough recognizing unknown tokens.  Incomplete
tags like "<b foo" at the end of the file seems to be discarded silently by
Mozilla, even in quirks mode. We now display a warning for these (in case
these ever come up by accident).


Index: text-extract2.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/text-extract2.pl,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** text-extract2.pl	12 Feb 2004 18:25:43 -0000	1.9
--- text-extract2.pl	13 Feb 2004 00:42:52 -0000	1.10
***************
*** 142,148 ****
  	    $kind = KIND_DIRECTIVE;
  	}
! 	($kind, $it) = (KIND_UNKNOWN, $readahead)
! 		if !$ok_p && $eof_p && !length $readahead;
      }
      return defined $it? (wantarray? ($kind, $it):
  				    [$kind, $it]): undef;
--- 142,152 ----
  	    $kind = KIND_DIRECTIVE;
  	}
! 	if (!$ok_p && $eof_p) {
! 	    ($kind, $it, $readahead) = (KIND_UNKNOWN, $readahead, undef);
! 	    $syntaxerror_p = 1;
! 	}
      }
+     warn "Warning: Unrecognizable token found in line $lc_0: $it\n"
+ 	    if $kind eq KIND_UNKNOWN;
      return defined $it? (wantarray? ($kind, $it):
  				    [$kind, $it]): undef;





More information about the Koha-cvs mailing list