summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-06-03 08:23:05 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-06-03 08:23:05 +0000
commitf84e93edfeb50c91e8102b2bd4ec40c898cb08d4 (patch)
treeda2cf4c3e79b8643b57c88f92dead3ed7145d570 /tools
parent2adfd889651a40f523a8001b73c2d448a0c2f52a (diff)
downloadrockbox-f84e93edfeb50c91e8102b2bd4ec40c898cb08d4.tar.gz
rockbox-f84e93edfeb50c91e8102b2bd4ec40c898cb08d4.zip
binlang and genlang couldn't handle deprecated strings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4713 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-xtools/binlang2
-rwxr-xr-xtools/genlang6
2 files changed, 5 insertions, 3 deletions
diff --git a/tools/binlang b/tools/binlang
index 83824e38b3..7cfa562227 100755
--- a/tools/binlang
+++ b/tools/binlang
@@ -70,7 +70,7 @@ while(<ENG>) {
70 70
71 if($value =~ s/^\"(.*)\"\s*$/$1/g) { 71 if($value =~ s/^\"(.*)\"\s*$/$1/g) {
72 # Skip voice-only entries 72 # Skip voice-only entries
73 if(!$value && $set{'voice'}) { 73 if(!$value && $set{'voice'} ne "\"\"") {
74 $idnum{$set{'id'}} = '_done_'; 74 $idnum{$set{'id'}} = '_done_';
75 next; 75 next;
76 } 76 }
diff --git a/tools/genlang b/tools/genlang
index 36d46f1ea6..6032c84899 100755
--- a/tools/genlang
+++ b/tools/genlang
@@ -2,7 +2,7 @@
2 2
3if(!$ARGV[0]) { 3if(!$ARGV[0]) {
4 print <<MOO 4 print <<MOO
5Usage: lang.pl [-p=<prefix>] <language file> 5Usage: genlang [-p=<prefix>] <language file>
6 6
7When running this program. <prefix>.h and <prefix>.c will be created in the 7When running this program. <prefix>.h and <prefix>.c will be created in the
8"current directory". <prefix> is "lang" by default. 8"current directory". <prefix> is "lang" by default.
@@ -77,7 +77,9 @@ while(<LANG>) {
77 $value = $set{'eng'}; 77 $value = $set{'eng'};
78 } 78 }
79# print "VOICE: ".$set{'voice'}." VALUE: $value\n"; 79# print "VOICE: ".$set{'voice'}." VALUE: $value\n";
80 if(($value eq "\"\"") && $set{'voice'}) { 80 # Note: if both entries are "", the string is deprecated,
81 # but must be included to maintain compatibility
82 if(($value eq "\"\"") && $set{'voice'} ne "\"\"") {
81 # voice-only 83 # voice-only
82 push @vfile, $set{'id'}; 84 push @vfile, $set{'id'};
83 } 85 }