summaryrefslogtreecommitdiffstats
path: root/perl-install/share/po/i18n_compssUsers
blob: 445f012090415048d657ddbf58a5b4554088700b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/perl

use lib "../..";
use common ":common";

sub get {
    my ($meta_class) = @_;
    my %compssUsersDescr;

    local *F;
    open F, "../compssUsers$meta_class" or return; #die "can't open file ../compssUsers$meta_class";
    foreach (<F>) {
	/^\s*$/ || /^#/ and next;
	# i18n the Group names:
	s/#.*!{--- }//;
	s/[ ]*# --- //;

	if (/^(\S.*)/) {
	    my ($icon, $descr);
	    /^(.*?)\s*\[icon=(.*?)\](.*)/  and $_ = "$1$3", $icon  = $2;
	    /^(.*?)\s*\[descr=(.*?)\](.*)/ and $_ = "$1$3", $descr = $2;
	    /^(.*?)\s*\[path=(.*?)\](.*)/ and $_ = "$1$3";
	    $compssUsersDescr{$_} = $descr; 
	}
    }
    close F;

    %compssUsersDescr;
}

foreach (uniq(get(''), get('.desktop'))) {
    if ($_) {
        s/"/\"/g;
        s/\n//g;
        print qq(
#: ../../share/compssUsers:999
msgid "$_"
msgstr ""
);
    }
}