From a181a4c1eb3b307f5b82e1223a72ee5344937c58 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 27 Apr 2006 22:49:36 +0000 Subject: 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 --- tools/genlang | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'tools') diff --git a/tools/genlang b/tools/genlang index f0c35be384..363ef96cf9 100755 --- a/tools/genlang +++ b/tools/genlang @@ -344,15 +344,19 @@ while() { # should use for this phrase. Voice-only strings are # separated. - # basic syntax error alerts - if($dest != /^\"/) { - print STDERR "dest around line $line lacks quotes!\n"; + # basic syntax error alerts, if there are no quotes we + # will assume an empty string was intended + if($dest !~ /^\"/) { + print STDERR "Warning: dest before line $line lacks quotes!\n"; + $dest='""'; } - if($src != /^\"/) { - print STDERR "source around line $line lacks quotes!\n"; + if($src !~ /^\"/) { + print STDERR "Warning: source before line $line lacks quotes!\n"; + $src='""'; } - if($voice != /^\"/) { - print STDERR "voice around line $line lacks quotes!\n"; + if($voice !~ /^\"/) { + print STDERR "Warning: voice before line $line lacks quotes!\n"; + $voice='""'; } if($idstr =~ /^VOICE/) { -- cgit v1.2.3