[Koha-cvs] CVS: koha/misc/translator TmplTokenizer.pm,1.14,1.15

Ambrose C. LI acli at users.sourceforge.net
Fri Feb 20 08:10:05 CET 2004


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

Modified Files:
	TmplTokenizer.pm 
Log Message:
Partially allow combination of several TEXT tokens. It seems that this
gives better strings. (Always allowing combinations gives havoc, we
currently avoid this by allowing combination only if the first and last
tokens are both TEXT.)


Index: TmplTokenizer.pm
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/TmplTokenizer.pm,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** TmplTokenizer.pm	20 Feb 2004 04:38:02 -0000	1.14
--- TmplTokenizer.pm	20 Feb 2004 07:09:47 -0000	1.15
***************
*** 491,498 ****
  		$it->set_form( $form );
  		$it->set_children( @structure );
! #	    } elsif ($nonblank_text_p) {
! #		# Combine the strings
! #		my $string = join('', map { $_->string } @structure);
! #		;
  	    } else {
  		# Requeue the tokens thus seen for re-emitting
--- 491,498 ----
  		$it->set_form( $form );
  		$it->set_children( @structure );
! 	    } elsif ($nonblank_text_p && $structure[0]->type == TmplTokenType::TEXT && $structure[$#structure]->type == TmplTokenType::TEXT) {
! 		# Combine the strings
! 		my $string = join('', map { $_->string } @structure);
! 		$it = TmplToken->new($string, TmplTokenType::TEXT, $it->line_number, $it->pathname);;
  	    } else {
  		# Requeue the tokens thus seen for re-emitting





More information about the Koha-cvs mailing list