languages: Prefer the translated <dest> over a <voice> that is identical to English

A lot of our translations have voice phrases that are identical
to English, even though they are translated in the display text.

In these scenarios, just use the translated text when generating
the voice files.  These will still be flagged as problems by the
translation web site!

Change-Id: I39a9888eaad650e4c847cccc60bd89cf44ae150a
This commit is contained in:
Solomon Peachy 2021-09-29 10:54:10 -04:00
parent 757766e807
commit 5883cb4a52
1 changed files with 7 additions and 1 deletions

View File

@ -388,8 +388,14 @@ foreach my $id (@langorder) {
}
}
} elsif ($lp{$tgt} ne 'none' && $lp{$tgt} ne '' && not_ignorelist($id) && !$lang{$id}{'new'} && !$ignoredups) {
$lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is identical to english!\n";
# print "#!! '$id:$tgt' voice identical ('$lp{$tgt}')\n";
if ($lang{$id}{'dest'}{$tgt} ne '' &&
$lang{$id}{'dest'}{$tgt} ne $english{$id}{'dest'}{$tgt}) {
$lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is identical to english, copying translated <dest>\n";
$lang{$id}{'voice'}{$tgt} = $lang{$id}{'dest'}{$tgt};
} else {
$lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is identical to english!\n";
}
}
}
}