2 package Sesse::ExtractGettext;
5 use Template::Directive;
7 our @ISA = qw(Template::Directive);
10 my ($self, $text) = @_;
12 while ($text =~ s/<(h[1-6]|p|td|th|title|input|span|li|_)[^>]*>(.*?)<\/\1>//s) {
14 $text =~ s/\n/\\n"\n"/g;
15 $text =~ s/(.)"(?!\n)/$1\\"/g;
17 print "msgid \"$text\"\n";
18 print "msgstr \"\"\n";
22 return $self->SUPER::textblock($text);