summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJonas Häggqvist <rasher@rasher.dk>2008-02-17 23:34:52 +0000
committerJonas Häggqvist <rasher@rasher.dk>2008-02-17 23:34:52 +0000
commitbd8d7a5f5e1cf754a22f08fb14e79a8367144ca3 (patch)
tree605d10bf6b4cfad9331db66b457d09870d3043a9 /tools
parent9425cf65489776cfaf2d4c5472d4693dcd158aa6 (diff)
Make genlang shut up about the non-error of not putting quotes around "none" in the voice. Also make it print slightly nicer errors/warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16340 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-xtools/genlang12
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) {
my $idnum=0; # start with a true number
my $vidnum=0x8000; # first voice id
- open(ENG, "<$english") || die "can't open $english";
+ open(ENG, "<$english") || die "Error: can't open $english";
my @phrase;
my $id;
my $maybeid;
@@ -357,7 +357,7 @@ my $voiceid=0x8000; # counter for voice-only ID numbers
# Now start the scanning of the selected language string
#
-open(LANG, "<$input") || die "couldn't read language file named $input\n";
+open(LANG, "<$input") || die "Error: couldn't read language file named $input\n";
my @phrase;
while(<LANG>) {
@@ -419,7 +419,7 @@ while(<LANG>) {
print STDERR "Warning: source before $input line $line lacks quotes ($src)!\n";
$src='""';
}
- if($voice !~ /^\"/) {
+ if($voice !~ /^\"/ and $voice !~ /^none\z/i) {
print STDERR "Warning: voice before $input line $line lacks quotes ($voice)!\n";
$voice='""';
}
@@ -510,9 +510,9 @@ if($prefix) {
# We create a .c and .h file
open(HFILE, ">$prefix.h") ||
- die "couldn't create file $prefix.h\n";
+ die "Error: couldn't create file $prefix.h\n";
open(CFILE, ">$prefix.c") ||
- die "couldn't create file $prefix.c\n";
+ die "Error: couldn't create file $prefix.c\n";
print HFILE <<MOO
/* This file was automatically generated using genlang */
@@ -609,7 +609,7 @@ elsif($binary) {
# files. The english file is scanned before the translated file was
# scanned.
- open(OUTF, ">$binary") or die "Can't create $binary";
+ open(OUTF, ">$binary") or die "Error: Can't create $binary";
binmode OUTF;
printf OUTF ("\x1a%c%c", $langversion, $target_id); # magic lang file header