diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2004-06-03 08:23:05 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2004-06-03 08:23:05 +0000 |
| commit | f84e93edfeb50c91e8102b2bd4ec40c898cb08d4 (patch) | |
| tree | da2cf4c3e79b8643b57c88f92dead3ed7145d570 /tools | |
| parent | 2adfd889651a40f523a8001b73c2d448a0c2f52a (diff) | |
| download | rockbox-f84e93edfeb50c91e8102b2bd4ec40c898cb08d4.zip rockbox-f84e93edfeb50c91e8102b2bd4ec40c898cb08d4.tar.gz rockbox-f84e93edfeb50c91e8102b2bd4ec40c898cb08d4.tar.bz2 rockbox-f84e93edfeb50c91e8102b2bd4ec40c898cb08d4.tar.xz | |
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-x | tools/binlang | 2 | ||||
| -rwxr-xr-x | tools/genlang | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/tools/binlang b/tools/binlang index 83824e3..7cfa562 100755 --- a/tools/binlang +++ b/tools/binlang @@ -70,7 +70,7 @@ while(<ENG>) { if($value =~ s/^\"(.*)\"\s*$/$1/g) { # Skip voice-only entries - if(!$value && $set{'voice'}) { + if(!$value && $set{'voice'} ne "\"\"") { $idnum{$set{'id'}} = '_done_'; next; } diff --git a/tools/genlang b/tools/genlang index 36d46f1..6032c84 100755 --- a/tools/genlang +++ b/tools/genlang @@ -2,7 +2,7 @@ if(!$ARGV[0]) { print <<MOO -Usage: lang.pl [-p=<prefix>] <language file> +Usage: genlang [-p=<prefix>] <language file> When running this program. <prefix>.h and <prefix>.c will be created in the "current directory". <prefix> is "lang" by default. @@ -77,7 +77,9 @@ while(<LANG>) { $value = $set{'eng'}; } # print "VOICE: ".$set{'voice'}." VALUE: $value\n"; - if(($value eq "\"\"") && $set{'voice'}) { + # Note: if both entries are "", the string is deprecated, + # but must be included to maintain compatibility + if(($value eq "\"\"") && $set{'voice'} ne "\"\"") { # voice-only push @vfile, $set{'id'}; } |