[Po4a-commits] "po4a/lib/Locale/Po4a Xml.pm,1.73,1.74"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Sat Mar 15 01:20:04 UTC 2008


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

Modified Files:
	Xml.pm 
Log Message:
* lib/Locale/Po4a/Xml.pm: Do not translate the SSI comments by 
  default (<!--#...-->). Set the f_extract and f_translate to the
  same as for regular comments.
* lib/Locale/Po4a/Xml.pm: Do not forget the # at the beginning of
  SSI comments.
* t/25-xhtml.t, t/data-25/includessi.html, t/data-25/includessi.po,
  t/data-25/includessi_normalized.html, MANIFEST: Added tests for the
includessi option.
* t/data-25/xhtml.po, t/data-25/xhtml_normalized.html: SSI
  comments are no more translated.


Index: Xml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Xml.pm,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- Xml.pm	10 Mar 2008 19:57:14 -0000	1.73
+++ Xml.pm	15 Mar 2008 01:20:00 -0000	1.74
@@ -526,7 +526,9 @@
 our @tag_types = ( 
 	{	beginning	=> "!--#",
 		end		=> "--",
-		breaking	=> 0},
+		breaking	=> 0,
+		f_extract	=> \&tag_extract_comment,
+		f_translate	=> \&tag_trans_comment},
 	{	beginning	=> "!--",
 		end		=> "--",
 		breaking	=> 0,
@@ -1195,6 +1197,9 @@
 			# Remove the content of the comments
 			($eof, @text) = $self->extract_tag($type,1);
 			$text[$#text-1] .= "\0";
+			if ($tag_types[$type]->{'beginning'} eq "!--#") {
+				$text[0] = "#".$text[0];
+			}
 			push @comments, @text;
 		} else {
 			my ($tmpeof, @tag) = $self->extract_tag($type,0);




More information about the Po4a-commits mailing list