summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2004-04-03 20:52:24 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2004-04-03 20:52:24 +0000
commitf9495cba65c108ac99759cf3a0b978c0a58c9233 (patch)
tree9350c3f0c791772a1f3cd1d2eda61dbda9a2a443 /tools
parent5248641b40d1a49545b61b61d269eb40c1ccf0ce (diff)
downloadrockbox-f9495cba65c108ac99759cf3a0b978c0a58c9233.tar.gz
rockbox-f9495cba65c108ac99759cf3a0b978c0a58c9233.tar.bz2
rockbox-f9495cba65c108ac99759cf3a0b978c0a58c9233.zip
Changed concept for voice IDs: the voice-only IDs now are in a separate range, don't generate an empty language string. This saves memory, but requires a new voice file format with 2 tables.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4463 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-xtools/genlang23
1 files changed, 20 insertions, 3 deletions
diff --git a/tools/genlang b/tools/genlang
index de9dd43920..fd0b498813 100755
--- a/tools/genlang
+++ b/tools/genlang
@@ -62,6 +62,7 @@ while(<LANG>) {
$set{$var} = $value;
if( (($var eq "new") && $value && ($value !~ /^\"(.*)\"\W*$/)) ||
+ (($var eq "voice") && $value && ($value !~ /^\"(.*)\"\W*$/)) ||
(($var eq "eng") && ($value !~ /^\"(.*)\"\W*$/)) ) {
print "$input:$line:missing quotes for ".$set{'id'}."\n";
$errors++;
@@ -75,9 +76,15 @@ while(<LANG>) {
# if not set, get the english version
$value = $set{'eng'};
}
-
- print HFILE " ".$set{'id'}.",\n";
- print CFILE " $value,\n";
+# print "VOICE: ".$set{'voice'}." VALUE: $value\n";
+ if(($value eq "\"\"") && $set{'voice'}) {
+ # voice-only
+ push @vfile, $set{'id'};
+ }
+ else {
+ push @hfile, $set{'id'};
+ print CFILE " $value,\n";
+ }
undef %set;
}
@@ -87,6 +94,16 @@ while(<LANG>) {
}
close(LANG);
+for(@hfile) {
+ print HFILE " $_,\n";
+}
+
+print HFILE " /* --- below this follows voice-only strings --- */\n",
+ " VOICEONLY_DELIMITER = 0x8000,\n";
+
+for(@vfile) {
+ print HFILE " $_,\n";
+}
print HFILE <<MOO
LANG_LAST_INDEX_IN_ARRAY /* this is not a string, this is a marker */