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>
24 lines
632 B
Perl
24 lines
632 B
Perl
#!/usr/bin/perl
|
|
# Take LangugeNames.txt and write C++ string literals to standard out,
|
|
# which describe the UTF-8 byte sequence using only the basic coding
|
|
# character set.
|
|
# Copy and paste that over the table of strings in src/Languages.cpp.
|
|
|
|
open LANGUAGES, "LanguageNames.txt" or die "Can't open LanguageNames.txt: $!\n";
|
|
while( <LANGUAGES> ) {
|
|
chop;
|
|
print "\"";
|
|
@codes = unpack 'C*';
|
|
@newCodes = ();
|
|
for $code (@codes) {
|
|
if ($code <= ord 'z') {
|
|
push @newCodes, $code;
|
|
}
|
|
else {
|
|
push @newCodes, unpack('C*', sprintf("\\%03o", $code));
|
|
}
|
|
}
|
|
print pack 'C*', @newCodes;
|
|
print "\",\n";
|
|
}
|