11 open (IN
, "< " . $_) or die $!;
14 ## Process one event file like that:
19 # label=Pan\nOff -> Pick these labals and dump them in pot format,
20 # location=5 except they are $( ) enclosed
22 # event=StatusMessage Simulation\r\nNothing is real!
23 # -> Also pick those messages and dump them into pot format
32 if (/^label=([^\$]*?[^\$\s])\s*(?:\\n[^[:alpha:]]*)?(?:\$.*)?$/) {
34 $msg =~ s
,\s
*\\[nr
]$,,g
;
35 $msges{$msg} .= "#: $filename:$line\n";
36 } elsif (/^event=StatusMessage\s+(\S.*\S)\s*$/) {
37 $msges{ $1 } .= "#: $filename:$line\n";
47 while (($k, $v) = each %msges) {
48 print $v . "msgid \"$k\"\nmsgstr \"\"\n\n";