From d03a71a5e203fc3a44053658f6083f4b2baf07e4 Mon Sep 17 00:00:00 2001 From: acli Date: Mon, 23 Feb 2004 05:51:30 +0000 Subject: [PATCH] More bugs that prevented some strings from being translated properly. This time it's a trimming bug. --- misc/translator/tmpl_process3.pl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/misc/translator/tmpl_process3.pl b/misc/translator/tmpl_process3.pl index 7844806a85..753018dccb 100755 --- a/misc/translator/tmpl_process3.pl +++ b/misc/translator/tmpl_process3.pl @@ -56,9 +56,8 @@ sub text_replace_tag ($$) { next if $a eq 'value' && ($tag ne 'input' || (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; + my $s = find_translation($val); if ($attr->{$a}->[1] ne $s) { #FIXME $attr->{$a}->[1] = $s; # FIXME $attr->{$a}->[2] = ($s =~ /"/s)? "'$s'": "\"$s\""; #FIXME @@ -88,8 +87,7 @@ sub text_replace (**) { last unless defined $s; 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; + print $output find_translation($t); } elsif ($kind eq TmplTokenType::TEXT_PARAMETRIZED) { my $fmt = find_translation($s->form); print $output TmplTokenizer::parametrize($fmt, [ map { -- 2.39.5