mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-29 15:19:44 +02:00
find-duplicates.pl handles multi-line msgids
This commit is contained in:
parent
d8a096ba03
commit
77cce2e1eb
@ -3,13 +3,13 @@
|
||||
use strict 'vars';
|
||||
|
||||
open(my $fh, "<", "audacity.pot")
|
||||
or die "Can't open < audacity.pot: $!";
|
||||
or die "Can't open < audacity.pot: $!";
|
||||
|
||||
my @sourcelines = ();
|
||||
|
||||
$\ = "\n";
|
||||
|
||||
foreach my $line (<$fh>) {
|
||||
while (my $line =<$fh>) {
|
||||
chop $line;
|
||||
my @tokens = split(/ /, $line, 2);
|
||||
if ($tokens[0] eq "#:") {
|
||||
@ -18,7 +18,12 @@ foreach my $line (<$fh>) {
|
||||
elsif ($tokens[0] eq "msgid") {
|
||||
if( @sourcelines > 1) {
|
||||
print;
|
||||
print $tokens[1];
|
||||
my $string = $tokens[1];
|
||||
do {
|
||||
print $string;
|
||||
$string = <$fh>;
|
||||
chop $string;
|
||||
} while $string =~ /^"/;
|
||||
foreach my $sourceline (@sourcelines) {
|
||||
print $sourceline;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user