#!/usr/bin/perl

$comment = 0; # state keeper

while ($line = <>) {
    if ($line =~ /^\".*\"/) {
	if ($comment) {
	    print "# ",$line;
	} else { 
	    print $line;
	}
    } else {
	$comment = 0;

        if ($line =~ /^msgid/) {
	    if ($line =~ /^msgid_plural/) {
		print "msgstr \"\"\n";
	    } else {
		print $line;
	    }
	} elsif ($line =~ /^msgstr\[[0-9]+\]/) {
	    print "# ",$line;
	    $comment = 1;
	} else {
	    print $line;
	}
    }
}
