X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=intl%2FSesse%3A%3AExtractGettext.pm;h=a505b6e151218a846a30c946d568dadb75987a4e;hb=1de7e79dcc058716e94ce15af3d7a21aa517d660;hp=857ee1f2a071c6a1858095a13da72bced89deec9;hpb=ce9bde6b8348caeb1637371ad7834a26e3d504c5;p=ccbs diff --git a/intl/Sesse::ExtractGettext.pm b/intl/Sesse::ExtractGettext.pm index 857ee1f..a505b6e 100644 --- a/intl/Sesse::ExtractGettext.pm +++ b/intl/Sesse::ExtractGettext.pm @@ -10,11 +10,12 @@ sub textblock { my ($self, $text) = @_; while ($text =~ s/<(h[1-6]|p|td|th|title|input|span|li|_)[^>]*>(.*?)<\/\1>//s) { - my $text = $2; - $text =~ s/\n/\\n"\n"/g; - $text =~ s/(.)"(?!\n)/$1\\"/g; + my $id = $2; + next if $id =~ /^\s*$/; + $id =~ s/\n/\\n"\n"/g; + $id =~ s/(.)"(?!\n)/$1\\"/g; - print "msgid \"$text\"\n"; + print "msgid \"$id\"\n"; print "msgstr \"\"\n"; print "\n"; }