[Po4a-commits] "po4a/lib/Locale/Po4a TransTractor.pm,1.109,1.110"

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Sun Aug 16 22:35:17 UTC 2009


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

Modified Files:
	TransTractor.pm 
Log Message:
	* NEWS, po4a, lib/Locale/Po4a/TransTractor.pm: Added options
	--srcdir and --destdir. They permit to strip the base directory
	for the input and output documents (in the config file and in the
	references generated in the PO files).


Index: TransTractor.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TransTractor.pm,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -d -r1.109 -r1.110
--- TransTractor.pm	22 Jul 2009 11:18:14 -0000	1.109
+++ TransTractor.pm	16 Aug 2009 22:35:15 -0000	1.110
@@ -292,6 +292,8 @@
     }
     $self->{TT}{'addendum_charset'}=$params{'addendum_charset'};
 
+    chdir $params{'srcdir'}
+	if (defined $params{'srcdir'});
     foreach my $file (@{$params{'po_in_name'}}) {
 	print STDERR "readpo($file)... " if $self->debug();
 	$self->readpo($file);
@@ -310,18 +312,24 @@
 	$self->addendum($file) || die "An addendum failed\n";
 	print STDERR "done.\n" if $self->debug();
     }
+    chdir $params{'destdir'}
+	if (defined $params{'destdir'});
     if (defined $params{'file_out_name'}) {
 	print STDERR "write(".$params{'file_out_name'}.")... " 
 	    if $self->debug();
 	$self->write($params{'file_out_name'});
 	print STDERR "done.\n" if $self->debug();
     }
+    chdir $params{'srcdir'}
+	if (defined $params{'srcdir'});
     if (defined $params{'po_out_name'}) {
 	print STDERR "writepo(".$params{'po_out_name'}.")... "
 	     if $self->debug();
 	$self->writepo($params{'po_out_name'});
 	print STDERR "done.\n" if $self->debug();
     }
+    chdir $params{'calldir'}
+	if (defined $params{'calldir'});
     return $self;
 }
 




More information about the Po4a-commits mailing list