X-Git-Url: https://git.deb.at/?p=deb%2Fpackages.git;a=blobdiff_plain;f=bin%2Fdebtags-xgettext;h=91111840870064d6e3c26c1ce0ef0d6c2de010ba;hp=a7f718b39d421fd80d8d68948b2de4e1a2a18b05;hb=0c1a44893f94f98deac8435e6ab235228880087f;hpb=8ac8fa1f369ab0073709518ec2a8d44aa859afcf diff --git a/bin/debtags-xgettext b/bin/debtags-xgettext index a7f718b..9111184 100755 --- a/bin/debtags-xgettext +++ b/bin/debtags-xgettext @@ -18,7 +18,9 @@ sub escape { my $text = shift; $text =~ s/\\/\\\\/g; $text =~ s/"/\\"/g; - $text =~ s/\n/\\n/g; + $text =~ s/\n\s*\.\n\s?/\\n/g; + $text =~ s/\n /\\n/g; + $text =~ s/\n//g; $text =~ s/\t/\\t/g; return $text; } @@ -59,6 +61,7 @@ sub processFile { if ($long) { $long = escape($long); + $long =~ s/^\s//; push (@msgids, $long); push (@{$messages->{$long}}, $comment.", long desc", $file); }