diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-08-02 22:09:00 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-08-02 22:09:00 +0000 |
commit | a12c591ac3bcd4670332d5fe3230f1edbe6c3310 (patch) | |
tree | 45de162551d4dc51627e585cee3b3bd3741a8629 /tools | |
parent | 7a62bb04d8abeedc237baaec51503d1180e2d93d (diff) | |
download | rockbox-a12c591ac3bcd4670332d5fe3230f1edbe6c3310.tar.gz rockbox-a12c591ac3bcd4670332d5fe3230f1edbe6c3310.zip |
when generating binary output, we now let the master language file properly
dictate when a certain phrase doesn't exist and should be ignored in the
output
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14150 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/genlang | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/genlang b/tools/genlang index f2a0706930..f213057a3c 100755 --- a/tools/genlang +++ b/tools/genlang | |||
@@ -206,7 +206,7 @@ if($english) { | |||
206 | # Assign an ID number to this entry | 206 | # Assign an ID number to this entry |
207 | $idmap{$id}=$idnum; | 207 | $idmap{$id}=$idnum; |
208 | $idnum++; | 208 | $idnum++; |
209 | print STDERR "DEST: bumped idnum to $idnum\n"; | 209 | # print STDERR "DEST: bumped idnum to $idnum\n"; |
210 | } | 210 | } |
211 | 211 | ||
212 | # this is the end of a phrase, add it to the english hash | 212 | # this is the end of a phrase, add it to the english hash |
@@ -230,13 +230,13 @@ if($english) { | |||
230 | # model name isn't "our" | 230 | # model name isn't "our" |
231 | dest($_, $name, $val); | 231 | dest($_, $name, $val); |
232 | 232 | ||
233 | print STDERR "DEST: \"$dest\" for $name / $id\n"; | 233 | # print STDERR "DEST: \"$dest\" for $name / $id\n"; |
234 | 234 | ||
235 | if($update || ($dest && ($dest !~ /^none\z/i))) { | 235 | if($update || ($dest && ($dest !~ /^none\z/i))) { |
236 | # we unconditionally always use all IDs when the "update" | 236 | # we unconditionally always use all IDs when the "update" |
237 | # feature is used | 237 | # feature is used |
238 | $id = $maybeid; | 238 | $id = $maybeid; |
239 | print STDERR "DEST: use this id $id\n"; | 239 | # print STDERR "DEST: use this id $id\n"; |
240 | } | 240 | } |
241 | } | 241 | } |
242 | } | 242 | } |
@@ -362,7 +362,10 @@ while(<LANG>) { | |||
362 | my $idstr = $phrase{'id'}; | 362 | my $idstr = $phrase{'id'}; |
363 | my $idnum; | 363 | my $idnum; |
364 | 364 | ||
365 | if($dest =~ /^none\z/i) { | 365 | if($binary && !$english{$idstr}) { |
366 | # $idstr doesn't exist for english, skip it\n"; | ||
367 | } | ||
368 | elsif($dest =~ /^none\z/i) { | ||
366 | # "none" as dest (without quotes) means that this entire | 369 | # "none" as dest (without quotes) means that this entire |
367 | # phrase is to be ignored | 370 | # phrase is to be ignored |
368 | } | 371 | } |