koha-cvs
[Top][All Lists]
Advanced

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

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


From: Ambrose Li
Subject: [Koha-cvs] CVS: koha/misc/translator text-extract2.pl,1.1,1.2
Date: Thu, 12 Feb 2004 01:02:42 -0800

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

Modified Files:
        text-extract2.pl 
Log Message:
This should be good enough to replace text-extract.pl, but some real
testing is needed.


Index: text-extract2.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/text-extract2.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** text-extract2.pl    12 Feb 2004 08:55:14 -0000      1.1
--- text-extract2.pl    12 Feb 2004 09:02:39 -0000      1.2
***************
*** 8,13 ****
  # This script is meant to be a drop-in replacement of text-extract.pl
  
- # FIXME: Trailing spaces are not yet handled correctly
- 
  use Getopt::Long;
  use strict;
--- 8,11 ----
***************
*** 202,205 ****
--- 200,204 ----
        my($kind, $t, $attr) = @$s; # FIXME
        if ($kind eq KIND_TEXT) {
+           $t =~ s/\s+$//s;
            $text{$t} = 1 if $t =~ /\S/s; # FIXME... trailing whitespace
        } elsif ($kind eq KIND_TAG && %$attr) {
***************
*** 211,214 ****
--- 210,214 ----
                    next if $a eq 'value' && $tag ne 'input';
                    my($key, $val, $val_orig, $order) = @{$attr->{$a}};
+                   $val =~ s/\s+$//s;
                    $text{$val} = 1 if $val =~ /\S/s;
                }
***************
*** 217,221 ****
      }
      for my $t (keys %text) {
!       printf "%s\n", $t unless $t =~ /^(?:\s|\ )*$/;
      }
  }
--- 217,221 ----
      }
      for my $t (keys %text) {
!       printf "%s\n", $t unless $t =~ /^(?:\s|\ )*$/s;
      }
  }




reply via email to

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