[Koha-cvs] CVS: koha/misc/translator tmpl_process3.pl,1.8,1.9

Ambrose C. LI acli at users.sourceforge.net
Mon Feb 23 06:51:33 CET 2004


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

Modified Files:
	tmpl_process3.pl 
Log Message:
More bugs that prevented some strings from being translated properly.
This time it's a trimming bug.


Index: tmpl_process3.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/tmpl_process3.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** tmpl_process3.pl	23 Feb 2004 04:26:04 -0000	1.8
--- tmpl_process3.pl	23 Feb 2004 05:51:30 -0000	1.9
***************
*** 57,63 ****
  		|| (ref $attr->{'type'} && $attr->{'type'}->[1] =~ /^(?:hidden|radio)$/)); # FIXME
  	    my($key, $val, $val_orig, $order) = @{$attr->{$a}}; #FIXME
- 	    my($pre, $trimmed, $post) = TmplTokenizer::trim $val;
  	    if ($val =~ /\S/s) {
! 		my $s = $pre . find_translation($trimmed) . $post;
  		if ($attr->{$a}->[1] ne $s) { #FIXME
  		    $attr->{$a}->[1] = $s; # FIXME
--- 57,62 ----
  		|| (ref $attr->{'type'} && $attr->{'type'}->[1] =~ /^(?:hidden|radio)$/)); # FIXME
  	    my($key, $val, $val_orig, $order) = @{$attr->{$a}}; #FIXME
  	    if ($val =~ /\S/s) {
! 		my $s = find_translation($val);
  		if ($attr->{$a}->[1] ne $s) { #FIXME
  		    $attr->{$a}->[1] = $s; # FIXME
***************
*** 89,94 ****
  	my($kind, $t, $attr) = ($s->type, $s->string, $s->attributes);
  	if ($kind eq TmplTokenType::TEXT) {
! 	    my($pre, $trimmed, $post) = TmplTokenizer::trim $t;
! 	    print $output $pre, find_translation($trimmed), $post;
  	} elsif ($kind eq TmplTokenType::TEXT_PARAMETRIZED) {
  	    my $fmt = find_translation($s->form);
--- 88,92 ----
  	my($kind, $t, $attr) = ($s->type, $s->string, $s->attributes);
  	if ($kind eq TmplTokenType::TEXT) {
! 	    print $output find_translation($t);
  	} elsif ($kind eq TmplTokenType::TEXT_PARAMETRIZED) {
  	    my $fmt = find_translation($s->form);





More information about the Koha-cvs mailing list