diff options
Diffstat (limited to 'tools/langtool.pl')
-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 59db1cf8a5..72108f42c6 100755 --- a/tools/langtool.pl +++ b/tools/langtool.pl | |||
@@ -176,7 +176,7 @@ foreach my $file (@ARGV) { | |||
176 | } | 176 | } |
177 | 177 | ||
178 | if ($deprecate) { | 178 | if ($deprecate) { |
179 | if ($id ne "" and grep(/$id/, @ids)) { | 179 | if ($id ne "" and grep(/^$id$/, @ids)) { |
180 | # Set desc | 180 | # Set desc |
181 | $line =~ s/\s*desc:.*/ desc: deprecated/; | 181 | $line =~ s/\s*desc:.*/ desc: deprecated/; |
182 | # Set user | 182 | # Set user |
@@ -193,19 +193,19 @@ foreach my $file (@ARGV) { | |||
193 | } | 193 | } |
194 | elsif ($changetarget) { | 194 | elsif ($changetarget) { |
195 | # Change target if set and it's the same as $from | 195 | # Change target if set and it's the same as $from |
196 | if ($id ne "" and grep(/$id/, @ids) and $location =~ /source|dest|voice/ and $target eq $from) { | 196 | if ($id ne "" and grep(/^$id$/, @ids) and $location =~ /source|dest|voice/ and $target eq $from) { |
197 | $line =~ s/\Q$from/$to/; | 197 | $line =~ s/\Q$from/$to/; |
198 | } | 198 | } |
199 | } | 199 | } |
200 | elsif ($changesource) { | 200 | elsif ($changesource) { |
201 | # Change string if $target is set and matches $s_target | 201 | # Change string if $target is set and matches $s_target |
202 | if ($id ne "" and grep(/$id/, @ids) and $target eq $s_target and $location eq "source") { | 202 | if ($id ne "" and grep(/^$id$/, @ids) and $target eq $s_target and $location eq "source") { |
203 | $line =~ s/\Q$string/$to/; | 203 | $line =~ s/\Q$string/$to/; |
204 | } | 204 | } |
205 | } | 205 | } |
206 | elsif ($changedesc) { | 206 | elsif ($changedesc) { |
207 | # Simply change the desc line if the id matches | 207 | # Simply change the desc line if the id matches |
208 | if ($id ne "" and grep(/$id/, @ids)) { | 208 | if ($id ne "" and grep(/^$id$/, @ids)) { |
209 | $line =~ s/\s*desc:.*/ desc: $to/; | 209 | $line =~ s/\s*desc:.*/ desc: $to/; |
210 | } | 210 | } |
211 | } | 211 | } |