[Po4a-commits] "po4a/scripts msguntypot,1.5,1.6"
Denis Barbier
barbier-guest at alioth.debian.org
Mon Jul 26 19:42:53 UTC 2010
Update of /cvsroot/po4a/po4a/scripts
In directory alioth:/tmp/cvs-serv17393/scripts
Modified Files:
msguntypot
Log Message:
msguntypot: Call msgmerge with the --previous option
Add a --no-previous option to disable this new behavior.
Index: msguntypot
===================================================================
RCS file: /cvsroot/po4a/po4a/scripts/msguntypot,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- msguntypot 7 Mar 2009 12:33:11 -0000 1.5
+++ msguntypot 26 Jul 2010 19:42:45 -0000 1.6
@@ -133,7 +133,7 @@
exit 0;
}
-my ($help,$debug, at verbose,$quiet);
+my ($help,$debug, at verbose,$quiet,$noprevious);
@verbose = ();
$debug = 0;
@@ -149,6 +149,7 @@
'verbose|v' => \@verbose,
'debug|d' => \$debug,
'quiet|q' => \$quiet,
+ 'no-previous' => \$noprevious,
'version|V' => \&show_version
) or pod2usage();
@@ -194,6 +195,8 @@
}
print wrap_msg(gettext("Found %d modified entries."),scalar keys %diff) if $verbose;
+my $msgmergeOpts = ($noprevious ? "" : "--previous");
+
# Get all po files and report differences in them
my ($pofile);
(undef,$pofile)=File::Temp->tempfile("po4aXXXX",
@@ -207,7 +210,7 @@
while (my $poarg = shift) {
$pocount ++;
print wrap_msg(gettext("Handling %s"),$poarg) if $verbose;
- if (system("msgmerge -o $pofile $poarg $oldfile 2>/dev/null")) {
+ if (system("msgmerge $msgmergeOpts -o $pofile $poarg $oldfile 2>/dev/null")) {
my $msg = $!;
unlink ($pofile);
die wrap_msg(gettext("Error while running msgmerge: %s"), $msg);
More information about the Po4a-commits
mailing list