blob: 09de78a89e29e0ae6230fc5aeaffb329ac39669e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/usre/bin/perl -w
use strict;
my $in_comment = 0;
open(POTFILE, '>regcat.pot') or die("can't open regcat.pot: $!");
open(REGXML, '<../../modules/menu/xfce-registered-categories.xml') or die("can't open xfce-registered-categories.xml: $!");
while(my $line = <REGXML>) {
$in_comment = 1 if(!$in_comment && $line =~ /<!--/);
$in_comment = 0 if($in_comment && $line =~ /-->/);
next if($in_comment);
if($line =~ /<category .*?name="(.*?)"/) {
my $name = $1;
print POTFILE qq(msgid "$name"\nmsgstr ""\n\n);
}
}
close(REGXML);
close(POTFILE);
|