1
0
Fork 0
forked from len0rd/rockbox

voice: Ensure there are no missing strings when generating the voicelist.

If the translation is not 100% complete, we need to make sure anything
missing is copied from English so there won't be any gaps in the voice
files.

(This behavior is similar to what we do for the regular binary lang files)

Change-Id: I5fd2a50d08317eb8445926145a74a38033e0ebcc
This commit is contained in:
Solomon Peachy 2020-07-12 16:50:53 -04:00
parent 54629073ae
commit 980124ec73

View file

@ -334,12 +334,16 @@ sub generateclips {
my $correctionsfile = dirname($0) . '/voice-corrections.txt';
my $id = '';
my $voice = '';
my $cmd = "genlang -o -t=$target -e=$english $langfile 2>/dev/null";
my $cmd = "genlang -o -t=$target -e=$english $language-update.lang 2>/dev/null";
my $pool_file;
open(VOICEFONTIDS, "> voicefontids");
my $i = 0;
local $| = 1; # make progress indicator work reliably
# First run the language through an update pass so any missing strings
# are backfilled from English. Without this, BADNESS.
system("genlang -u -e=$english $langfile > $language-update.lang");
my $tts_object = init_tts($tts_engine, $tts_engine_opts, $language);
# add string corrections to tts_object.
my @corrects = ();