r529 - trunk/misc

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Feb 29 18:12:34 EST 2008


Author: icculus
Date: 2008-02-29 18:12:33 -0500 (Fri, 29 Feb 2008)
New Revision: 529

Modified:
   trunk/misc/po2localization.pl
Log:
Write generator/export date into localization.lua.


Modified: trunk/misc/po2localization.pl
===================================================================
--- trunk/misc/po2localization.pl	2008-02-29 12:04:52 UTC (rev 528)
+++ trunk/misc/po2localization.pl	2008-02-29 23:12:33 UTC (rev 529)
@@ -22,6 +22,9 @@
 my %msgstrs;
 my @strings;
 my $saw_template = 0;
+my $exportdate = '';
+my $generator = '';
+
 foreach (@ARGV) {
     my $fname = $_;
     my $template = /\.pot\Z/;
@@ -34,7 +37,6 @@
     }
 
     my $comment = '';
-    my $exportdate = '';
     my $currentlang = '';
 
     while (<POIO>) {
@@ -73,8 +75,10 @@
                             die("Found an 'en_US' translation.\n");
                         }
                         $languages{$currentlang} = $1 if (not $template);
-                    } elsif (/\A\"X-Launchpad-Export-Date: /) {
+                    } elsif (s/\A\"(X-Launchpad-Export-Date: .*?)\\n\"/$1/) {
                         $exportdate = $_ if ($template);
+                    } elsif (s/\A"(X-Generator: .*?)\\n\"\Z/$1/) {
+                        $generator = $_ if ($template);
                     }
                 }
             } elsif ($currentlang eq '') {
@@ -144,6 +148,9 @@
 --    https://translations.launchpad.net/mojosetup/
 --
 -- ...and that work eventually ends up in this file.
+--
+-- $exportdate
+-- $generator
 
 MojoSetup.languages = {
 __EOF__




More information about the mojosetup-commits mailing list