[Po4a-commits] po4a/lib/Locale/Po4a TransTractor.pm,1.37,1.38
Jordi Vilalta
po4a-devel@lists.alioth.debian.org
Sat, 14 Aug 2004 14:32:21 +0000
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv5966/lib/Locale/Po4a
Modified Files:
TransTractor.pm
Log Message:
Implemented addendum recoding
jvprat was here ;)
Index: TransTractor.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TransTractor.pm,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- TransTractor.pm 12 Aug 2004 16:58:20 -0000 1.37
+++ TransTractor.pm 14 Aug 2004 14:32:19 -0000 1.38
@@ -586,6 +586,14 @@
addendum_parse($filename);
return 0 if ($errcode);
+ # We only recode the addendum if an origin charset is specified, else we
+ # suppose it's already in the output document's character set
+ if (defined($self->{TT}{'addendum_charset'}) &&
+ length($self->{TT}{'addendum_charset'})) {
+ Encode::from_to($content,$self->{TT}{'addendum_charset'},
+ $self->get_out_charset);
+ }
+
my $found = scalar grep { /$position/ } @{$self->{TT}{doc_out}};
if ($found == 0) {
warn sprintf(dgettext("po4a",
@@ -976,6 +984,7 @@
Denis Barbier <barbier@linuxfr.org>
Martin Quinson <martin.quinson@tuxfamily.org>
+ Jordi Vilalta <jvprat@wanadoo.es>
=cut