[Po4a-devel][CVS] po4a/lib/Locale/Po4a Chooser.pm,1.13,1.14 Po.pm,1.13,1.14 Sgml.pm,1.25,1.26 TransTractor.pm,1.26,1.27

Martin Quinson po4a-devel@lists.alioth.debian.org
Thu, 29 Jul 2004 01:27:54 +0000


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv2239/lib/Locale/Po4a

Modified Files:
	Chooser.pm Po.pm Sgml.pm TransTractor.pm 
Log Message:
Fix pod syntax

Index: Sgml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Sgml.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- Sgml.pm	19 Jul 2004 10:21:12 -0000	1.25
+++ Sgml.pm	29 Jul 2004 01:27:51 -0000	1.26
@@ -82,6 +82,8 @@
 optimisation. It can be useful if the document contains a construction like
 "<title>&Acute;</title>", even if I doubt such things to ever happen...
 
+=back
+
 =head1 STATUS OF THIS MODULE
 
 The result is perfect. Ie, the generated documents are exactly the

Index: TransTractor.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TransTractor.pm,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- TransTractor.pm	19 Jul 2004 10:21:12 -0000	1.26
+++ TransTractor.pm	29 Jul 2004 01:27:51 -0000	1.27
@@ -118,7 +118,6 @@
        $my ($paragraph,$pararef,$line,$lref)=("","","","");
        $my $first=1;
        while (($line,$lref)=$document->shiftline() && defined($line)) {
-	   ($line,$lref)=$document->shiftline();
 	   if ($line =~ m/<p>/ && !$first--; ) {
 	       # Not the first time we see <p>. 
 	       # Reput the current line in input,
@@ -606,6 +605,7 @@
     return 1;
 }
 
+=back
 
 =head1 INTERNAL FUNCTIONS used to write derivated parsers
 
@@ -752,8 +752,6 @@
 
 Returns if the verbose option was passed during the creation of the
 TransTractor.
-
-=back
 
 =cut
 

Index: Po.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Po.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- Po.pm	19 Jul 2004 20:31:17 -0000	1.13
+++ Po.pm	29 Jul 2004 01:27:51 -0000	1.14
@@ -333,6 +333,49 @@
     }
     return $pores;
 }
+
+=item select_file()
+
+This function extract a catalog from an existing one. Only the entries having a
+reference in the given file will be placed in the resulting catalog.
+
+=cut
+
+sub select_file {
+    my $self=shift;
+    my $file=shift;
+
+    my $res;
+    $res = Locale::Po4a::Po->new();
+
+    for (my $cpt=(0) ;
+	 $cpt<$self->count_entries();
+	 $cpt) {
+	
+	my ($msgid,$ref,$msgstr,$flags,$type,$comment,$automatic);
+
+	$msgid = $self->msgid($cpt);
+	$ref=$self->{po}{$msgid}{'reference'};
+	next unless ($ref =~ / $file:/);
+
+	$msgstr= $self->{po}{$msgid}{'msgstr'};
+	$flags =  $self->{po}{$msgid}{'flags'};
+	$type = $self->{po}{$msgid}{'type'};
+	$comment = $self->{po}{$msgid}{'comment'};
+	$automatic = $self->{po}{$msgid}{'automatic'};
+
+	$res->push_raw('msgid' => $msgid, 
+			 'msgstr' => $msgstr,
+			 'flags' => $flags,
+	                 'type'  => $type,
+			 'reference' => $ref,
+			 'comment' => $comment,
+			 'automatic' => $automatic);
+
+    }
+    return $res;
+}
+
 =back
 
 =head1 Functions to use a message catalogs for translations

Index: Chooser.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Chooser.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- Chooser.pm	16 Jul 2004 04:13:39 -0000	1.13
+++ Chooser.pm	29 Jul 2004 01:27:51 -0000	1.14
@@ -99,6 +99,8 @@
 L<Locale::Po4a::Html(3pm)>,
 L<Locale::Po4a::Dia(3pm)>.
 
+=back
+
 =head1 AUTHORS
 
  Denis Barbier <barbier@linuxfr.org>