[Po4a-commits] po4a/lib/Locale/Po4a Xml.pm,1.19,1.20
Jordi Vilalta
po4a-devel@lists.alioth.debian.org
Fri, 27 Aug 2004 10:17:01 +0000
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv6302
Modified Files:
Xml.pm
Log Message:
Improved attributes matching when there's no tag hierarchy in front of an
attribute, and some typos.
Index: Xml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Xml.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- Xml.pm 17 Aug 2004 23:45:15 -0000 1.19
+++ Xml.pm 27 Aug 2004 10:16:59 -0000 1.20
@@ -696,9 +696,14 @@
my $i = 0;
while (!$found && $i < @list) {
- $list[$i] =~ /(.*?)(<.*)/;
- my $options = $1;
- my $element = $2;
+ my $options;
+ my $element;
+ if ($list[$i] =~ /(.*?)(<.*)/) {
+ $options = $1;
+ $element = $2;
+ } else {
+ $element = $list[$i];
+ }
if ($self->{options}{'caseinsensitive'}) {
if ( $tag =~ /\Q$element\E$/i ) {
$found = 1;
@@ -727,7 +732,7 @@
This function handles the tags attributes' translation. It receives the tag
without the beginning / end marks, and then it finds the attributes, and it
-translates the translatables (specified by the module option "attributes").
+translates the translatable ones (specified by the module option "attributes").
This returns a plain string with the translated tag.
=back
@@ -892,7 +897,7 @@
}));
} else {
# Inform that this tag isn't translated in debug mode
- print sprintf("po4a::xml: ".dgettext ("po4a","Content of tag %s %s excluded: %s"), $self->get_path,$paragraph[1],$self->join_lines(@paragraph))."\n"
+ print sprintf("po4a::xml: ".dgettext ("po4a","Content of tag %s at %s excluded: %s"), $self->get_path,$paragraph[1],$self->join_lines(@paragraph))."\n"
if $self->debug();
$self->pushline($self->recode_skipped_text($self->join_lines(@paragraph)));
}