
package Sesse::GettextizeTemplates;
use strict;
use warnings;
use Locale::gettext qw(gettext);
use Template::Directive;

our @ISA = qw(Template::Directive);

sub textblock {
	my ($self, $text) = @_;

	$text =~ s/(<(h[1-6]|p|td|th|title|input|span|li|_)[^>]*>)(.*?)(<\/\2>)/$1.gettext($3).$4/seg;
	$text =~ s/<\/?_>//g;

	return $self->SUPER::textblock($text);
}



