From da5f16a606a25e090020e1a9734572c6b1c0afa8 Mon Sep 17 00:00:00 2001 From: Jonas Häggqvist Date: Mon, 11 Aug 2008 21:36:00 +0000 Subject: 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 --- tools/genlang | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/genlang b/tools/genlang index 9da03479bd..3e133cef38 100755 --- a/tools/genlang +++ b/tools/genlang @@ -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() { $line++; @@ -367,9 +368,13 @@ while() { $_ =~ 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 = $_; -- cgit