Peter Palfrader commited on 2007-10-24 15:42:39
Zeige 4 geänderte Dateien mit 22 Einfügungen und 1 Löschungen.
... | ... |
@@ -38,17 +38,34 @@ sub do_status($$) { |
38 | 38 |
}; |
39 | 39 |
}; |
40 | 40 |
}; |
41 |
+ my %priorities; |
|
42 |
+ for my $file (keys %{$files{'en'}}) { |
|
43 |
+ my $p = $files{'en'}->{$file}->{'all'}->{'Translation-Priority'}; |
|
44 |
+ if (defined $p) { |
|
45 |
+ $priorities{$p} = 1; |
|
46 |
+ }; |
|
47 |
+ }; |
|
48 |
+ my @priorities = sort {$a cmp $b} keys %priorities; |
|
49 |
+ push @priorities, 'other'; |
|
50 |
+ |
|
51 |
+ my $HTMLBASE = (defined $ENV{'HTMLBASE'} ? $ENV{'HTMLBASE'} : 'https://www.torproject.org/') . ($dir eq '.' ? '' : $dir.'/'); |
|
52 |
+ |
|
41 | 53 |
|
42 | 54 |
print "<h1>$dir</h1>\n"; |
43 | 55 |
|
56 |
+ for my $priority (@priorities) { |
|
57 |
+ print "<h2>$priority</h2>\n"; |
|
44 | 58 |
print "<table border=1>\n"; |
45 | 59 |
print "<tr>\n"; |
46 | 60 |
print "<th>File</th>\n"; |
47 | 61 |
printf("<th>%s (%s)</th>\n", $_, $LANGUAGES{$_}) for ('en', grep { $_ ne 'en' } @LANGUAGES); |
48 | 62 |
print "</tr>\n"; |
49 |
- my $HTMLBASE = (defined $ENV{'HTMLBASE'} ? $ENV{'HTMLBASE'} : 'https://www.torproject.org/') . ($dir eq '.' ? '' : $dir.'/'); |
|
50 | 63 |
|
51 | 64 |
for my $file (sort {$a cmp $b} keys %{$files{'en'}}) { |
65 |
+ my $file_priority = $files{'en'}->{$file}->{'all'}->{'Translation-Priority'}; |
|
66 |
+ next if (defined $file_priority && $priority ne $file_priority); |
|
67 |
+ next if (!defined $file_priority && $priority ne 'other'); |
|
68 |
+ |
|
52 | 69 |
my $obs = file_is_obsolete($dir, 'en', $file); |
53 | 70 |
my $validatorlink = ''; |
54 | 71 |
my $htmlfile = $file; |
... | ... |
@@ -119,6 +136,7 @@ sub do_status($$) { |
119 | 136 |
print "</tr>\n\n"; |
120 | 137 |
}; |
121 | 138 |
print "</table>\n\n\n"; |
139 |
+ }; |
|
122 | 140 |
|
123 | 141 |
for my $lang (@LANGUAGES) { |
124 | 142 |
next if $lang eq 'en'; |
125 | 143 |