@@ -39,7 +39,7 @@ sub xmlescape {
39
39
my $xml = XMLin($f , ForceArray => 1);
40
40
41
41
foreach my $k (qw/ longname group description/ ) {
42
- $strings {" OTBAlgorithm" }{$xml -> {$k }-> [0]} = 1 ;
42
+ $strings {" OTBAlgorithm" }{$xml -> {$k }-> [0]} = $f ;
43
43
}
44
44
}
45
45
@@ -52,16 +52,16 @@ sub xmlescape {
52
52
while ( my ($class , $name , $description , $rest ) = split /\|/ , scalar(<I>) ) {
53
53
next unless defined $description ;
54
54
$description =~ s/\s +$ // ;
55
- $strings {" GrassAlgorithm" }{$description } = 1
55
+ $strings {" GrassAlgorithm" }{$description } = $f ;
56
56
}
57
57
58
58
close I;
59
59
60
60
chop $desc ;
61
61
chop $group ;
62
62
63
- $strings {" GrassAlgorithm" }{$desc } = 1 ;
64
- $strings {" GrassAlgorithm" }{$group } = 1 ;
63
+ $strings {" GrassAlgorithm" }{$desc } = $f ;
64
+ $strings {" GrassAlgorithm" }{$group } = $f ;
65
65
}
66
66
67
67
for my $f (<python/plugins/processing/algs/saga/description/*/*.txt>) {
@@ -86,7 +86,7 @@ sub xmlescape {
86
86
$base = uc $base ;
87
87
my $yaml = LoadFile($f );
88
88
for my $k (keys %$yaml ) {
89
- $strings {" ${base} Algorithm" }{$yaml -> {$k }} = 1 ;
89
+ $strings {" ${base} Algorithm" }{$yaml -> {$k }} = $f ;
90
90
}
91
91
}
92
92
@@ -96,7 +96,7 @@ sub xmlescape {
96
96
chop ;
97
97
s / ^.*,// ;
98
98
foreach my $v (split " /" , $_ ) {
99
- $strings {" AlgorithmClassification" }{$v } = 1 ;
99
+ $strings {" AlgorithmClassification" }{$v } = $f ;
100
100
}
101
101
}
102
102
close I;
@@ -120,7 +120,11 @@ sub xmlescape {
120
120
121
121
foreach my $v (keys %{ $strings {$k } } ) {
122
122
next if $v eq " " ;
123
- print F " <property><string>" . xmlescape($v ) . " </string></property>\n " ;
123
+ my $c = $strings {$k }{$v };
124
+ $c =~ s # ^.*/## ;
125
+ $c =~ s #\. [^.]+$## ;
126
+
127
+ print F " <property><string extracomment=\" $c \" >" . xmlescape($v ) . " </string></property>\n " ;
124
128
}
125
129
126
130
print F <<EOF ;
0 commit comments