Fix FS#12003 'langtool.pl --deprecate is broken'

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29688 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nils Wallménius 2011-04-07 07:50:29 +00:00
parent 0e8e166f25
commit 37990206dd

View file

@ -209,15 +209,9 @@ foreach my $file (@ARGV) {
if ($id ne "" and grep(/^$id$/, @ids)) {
# Set desc
$line =~ s/\s*desc:.*/ desc: deprecated/;
# Set user
$line =~ s/\s*user:.*/ user:/;
# Print an empty target line after opening tag (target isn't set)
if ($location =~ /source|dest|voice/ and $target eq "") {
$line .= " *: none\n";
}
# Do not print target: string lines
elsif ($location =~ /source|dest|voice/ and $target ne "") {
$line = "";
# Leave user field alone
if ($location =~ /source|dest|voice/) {
$line =~ s/".*"/""/;
}
}
}