[Rt-commit] r15639 - rt/3.8/trunk/sbin
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Fri Aug 29 12:43:25 EDT 2008
Author: sunnavy
Date: Fri Aug 29 12:43:24 2008
New Revision: 15639
Modified:
rt/3.8/trunk/sbin/extract-message-catalog
Log:
convert the mark of nonexist msg in source launchpad uses to our own
Modified: rt/3.8/trunk/sbin/extract-message-catalog
==============================================================================
--- rt/3.8/trunk/sbin/extract-message-catalog (original)
+++ rt/3.8/trunk/sbin/extract-message-catalog Fri Aug 29 12:43:24 2008
@@ -226,15 +226,22 @@
$msghdr .= shift @lines while ( $lines[0] && $lines[0] !~ /^msgid/ );
my $msgid = "";
- $msgid .= shift @lines while ( $lines[0] && $lines[0] =~ /^(msgid|")/ );
+
+# '#~ ' is the prefix of launchpad for msg that's not found the the source
+# we'll remove the prefix later so we can still show them with our own mark
+
+ $msgid .= shift @lines while ( $lines[0] && $lines[0] =~ /^(#~ )?(msgid|")/ );
my $msgstr = "";
- $msgstr .= shift @lines while ( $lines[0] && $lines[0] =~ /^(msgstr|")/ );
+ $msgstr .= shift @lines while ( $lines[0] && $lines[0] =~ /^(#~ )?(msgstr|")/ );
last unless $msgid;
chomp $msgid;
chomp $msgstr;
+ $msgid =~ s/^#~ //mg;
+ $msgstr =~ s/^#~ //mg;
+
$msgid =~ s/^msgid "(.*)"\s*?$/$1/m or warn "$msgid in $file";
if ( $msgid eq '' ) {
More information about the Rt-commit
mailing list