Update of /cvsroot/po4a/po4a
In directory haydn:/tmp/cvs-serv1155
Modified Files:
po4a
Log Message:
Avoid the shame of writing our output files to something like ARRAY(0x83f01dc) ; syntax
error around addendums ; try to apply addendum only when we have some; :-/
Index: po4a
===================================================================
RCS file: /cvsroot/po4a/po4a/po4a,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- po4a 18 Jul 2004 06:02:53 -0000 1.4
+++ po4a 18 Jul 2004 06:12:01 -0000 1.5
@@ -318,13 +318,12 @@
my $doc=Locale::Po4a::Chooser::new($document{$master}{'format'} ,%options);
- my (@file_in_name,@file_out_name,@po_in_name);
+ my (@file_in_name,@po_in_name);
push @file_in_name, $master;
- push @file_out_name, $document{$master}{$lang};
push @po_in_name, $po_filename{$lang};
$doc->process('file_in_name' => \@file_in_name,
- 'file_out_name' => \@file_out_name,
+ 'file_out_name' => $document{$master}{$lang},
'po_in_name' => \@po_in_name);
my ($percent,$hit,$queries) = $doc->stats();
@@ -336,12 +335,14 @@
next LANG;
}
- foreach my $add ($document{$master}{add_$lang}) {
- if ( !$doc->addendum($_) ) {
- die sprintf(gettext("Addendum %s does apply to %s (translation
discarded)."),
- $add,$master)."\n";
- unlink($document{$master}{$lang}) if (-e $document{$master}{$lang});
- next LANG;
+ if (defined ($document{$master}{"add_$lang"})) {
+ foreach my $add ($document{$master}{"add_$lang"}) {
+ if ( !$doc->addendum($_) ) {
+ die sprintf(gettext("Addendum %s does apply to %s (translation
discarded)."),
+ $add,$master)."\n";
+ unlink($document{$master}{$lang}) if (-e $document{$master}{$lang});
+ next LANG;
+ }
}
}
$doc->write($document{$master}{$lang});
Show replies by date