]> git.deb.at Git - deb/packages.git/blobdiff - bin/ttxgettext
Move patch-tracking.d.net to patch-tracker.d.o and update names (Closes: #545262)
[deb/packages.git] / bin / ttxgettext
index 5e3aced61652e4bba97e67e18549c5012aa629fd..fddfbd0d458d393adf85920acdc0d64a616262df 100755 (executable)
@@ -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";
@@ -93,7 +95,7 @@ foreach (@ARGV) {
 }
 
 print "msgid \"\"\nmsgstr \"\"\n".
-        "\"Content-Type: text/plain; charset=ASCII\\n\"\n".
+        "\"Content-Type: text/plain; charset=UTF-8\\n\"\n".
         "\"Content-Transfer-Encoding: 8bit\\n\"\n\n";
 
 foreach my $msgid (@msgids) {