mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 07:39:42 +02:00
A script to find strings in audacity.pot to disambiguate
This commit is contained in:
parent
a3d690e473
commit
4d78e656fc
28
locale/find-duplicates.pl
Executable file
28
locale/find-duplicates.pl
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use strict 'vars';
|
||||
|
||||
open(my $fh, "<", "audacity.pot")
|
||||
or die "Can't open < audacity.pot: $!";
|
||||
|
||||
my @sourcelines = ();
|
||||
|
||||
$\ = "\n";
|
||||
|
||||
foreach my $line (<$fh>) {
|
||||
chop $line;
|
||||
my @tokens = split(/ /, $line, 2);
|
||||
if ($tokens[0] eq "#:") {
|
||||
push @sourcelines, split(/ /, $tokens[1]);
|
||||
}
|
||||
elsif ($tokens[0] eq "msgid") {
|
||||
if( @sourcelines > 1) {
|
||||
print;
|
||||
print $tokens[1];
|
||||
foreach my $sourceline (@sourcelines) {
|
||||
print $sourceline;
|
||||
}
|
||||
}
|
||||
@sourcelines = ();
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user