Fix genlang to not remove the header from translation files.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18248 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonas Häggqvist 2008-08-11 21:36:00 +00:00
parent 594e0f35b1
commit da5f16a606

View file

@ -359,6 +359,7 @@ my $voiceid=0x8000; # counter for voice-only ID numbers
open(LANG, "<$input") || die "Error: couldn't read language file named $input\n";
my @phrase;
my $header = 1;
while(<LANG>) {
$line++;
@ -367,9 +368,13 @@ while(<LANG>) {
$_ =~ s/\r//g;
if($_ =~ /^( *\#|[ \t\n\r]*\z)/) {
# comment or empty line
# comment or empty line - output it if it's part of the header
if ($header eq 1) {
print($_);
}
next;
}
$header = 0;
my $ll = $_;