changeset 9412:3cabcdc36a73

[gaim-migrate @ 10227] grim asked me to do this. apparently this script is pretty cool. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 27 Jun 2004 17:44:19 +0000
parents 48d0bc7f0580
children 281ddfe07d8d
files po/stats.pl
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/po/stats.pl	Sun Jun 27 07:32:59 2004 +0000
+++ b/po/stats.pl	Sun Jun 27 17:44:19 2004 +0000
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# Copyright 2003 Nathan Walp <faceprint@faceprint.com>
+# Copyright 2003-2004 Nathan Walp <faceprint@faceprint.com>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,6 +18,9 @@
 #
 
 
+my $PACXAGE="gaim";
+
+
 use Locale::Language;
 
 $lang{en_CA} = "English (Canadian)";
@@ -38,7 +41,7 @@
 
 system("./update.pl --pot > /dev/null");
 
-$_ = `msgfmt --statistics gaim.pot -o /dev/null 2>&1`;
+$_ = `msgfmt --statistics $PACKAGE.pot -o /dev/null 2>&1`;
 
 die "unable to get total: $!" unless (/(\d+) untranslated messages/);
 
@@ -54,7 +57,7 @@
 	$trans = $fuzz = $untrans = 0;
 	$po = $pos[$index];
 	print STDERR "$po..." if($ARGV[0] eq '-v');
-	system("msgmerge $po.po gaim.pot -o $po.new 2>/dev/null");
+	system("msgmerge $po.po $PACKAGE.pot -o $po.new 2>/dev/null");
 	$_ = `msgfmt --statistics $po.new -o /dev/null 2>&1`;
 	chomp;
 	if(/(\d+) translated messages/) { $trans = $1; }
@@ -85,7 +88,7 @@
 	print STDERR "done ($untrans untranslated strings).\n" if($ARGV[0] eq '-v');
 }
 print "</table></td></tr></table>\n";
-print "Latest gaim.pot generated $now: <a href='gaim.pot'>gaim.pot</a><br />\n";
+print "Latest $PACKAGE.pot generated $now: <a href='$PACKAGE.pot'>$PACKAGE.pot</a><br />\n";
 print "</body>\n";
 print "</html>\n";