Support <option> in template stuff.
authorSteinar H. Gunderson <sesse@samfundet.no>
Sun, 17 Jul 2005 10:51:54 +0000 (10:51 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sun, 17 Jul 2005 10:51:54 +0000 (10:51 +0000)
intl/Sesse::ExtractGettext.pm
intl/Sesse::GettextizeTemplates.pm

index a505b6e151218a846a30c946d568dadb75987a4e..734962f2a8937331391f9ea2149f84c074db9cf6 100644 (file)
@@ -9,7 +9,7 @@ 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) {
+       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;
index 26f01c0634236e43696be7e125e705247f8d9207..44d433a62537a62850bd56ab7221b0e1b9180eea 100644 (file)
@@ -18,7 +18,7 @@ sub mygettext {
 sub textblock {
        my ($self, $text) = @_;
 
-       $text =~ s/(<(h[1-6]|p|td|th|title|input|span|li|_)[^>]*>)(.*?)(<\/\2>)/$1.mygettext($3).$4/seg;
+       $text =~ s/(<(h[1-6]|p|td|th|title|input|span|li|option|_)[^>]*>)(.*?)(<\/\2>)/$1.mygettext($3).$4/seg;
        $text =~ s/<\/?_>//g;
 
        return $self->SUPER::textblock($text);