X-Git-Url: https://git.deb.at/?p=deb%2Fpackages.git;a=blobdiff_plain;f=bin%2Fttxgettext;h=fddfbd0d458d393adf85920acdc0d64a616262df;hp=2afeafcd321956ccfc9b91a5f5f14cfab295006f;hb=89c17478db69effd1c96f4e284ad46f5b4d72c17;hpb=3d001d13e938fe3dc712e777e01804f8187c32f4 diff --git a/bin/ttxgettext b/bin/ttxgettext index 2afeafc..fddfbd0 100755 --- a/bin/ttxgettext +++ b/bin/ttxgettext @@ -67,13 +67,15 @@ sub processFile { # $lineno += $nextlineno; # next; # wrong domain # } - $comment = ''; - if ($1 =~ m/(((^|\n)[ \t]*#.*)+)\n?[^\n]*$/) { - $comment = $1; - $comment =~ s/^\s+#\s*//; - $comment =~ s/\n[ \t]*#\s*/\n/g; - } - push (@msgids, $msgid); + $comment = ''; + if ($1 =~ m/(((^|\n)\s*(\[%)?\s*#.*)+)\n?[^\n]*$/) { + $comment = $1; + $comment =~ s/\[%//g; + $comment =~ s/%\]//g; + $comment =~ s/^\s+#\s*//; + $comment =~ s/\n[ \t]*#\s*/\n/g; + } + push (@msgids, $msgid); # if (defined ($messages->{$msgid})) { # print STDERR "ttxgettext: Warning: msgid multiple defined:\n\t". # $msgid."\n";