summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-12 16:50:53 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-12 17:03:19 -0400
commit980124ec7348219962ff17ad0d37c4033d552ace (patch)
tree55a0d4dfa86f0afd948efaafea78d9c8c76c0c2f
parent54629073aeb563cc70cc518a83bb9e5462b80531 (diff)
downloadrockbox-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-xtools/voice.pl6
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 {
334 my $correctionsfile = dirname($0) . '/voice-corrections.txt'; 334 my $correctionsfile = dirname($0) . '/voice-corrections.txt';
335 my $id = ''; 335 my $id = '';
336 my $voice = ''; 336 my $voice = '';
337 my $cmd = "genlang -o -t=$target -e=$english $langfile 2>/dev/null"; 337 my $cmd = "genlang -o -t=$target -e=$english $language-update.lang 2>/dev/null";
338 my $pool_file; 338 my $pool_file;
339 open(VOICEFONTIDS, "> voicefontids"); 339 open(VOICEFONTIDS, "> voicefontids");
340 my $i = 0; 340 my $i = 0;
341 local $| = 1; # make progress indicator work reliably 341 local $| = 1; # make progress indicator work reliably
342 342
343 # First run the language through an update pass so any missing strings
344 # are backfilled from English. Without this, BADNESS.
345 system("genlang -u -e=$english $langfile > $language-update.lang");
346
343 my $tts_object = init_tts($tts_engine, $tts_engine_opts, $language); 347 my $tts_object = init_tts($tts_engine, $tts_engine_opts, $language);
344 # add string corrections to tts_object. 348 # add string corrections to tts_object.
345 my @corrects = (); 349 my @corrects = ();