diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-04-30 21:26:59 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-04-30 21:26:59 -0400 |
commit | 0c0b1b1a6bf22c96bde36a3709b47cf853fb521b (patch) | |
tree | e93ad68d930ace49e6d39cc0d1603e5fac50b003 | |
parent | 6485a489cf7f16fc7d6cd5c38ec385c9a6e1d527 (diff) | |
download | rockbox-0c0b1b1a6b.tar.gz rockbox-0c0b1b1a6b.zip |
updatelang: Sanity-check the translated LANG_VOICED_DATE_FORMAT
This must be *localized* not translated!
Change-Id: I961eac91356a4b3ba7bba9828df69a08ce273543
-rwxr-xr-x | tools/updatelang | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/updatelang b/tools/updatelang index aa5578f7f1..7b51831aea 100755 --- a/tools/updatelang +++ b/tools/updatelang @@ -363,6 +363,16 @@ foreach my $id (@langorder) { $lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' is identical to english!\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 $count2 = $lp{$tgt} =~ tr/%//; if ($count1 || $count2) { |