updatelang: Handle/flag the bad data that led to english-us breaking

Change-Id: Ifffea9557d50ab5a103e13473ebe074ae1aa7b6d
This commit is contained in:
Solomon Peachy 2021-03-05 12:42:23 -05:00
parent 0c958d2b4a
commit bac897381c

View file

@ -307,7 +307,7 @@ foreach my $id (@langorder) {
}
}
foreach my $tgt (keys(%ep)) {
if (!defined($lp{$tgt})) {
if (!defined($lp{$tgt}) || ($lp{$tgt} eq 'none')) {
# If it doesn't exist in the language, copy it from English
if ($ep{$tgt} ne 'none' && $ep{$tgt} ne '' ) {
$lang{$id}{'notes'} .= "### The <dest> section for '$id:$tgt' is missing! Copying from english!\n";
@ -356,7 +356,7 @@ foreach my $id (@langorder) {
}
}
foreach my $tgt (keys(%ep)) {
if (!defined($lp{$tgt})) {
if (!defined($lp{$tgt}) || ($lp{$tgt} eq 'none')) {
# If it doesn't exist in the language, copy it from English
if ($ep{$tgt} ne 'none' && $ep{$tgt} ne '' ) {
$lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is missing! Copying from english!\n";