=cut
use strict;
+#use warnings; FIXME - Bug 2505
use Getopt::Long;
use Locale::PO;
use File::Temp qw( :POSIX );
# value [tag=input], meta
my $tag = lc($1) if $t =~ /^<(\S+)/s;
my $translated_p = 0;
- for my $a ('alt', 'content', 'title', 'value') {
+ for my $a ('alt', 'content', 'title', 'value','label') {
if ($attr->{$a}) {
+ next if $a eq 'label' && $tag ne 'optgroup';
next if $a eq 'content' && $tag ne 'meta';
next if $a eq 'value' && ($tag ne 'input'
- || (ref $attr->{'type'} && $attr->{'type'}->[1] =~ /^(?:hidden|radio|text|submit)$/)); # FIXME
+ || (ref $attr->{'type'} && $attr->{'type'}->[1] =~ /^(?:checkbox|hidden|radio|text)$/)); # FIXME
my($key, $val, $val_orig, $order) = @{$attr->{$a}}; #FIXME
if ($val =~ /\S/s) {
my $s = find_translation($val);
sprintf(' %s=%s', $_, $attr->{$_}->[2]) #FIXME
} sort {
$attr->{$a}->[3] <=> $attr->{$b}->[3] #FIXME
- } keys %$attr)
- . '>';
- } else {
- $it = $t;
+ } keys %$attr);
+ if ($tag eq 'img'){
+ $it .= ' />';
+ }
+ else {
+ $it .= ' >';
+ }
+ }
+ else {
+ $it = $t;
}
return $it;
}
if !@in_files || !defined $str_file;
# Type match defaults to *.tmpl plus *.inc if not specified
-$type = "tmpl|inc|js|xsl|def" if !defined($type);
+$type = "tmpl|inc|xsl" if !defined($type);
# Check the inputs for being files or directories
for my $input (@in_files) {