summaryrefslogtreecommitdiffstats
path: root/tools
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
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')
-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) {
# print "#!! '$id:$tgt' voice is blank ('$lp{$tgt}' vs '$ep{$tgt}')\n";
$lang{$id}{'voice'}{$tgt} = $english{$id}{'voice'}{$tgt};
} elsif ($lp{$tgt} ne '' && $ep{$tgt} eq '') {
- # If it's not blank, clear it and complain!
- $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is not blank!\n";
- $lang{$id}{'notes'} .= "### the previously used one is commented below:\n";
- $lang{$id}{'notes'} .= "### $english{$id}{voice}{$tgt}\n";
-# print "#!! '$id:$tgt' voice not blank ('$lp{$tgt}' vs '$ep{$tgt}')\n";
- $lang{$id}{'voice'}{$tgt} = $english{$id}{'voice'}{$tgt};
+ if ($id ne 'VOICE_NUMERIC_TENS_SWAP_SEPARATOR') {
+ # If it's not blank, clear it and complain!
+ $lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is not blank!\n";
+ $lang{$id}{'notes'} .= "### the previously used one is commented below:\n";
+ $lang{$id}{'notes'} .= "### $english{$id}{voice}{$tgt}\n";
+ # print "#!! '$id:$tgt' voice not blank ('$lp{$tgt}' vs '$ep{$tgt}')\n";
+ $lang{$id}{'voice'}{$tgt} = $english{$id}{'voice'}{$tgt};
+ }
}
} elsif ($lp{$tgt} ne 'none' && $lp{$tgt} ne '' && not_ignorelist($id) && !$lang{$id}{'new'} && !$ignoredups) {
$lang{$id}{'notes'} .= "### The <voice> section for '$id:$tgt' is identical to english!\n";