koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Ambrose C. LI
Subject: [Koha-cvs] CVS: koha/misc/translator TmplTokenizer.pm,1.14,1.15
Date: Thu, 19 Feb 2004 23:10:05 -0800

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]