diff options
| author | Jonas Häggqvist <rasher@rasher.dk> | 2009-06-21 00:03:41 +0000 |
|---|---|---|
| committer | Jonas Häggqvist <rasher@rasher.dk> | 2009-06-21 00:03:41 +0000 |
| commit | 74bcdcc023015b5006e8a444780ab3ed5784a9e5 (patch) | |
| tree | e3efed1b65b068150491f25da75b787bb6d41819 | |
| parent | 1a98e973fb8b0a4838ae2a819bee94c4ca089060 (diff) | |
| download | rockbox-74bcdcc023015b5006e8a444780ab3ed5784a9e5.zip rockbox-74bcdcc023015b5006e8a444780ab3ed5784a9e5.tar.gz rockbox-74bcdcc023015b5006e8a444780ab3ed5784a9e5.tar.bz2 rockbox-74bcdcc023015b5006e8a444780ab3ed5784a9e5.tar.xz | |
Properly match IDs - require a perfect match, not just a substring match. Oops.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21436 a1c6a512-1295-4272-9138-f99709370657
| -rwxr-xr-x | tools/langtool.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/langtool.pl b/tools/langtool.pl index 59db1cf..72108f4 100755 --- a/tools/langtool.pl +++ b/tools/langtool.pl @@ -176,7 +176,7 @@ foreach my $file (@ARGV) { } if ($deprecate) { - if ($id ne "" and grep(/$id/, @ids)) { + if ($id ne "" and grep(/^$id$/, @ids)) { # Set desc $line =~ s/\s*desc:.*/ desc: deprecated/; # Set user @@ -193,19 +193,19 @@ foreach my $file (@ARGV) { } elsif ($changetarget) { # Change target if set and it's the same as $from - if ($id ne "" and grep(/$id/, @ids) and $location =~ /source|dest|voice/ and $target eq $from) { + if ($id ne "" and grep(/^$id$/, @ids) and $location =~ /source|dest|voice/ and $target eq $from) { $line =~ s/\Q$from/$to/; } } elsif ($changesource) { # Change string if $target is set and matches $s_target - if ($id ne "" and grep(/$id/, @ids) and $target eq $s_target and $location eq "source") { + if ($id ne "" and grep(/^$id$/, @ids) and $target eq $s_target and $location eq "source") { $line =~ s/\Q$string/$to/; } } elsif ($changedesc) { # Simply change the desc line if the id matches - if ($id ne "" and grep(/$id/, @ids)) { + if ($id ne "" and grep(/^$id$/, @ids)) { $line =~ s/\s*desc:.*/ desc: $to/; } } |