1
0
Fork 0
forked from len0rd/rockbox

voice: Voiced strings for INVALID_VOICE and LANGUAGE_NAME

* Voice generation script will create standalone .talk clips
 * These talk clips will be included in the rockbox .zip file
 * All .voice files will be included in the rockbox .zip file
 * Added LANGUAGE_NAME for all languages in the nightly builds

This way, any voice pack installed will give you a the langauge
voiced in the browser, and if the voice file fails to load you
will get a natively translated error message.

Change-Id: I6b627a51746cd088d6e200666dd326ea2745f55f
This commit is contained in:
Solomon Peachy 2024-06-20 16:54:51 -04:00
parent 8cb8a30f9d
commit e100daf343
16 changed files with 231 additions and 3 deletions

View file

@ -658,6 +658,11 @@ sub buildzip {
# Copy over the Invalid Language fallback stuff
glob_copy("$ROOT/apps/lang/Invalid*.talk", "$temp_dir/langs/");
# Copy over any generated voice/talk clips
glob_copy('Invalid*.talk', "$temp_dir/langs/");
glob_copy('*.lng.talk', "$temp_dir/langs/");
glob_copy('*.voice', "$temp_dir/langs/");
# copy the .lua files
glob_mkdir("$temp_dir/rocks/viewers/lua/");
glob_copy('apps/plugins/lua/*.lua', "$temp_dir/rocks/viewers/lua/");

View file

@ -237,8 +237,14 @@ foreach (@englishorder) {
foreach (@missingorder) {
# print "#!! '$_' missing\n";
push(@langorder, $_);
$lang{$_} = $english{$_};
$lang{$_}{'notes'} .= "### This phrase is missing entirely, copying from english!\n";
if ($_ eq 'VOICE_LANG_NAME') {
$lang{$_} = $english{$_};
$lang{$_}{'voice'}{'*'} = "";
$lang{$_}{'notes'} .= "### This phrase is missing entirely, please fill out\n";
} else {
$lang{$_} = $english{$_};
$lang{$_}{'notes'} .= "### This phrase is missing entirely, copying from english!\n";
}
$lang{$_}{'new'} = 1;
}
undef @missingorder;

View file

@ -511,6 +511,14 @@ sub generateclips {
if (defined($ENV{'POOL'})) {
copy($enc, $pool_file);
}
# Special cases
if ($id eq "VOICE_INVALID_VOICE_FILE") {
copy ($enc, "InvalidVoice_$language.talk");
}
if ($id eq "VOICE_LANG_NAME") {
copy ($enc, "$language.lng.talk");
}
unlink($wav);
}
$voice = "";