summaryrefslogtreecommitdiff
path: root/tools/updatelang
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2021-09-21 19:16:23 -0400
committerSolomon Peachy <pizza@shaftnet.org>2021-09-28 17:25:28 -0400
commit70e72e01d24bd6fe1e9ef15bcf3ceeccb69e2d6b (patch)
tree6952891e98ea47b3b7b2a8d621087bf9b7340b5b /tools/updatelang
parent3cc7509e815787b6f528282b0c14b4b09fa18a05 (diff)
downloadrockbox-70e72e01d24bd6fe1e9ef15bcf3ceeccb69e2d6b.tar.gz
rockbox-70e72e01d24bd6fe1e9ef15bcf3ceeccb69e2d6b.zip
talk: Add support for languages that swap the tens position in numbers
For example, English would say "231" as "two hundred thirty one" but many other languages would say "two hundred one and thirty" So, if VOICE_NUMERIC_TENS_SWAP_SEPARATOR is not an empty string, swap the tens and ones position and use that string ("and" in the above example) as the voiced separator. Change-Id: I69f8064d44b3995827327cabae6ad352bf257d04
Diffstat (limited to 'tools/updatelang')
-rwxr-xr-xtools/updatelang14
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/updatelang b/tools/updatelang
index 48f447d074..bde1dedaea 100755
--- a/tools/updatelang
+++ b/tools/updatelang
@@ -370,12 +370,14 @@ foreach my $id (@langorder) {
370# print "#!! '$id:$tgt' voice is blank ('$lp{$tgt}' vs '$ep{$tgt}')\n"; 370# print "#!! '$id:$tgt' voice is blank ('$lp{$tgt}' vs '$ep{$tgt}')\n";
371 $lang{$id}{'voice'}{$tgt} = $english{$id}{'voice'}{$tgt}; 371 $lang{$id}{'voice'}{$tgt} = $english{$id}{'voice'}{$tgt};
372 } elsif ($lp{$tgt} ne '' && $ep{$tgt} eq '') { 372 } elsif ($lp{$tgt} ne '' && $ep{$tgt} eq '') {
373 # If it's not blank, clear it and complain! 373 if ($id ne 'VOICE_NUMERIC_TENS_SWAP_SEPARATOR') {
374 $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is not blank!\n"; 374 # If it's not blank, clear it and complain!
375 $lang{$id}{'notes'} .= "### the previously used one is commented below:\n"; 375 $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is not blank!\n";
376 $lang{$id}{'notes'} .= "### $english{$id}{voice}{$tgt}\n"; 376 $lang{$id}{'notes'} .= "### the previously used one is commented below:\n";
377# print "#!! '$id:$tgt' voice not blank ('$lp{$tgt}' vs '$ep{$tgt}')\n"; 377 $lang{$id}{'notes'} .= "### $english{$id}{voice}{$tgt}\n";
378 $lang{$id}{'voice'}{$tgt} = $english{$id}{'voice'}{$tgt}; 378 # print "#!! '$id:$tgt' voice not blank ('$lp{$tgt}' vs '$ep{$tgt}')\n";
379 $lang{$id}{'voice'}{$tgt} = $english{$id}{'voice'}{$tgt};
380 }
379 } 381 }
380 } elsif ($lp{$tgt} ne 'none' && $lp{$tgt} ne '' && not_ignorelist($id) && !$lang{$id}{'new'} && !$ignoredups) { 382 } elsif ($lp{$tgt} ne 'none' && $lp{$tgt} ne '' && not_ignorelist($id) && !$lang{$id}{'new'} && !$ignoredups) {
381 $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is identical to english!\n"; 383 $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is identical to english!\n";