r530 - trunk/misc

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Feb 29 18:13:58 EST 2008


Author: icculus
Date: 2008-02-29 18:13:58 -0500 (Fri, 29 Feb 2008)
New Revision: 530

Modified:
   trunk/misc/localization2pot.pl
Log:
Write out Launchpad-specific fields in generated .po templates.


Modified: trunk/misc/localization2pot.pl
===================================================================
--- trunk/misc/localization2pot.pl	2008-02-29 23:12:33 UTC (rev 529)
+++ trunk/misc/localization2pot.pl	2008-02-29 23:13:58 UTC (rev 530)
@@ -16,6 +16,22 @@
 chomp($svnver);
 $svnver = 'svn-' . (($svnver eq '') ? '???' : $svnver);
 
+my $exportdate = '';
+my $generator = '';
+while (<STDIN>) {
+    chomp;
+    if (s/\A\-\-\s*(X-Launchpad-Export-Date: .*?)\Z/"$1\\n"/) {
+        $exportdate = $_;
+        next;
+    }
+    if (s/\A\-\-\s*(X-Generator: .*?)\Z/"$1\\n"/) {
+        $generator = $_;
+        next;
+    }
+    last if (/MojoSetup.localization = {/);
+}
+
+
 print <<__EOF__;
 # MojoSetup; a portable, flexible installation application.
 #    http://icculus.org/mojosetup/
@@ -58,13 +74,12 @@
 "MIME-Version: 1.0\\n"
 "Content-Type: text/plain; charset=UTF-8\\n"
 "Content-Transfer-Encoding: 8bit\\n"
+$exportdate
+$generator
 
-
 __EOF__
 
 
-while (<STDIN>) { last if (/MojoSetup.localization = {/); }
-
 my $looking_for_end = 0;
 
 while (<STDIN>) {




More information about the mojosetup-commits mailing list