[Rt-commit] r15291 - in rt/3.8/trunk: sbin

elacour at bestpractical.com elacour at bestpractical.com
Wed Aug 20 10:05:50 EDT 2008


Author: elacour
Date: Wed Aug 20 10:05:45 2008
New Revision: 15291

Modified:
   rt/3.8/trunk/   (props changed)
   rt/3.8/trunk/sbin/extract-message-catalog

Log:
 r10418 at datura:  manu | 2008-08-20 16:01:43 +0200
 Add support to loc_qw to translate words in qw() statements.


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	Wed Aug 20 10:05:45 2008
@@ -164,6 +164,17 @@
 	push @{ $FILECAT->{$str} }, [ $filename, $line, '' ];
     }
 
+    # Comment-based qw mark: "qw(...)" # loc_qw
+    $line = 1;
+    pos($_) = 0;
+    while (m/\G.*?(qw\([^)]+\))[\}\)\],;]*\s*\#\s*loc_qw\s*$/smg) {
+    my $str = $1;
+	$line += ( () = ( $& =~ /\n/g ) );    # cryptocontext!
+    foreach my $value (eval($str)) {
+	    push @{ $FILECAT->{$value} }, [ $filename, $line, '' ];
+    }
+    }
+
     # Comment-based pair mark: "..." => "..." # loc_pair
     $line = 1;
     pos($_) = 0;


More information about the Rt-commit mailing list