diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/uplang | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/uplang b/tools/uplang index d290a79d37..5fb9563c22 100755 --- a/tools/uplang +++ b/tools/uplang | |||
@@ -37,13 +37,24 @@ while(<ENG>) { | |||
37 | close(ENG); | 37 | close(ENG); |
38 | 38 | ||
39 | undef %set; | 39 | undef %set; |
40 | my $cblock = 1; | ||
40 | open(NEW, "<$ARGV[1]"); | 41 | open(NEW, "<$ARGV[1]"); |
41 | while(<NEW>) { | 42 | while(<NEW>) { |
43 | $_ =~ s/\r//g; | ||
44 | |||
42 | if($_ =~ /^ *\#/) { | 45 | if($_ =~ /^ *\#/) { |
43 | # comment | 46 | # comment |
47 | if($_ !~ /^ *\#\#\#/) { | ||
48 | # no special ### comment -> keep it | ||
49 | if(!$cblock) { | ||
50 | print "\n"; | ||
51 | $cblock = 1; | ||
52 | } | ||
53 | print $_; | ||
54 | } | ||
44 | next; | 55 | next; |
45 | } | 56 | } |
46 | $_ =~ s/\r//g; | 57 | $cblock = 0; |
47 | 58 | ||
48 | if($_ =~ /^ *([a-z]+): *(.*)/) { | 59 | if($_ =~ /^ *([a-z]+): *(.*)/) { |
49 | ($var, $value) = ($1, $2); | 60 | ($var, $value) = ($1, $2); |
@@ -54,7 +65,7 @@ while(<NEW>) { | |||
54 | # the last one for a single phrase | 65 | # the last one for a single phrase |
55 | 66 | ||
56 | if(!$ids{$set{'id'}}) { | 67 | if(!$ids{$set{'id'}}) { |
57 | print "### ".$set{'id'}." was not found in the english file!\n"; | 68 | print "\n### ".$set{'id'}." was not found in the english file!\n"; |
58 | next; | 69 | next; |
59 | } | 70 | } |
60 | 71 | ||