diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-04-27 22:49:36 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-04-27 22:49:36 +0000 |
commit | a181a4c1eb3b307f5b82e1223a72ee5344937c58 (patch) | |
tree | 86b843dfc547c1faf0c6a260579c1db145359d41 /tools/genlang | |
parent | 07aaf52d4732ba82aef4efeb608300f92075297d (diff) | |
download | rockbox-a181a4c1eb3b307f5b82e1223a72ee5344937c58.tar.gz rockbox-a181a4c1eb3b307f5b82e1223a72ee5344937c58.zip |
Fixed a bug where it didn't warn on lack of quotes as it was supposed to.
Now this treats a string given without quotes as "" (but still warns about it).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9824 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/genlang')
-rwxr-xr-x | tools/genlang | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tools/genlang b/tools/genlang index f0c35be384..363ef96cf9 100755 --- a/tools/genlang +++ b/tools/genlang | |||
@@ -344,15 +344,19 @@ while(<LANG>) { | |||
344 | # should use for this phrase. Voice-only strings are | 344 | # should use for this phrase. Voice-only strings are |
345 | # separated. | 345 | # separated. |
346 | 346 | ||
347 | # basic syntax error alerts | 347 | # basic syntax error alerts, if there are no quotes we |
348 | if($dest != /^\"/) { | 348 | # will assume an empty string was intended |
349 | print STDERR "dest around line $line lacks quotes!\n"; | 349 | if($dest !~ /^\"/) { |
350 | print STDERR "Warning: dest before line $line lacks quotes!\n"; | ||
351 | $dest='""'; | ||
350 | } | 352 | } |
351 | if($src != /^\"/) { | 353 | if($src !~ /^\"/) { |
352 | print STDERR "source around line $line lacks quotes!\n"; | 354 | print STDERR "Warning: source before line $line lacks quotes!\n"; |
355 | $src='""'; | ||
353 | } | 356 | } |
354 | if($voice != /^\"/) { | 357 | if($voice !~ /^\"/) { |
355 | print STDERR "voice around line $line lacks quotes!\n"; | 358 | print STDERR "Warning: voice before line $line lacks quotes!\n"; |
359 | $voice='""'; | ||
356 | } | 360 | } |
357 | 361 | ||
358 | if($idstr =~ /^VOICE/) { | 362 | if($idstr =~ /^VOICE/) { |