diff --git a/tools/uplang b/tools/uplang index d290a79d37..5fb9563c22 100755 --- a/tools/uplang +++ b/tools/uplang @@ -37,13 +37,24 @@ while() { close(ENG); undef %set; +my $cblock = 1; open(NEW, "<$ARGV[1]"); while() { + $_ =~ s/\r//g; + if($_ =~ /^ *\#/) { # comment + if($_ !~ /^ *\#\#\#/) { + # no special ### comment -> keep it + if(!$cblock) { + print "\n"; + $cblock = 1; + } + print $_; + } next; } - $_ =~ s/\r//g; + $cblock = 0; if($_ =~ /^ *([a-z]+): *(.*)/) { ($var, $value) = ($1, $2); @@ -54,7 +65,7 @@ while() { # the last one for a single phrase if(!$ids{$set{'id'}}) { - print "### ".$set{'id'}." was not found in the english file!\n"; + print "\n### ".$set{'id'}." was not found in the english file!\n"; next; }