changeset 20640:ecfc73719334

When running stats.pl, just update the po files in place rather than creating a temporary file which is later deleted. This changes causes the po files to show up as modified in your workspace, but I don't think many people care. There are two benefits to this: 1. When this script is run on pidgin.im it will always only have to account for strings that have changed in the last day, which means it'll run a lot faster 2. The msgmerge'd po files will be put online at http://developer.pidgin.im/l10n/ for the convenience of the translators
author Mark Doliner <mark@kingant.net>
date Tue, 25 Sep 2007 08:54:29 +0000
parents 576dacab8a1f
children cb7d809867ac d9dbf9163aca
files po/stats.pl
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/po/stats.pl	Tue Sep 25 08:47:16 2007 +0000
+++ b/po/stats.pl	Tue Sep 25 08:54:29 2007 +0000
@@ -63,17 +63,16 @@
 	$trans = $fuzz = $untrans = 0;
 	$po = $pos[$index];
 	print STDERR "$po..." if($ARGV[0] eq '-v');
-	system("msgmerge $po.po $PACKAGE.pot -o $po.new 2>/dev/null");
+	system("msgmerge -U $po.po $PACKAGE.pot 2>/dev/null");
 	if (($? & 127) == 2) {
 		printf STDERR "Caught keyboard interrupt--exiting\n";
 		exit
 	}
-	$_ = `msgfmt --statistics $po.new -o /dev/null 2>&1`;
+	$_ = `msgfmt --statistics $po -o /dev/null 2>&1`;
 	chomp;
 	if(/(\d+) translated message/) { $trans = $1; }
 	if(/(\d+) fuzzy translation/) { $fuzz = $1; }
 	if(/(\d+) untranslated message/) { $untrans = $1; }
-	unlink("$po.new");
 
 	$name = "";
 	$name = $lang{$po};