]> git.sesse.net Git - ccbs/blobdiff - intl/Sesse::ExtractGettext.pm
There is no freshcolumnheading.
[ccbs] / intl / Sesse::ExtractGettext.pm
index 857ee1f2a071c6a1858095a13da72bced89deec9..734962f2a8937331391f9ea2149f84c074db9cf6 100644 (file)
@@ -9,12 +9,13 @@ our @ISA = qw(Template::Directive);
 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;
+       while ($text =~ s/<(h[1-6]|p|td|th|title|input|span|li|option|_)[^>]*>(.*?)<\/\1>//s) {
+               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";
        }