diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-07-12 16:50:53 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-07-12 17:03:19 -0400 |
commit | 980124ec7348219962ff17ad0d37c4033d552ace (patch) | |
tree | 55a0d4dfa86f0afd948efaafea78d9c8c76c0c2f | |
parent | 54629073aeb563cc70cc518a83bb9e5462b80531 (diff) | |
download | rockbox-980124ec7348219962ff17ad0d37c4033d552ace.tar.gz rockbox-980124ec7348219962ff17ad0d37c4033d552ace.zip |
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
-rwxr-xr-x | tools/voice.pl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/voice.pl b/tools/voice.pl index b05ae86f3e..8e603308f3 100755 --- a/tools/voice.pl +++ b/tools/voice.pl @@ -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 = (); |