summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJonas Häggqvist <rasher@rasher.dk>2008-08-11 21:36:00 +0000
committerJonas Häggqvist <rasher@rasher.dk>2008-08-11 21:36:00 +0000
commitda5f16a606a25e090020e1a9734572c6b1c0afa8 (patch)
tree34d1ceed32c9a531f6ef1e7dc5f787df8775e113 /tools
parent594e0f35b126702893ee72fa80056d3aa3118c51 (diff)
downloadrockbox-da5f16a606a25e090020e1a9734572c6b1c0afa8.tar.gz
rockbox-da5f16a606a25e090020e1a9734572c6b1c0afa8.tar.bz2
rockbox-da5f16a606a25e090020e1a9734572c6b1c0afa8.zip
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
Diffstat (limited to 'tools')
-rwxr-xr-xtools/genlang7
1 files changed, 6 insertions, 1 deletions
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(<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 = $_;