mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-16 17:41:14 +01:00
Update `msgfmt.py` to recent python 3 version. Instruct CMake to load `Gettext.Tools` version `0.21.0.1` when using NuGet. Cleanup `regen_POT_file.sh`. Correct list of languages in `LanguageNames.txt` Cleanup various locale Perl scripts. Make `find-PO-no-Id.sh` use glob file access. Cleanup output of `locale_diagnostics.sh` Cleanup bash scripts and add double-quoting to prevent string issues. Move various locale scripts to `locale/scripts` directory. Signed-off-by: Emily Mabrey <emabrey@tenacityaudio.org>
33 lines
613 B
Perl
33 lines
613 B
Perl
#!/usr/bin/perl
|
|
|
|
use strict 'vars';
|
|
|
|
open(my $fh, "<", "../tenacity.pot") or die "Can't open < ../tenacity.pot: $!";
|
|
|
|
my @sourcelines = ();
|
|
|
|
$\ = "\n";
|
|
|
|
while (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;
|
|
my $string = $tokens[1];
|
|
do {
|
|
print $string;
|
|
$string = <$fh>;
|
|
chop $string;
|
|
} while $string =~ /^"/;
|
|
foreach my $sourceline (@sourcelines) {
|
|
print $sourceline;
|
|
}
|
|
}
|
|
@sourcelines = ();
|
|
}
|
|
}
|