forked from len0rd/rockbox
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:
parent
594e0f35b1
commit
da5f16a606
1 changed files with 6 additions and 1 deletions
|
@ -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";
|
open(LANG, "<$input") || die "Error: couldn't read language file named $input\n";
|
||||||
my @phrase;
|
my @phrase;
|
||||||
|
my $header = 1;
|
||||||
while(<LANG>) {
|
while(<LANG>) {
|
||||||
|
|
||||||
$line++;
|
$line++;
|
||||||
|
@ -367,9 +368,13 @@ while(<LANG>) {
|
||||||
$_ =~ s/\r//g;
|
$_ =~ s/\r//g;
|
||||||
|
|
||||||
if($_ =~ /^( *\#|[ \t\n\r]*\z)/) {
|
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;
|
next;
|
||||||
}
|
}
|
||||||
|
$header = 0;
|
||||||
|
|
||||||
my $ll = $_;
|
my $ll = $_;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue