1
0
Fork 0
forked from len0rd/rockbox

updatelang: Sanity-check the translated LANG_VOICED_DATE_FORMAT

This must be *localized* not translated!

Change-Id: I961eac91356a4b3ba7bba9828df69a08ce273543
This commit is contained in:
Solomon Peachy 2024-04-30 21:26:59 -04:00
parent 6485a489cf
commit 0c0b1b1a6b

View file

@ -363,6 +363,16 @@ foreach my $id (@langorder) {
$lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' is identical to english!\n"; $lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' is identical to english!\n";
# print "#!! '$id:$tgt' dest identical ('$lp{$tgt}')\n"; # print "#!! '$id:$tgt' dest identical ('$lp{$tgt}')\n";
} }
if ($id eq 'LANG_VOICED_DATE_FORMAT') {
my $sane = $lp{$tgt};
$sane =~ tr/YAmd//d;
if (length($sane) != 0) {
$lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' has illegal characters! Restoring from English!\n";
$lang{$id}{'notes'} .= "### the previously used one is commented below:\n";
$lang{$id}{'notes'} .= "### $lang{$id}{dest}{$tgt}\n";
$lang{$id}{'dest'}{$tgt} = $english{$id}{'dest'}{$tgt};
}
}
my $count1 = $ep{$tgt} =~ tr/%//; my $count1 = $ep{$tgt} =~ tr/%//;
my $count2 = $lp{$tgt} =~ tr/%//; my $count2 = $lp{$tgt} =~ tr/%//;
if ($count1 || $count2) { if ($count1 || $count2) {