diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/genlang | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/genlang b/tools/genlang index 9be77a6030..99b28b81fe 100755 --- a/tools/genlang +++ b/tools/genlang | |||
@@ -196,7 +196,7 @@ if($english) { | |||
196 | 196 | ||
197 | my $idnum=0; # start with a true number | 197 | my $idnum=0; # start with a true number |
198 | my $vidnum=0x8000; # first voice id | 198 | my $vidnum=0x8000; # first voice id |
199 | open(ENG, "<$english") || die "can't open $english"; | 199 | open(ENG, "<$english") || die "Error: can't open $english"; |
200 | my @phrase; | 200 | my @phrase; |
201 | my $id; | 201 | my $id; |
202 | my $maybeid; | 202 | my $maybeid; |
@@ -357,7 +357,7 @@ my $voiceid=0x8000; # counter for voice-only ID numbers | |||
357 | # Now start the scanning of the selected language string | 357 | # Now start the scanning of the selected language string |
358 | # | 358 | # |
359 | 359 | ||
360 | open(LANG, "<$input") || die "couldn't read language file named $input\n"; | 360 | open(LANG, "<$input") || die "Error: couldn't read language file named $input\n"; |
361 | my @phrase; | 361 | my @phrase; |
362 | while(<LANG>) { | 362 | while(<LANG>) { |
363 | 363 | ||
@@ -419,7 +419,7 @@ while(<LANG>) { | |||
419 | print STDERR "Warning: source before $input line $line lacks quotes ($src)!\n"; | 419 | print STDERR "Warning: source before $input line $line lacks quotes ($src)!\n"; |
420 | $src='""'; | 420 | $src='""'; |
421 | } | 421 | } |
422 | if($voice !~ /^\"/) { | 422 | if($voice !~ /^\"/ and $voice !~ /^none\z/i) { |
423 | print STDERR "Warning: voice before $input line $line lacks quotes ($voice)!\n"; | 423 | print STDERR "Warning: voice before $input line $line lacks quotes ($voice)!\n"; |
424 | $voice='""'; | 424 | $voice='""'; |
425 | } | 425 | } |
@@ -510,9 +510,9 @@ if($prefix) { | |||
510 | # We create a .c and .h file | 510 | # We create a .c and .h file |
511 | 511 | ||
512 | open(HFILE, ">$prefix.h") || | 512 | open(HFILE, ">$prefix.h") || |
513 | die "couldn't create file $prefix.h\n"; | 513 | die "Error: couldn't create file $prefix.h\n"; |
514 | open(CFILE, ">$prefix.c") || | 514 | open(CFILE, ">$prefix.c") || |
515 | die "couldn't create file $prefix.c\n"; | 515 | die "Error: couldn't create file $prefix.c\n"; |
516 | 516 | ||
517 | print HFILE <<MOO | 517 | print HFILE <<MOO |
518 | /* This file was automatically generated using genlang */ | 518 | /* This file was automatically generated using genlang */ |
@@ -609,7 +609,7 @@ elsif($binary) { | |||
609 | # files. The english file is scanned before the translated file was | 609 | # files. The english file is scanned before the translated file was |
610 | # scanned. | 610 | # scanned. |
611 | 611 | ||
612 | open(OUTF, ">$binary") or die "Can't create $binary"; | 612 | open(OUTF, ">$binary") or die "Error: Can't create $binary"; |
613 | binmode OUTF; | 613 | binmode OUTF; |
614 | printf OUTF ("\x1a%c%c", $langversion, $target_id); # magic lang file header | 614 | printf OUTF ("\x1a%c%c", $langversion, $target_id); # magic lang file header |
615 | 615 | ||