[Po4a-commits] "po4a/lib/Locale/Po4a Xml.pm,1.67,1.68"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Sun Mar 2 00:51:19 UTC 2008


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory alioth:/tmp/cvs-serv23071/lib/Locale/Po4a

Modified Files:
	Xml.pm 
Log Message:
Do not check if the content has to be translated in treat_content(). It is
the work of translate_paragraph().


Index: Xml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Xml.pm,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- Xml.pm	2 Mar 2008 00:49:02 -0000	1.67
+++ Xml.pm	2 Mar 2008 00:51:17 -0000	1.68
@@ -1180,12 +1180,6 @@
 
 	my ($eof, at paragraph)=$self->get_string_until('<',{remove=>1});
 
-	# Check if this has to be translated
-	if ($self->join_lines(@paragraph) !~ /^\s*$/s) {
-		my $struc = $self->get_path;
-		$translate = $self->get_translate_options($struc);
-	}
-
 	while (!$eof and !$self->breaking_tag) {
 	NEXT_TAG:
 		my @text;
@@ -1302,10 +1296,6 @@
 		if ($#text > 0) {
 			# Check if text (extracted after the inline tag)
 			# has to be translated
-			if ($self->join_lines(@text) !~ /^\s*$/s) {
-				my $struc = $self->get_path;
-				$translate = $self->get_translate_options($struc);
-			}
 			push @paragraph, @text;
 		}
 
@@ -1334,6 +1324,7 @@
 	# This strips the extracted strings
 	# (only if you don't specify the 'nostrip' option, and if the
 	# paragraph can be re-wrapped)
+	$translate = $self->get_translate_options($self->get_path);
 	if (!$self->{options}{'nostrip'} and $translate !~ m/W/) {
 		my $clean = 0;
 		# Clean the beginning
@@ -1436,6 +1427,7 @@
 sub translate_paragraph {
 	my ($self, $translate) = (shift, shift);
 	my @paragraph = @_;
+	$translate = $self->get_translate_options($self->get_path);
 
 	my $comments;
 	while (@comments) {




More information about the Po4a-commits mailing list