| 222 |
printf HTML "<tr><td align=center width=50%%><b>%d files (%d%%) translated</b></td>", $wml{$l}, $percent; |
printf HTML "<tr><td align=center width=50%%><b>%d files (%d%%) translated</b></td>", $wml{$l}, $percent; |
| 223 |
printf HTML "<td align=center width=50%%><b>%d files untranslated</b></td></tr></table>", $wml{'en'} - $wml{$l}; |
printf HTML "<td align=center width=50%%><b>%d files untranslated</b></td></tr></table>", $wml{'en'} - $wml{$l}; |
| 224 |
|
|
| 225 |
print HTML "<p><a href=\"index.html\">Index</a><p>\n"; |
print HTML "<p><a href=\"./\">Index</a><p>\n"; |
| 226 |
print HTML "<p><a href=\"http://www.debian.org/devel/website/\">Working on the website</a><p>\n"; |
print HTML "<p><a href=\"../\">Working on the website</a><p>\n"; |
| 227 |
|
|
| 228 |
$body = ''; |
$body = ''; |
| 229 |
foreach $file (@sorted_english) { |
foreach $file (@sorted_english) { |
| 230 |
next if ($file eq ""); |
next if ($file eq ""); |
| 231 |
$msg = check_translation ($version{"$lang/$file"}, $version{"english/$file"}, "$lang/$file"); |
$msg = check_translation ($version{"$lang/$file"}, $version{"english/$file"}, "$lang/$file"); |
| 232 |
if (length ($msg)) { |
if (length ($msg)) { |
| 233 |
$body .= sprintf ("<tr><td><a href=\"http://www.debian.org/%s.%s.html\">%s</a></td><td>%s</td><td>%s</td>" |
$body .= sprintf ("<tr><td><a href=\"/%s.%s.html\">%s</a></td><td>%s</td><td>%s</td>" |
| 234 |
."<td>%s</td></tr>\n", |
."<td>%s</td></tr>\n", |
| 235 |
$file, $l, $file, $version{"$lang/$file"}, $version{"english/$file"}, $msg); |
$file, $l, $file, $version{"$lang/$file"}, $version{"english/$file"}, $msg); |
| 236 |
$outdated{$lang}++; |
$outdated{$lang}++; |
| 249 |
foreach $file (@sorted_english) { |
foreach $file (@sorted_english) { |
| 250 |
next if ($file eq ""); |
next if ($file eq ""); |
| 251 |
if (index ($wmlfiles{$l}, " $file ") < 0) { |
if (index ($wmlfiles{$l}, " $file ") < 0) { |
| 252 |
$body .= sprintf ("<a href=\"http://www.debian.org/%s\">%s</a><br>", $file, $file); |
$body .= sprintf ("<a href=\"/%s\">%s</a><br>", $file, $file); |
| 253 |
$untranslated{$lang}++; |
$untranslated{$lang}++; |
| 254 |
} |
} |
| 255 |
} |
} |
| 263 |
foreach $file (@sorted_english) { |
foreach $file (@sorted_english) { |
| 264 |
next if ($file eq ""); |
next if ($file eq ""); |
| 265 |
if (index ($wmlfiles{$l}, " $file ") >= 0) { |
if (index ($wmlfiles{$l}, " $file ") >= 0) { |
| 266 |
$body .= sprintf ("<a href=\"http://www.debian.org/%s.%s.html\">%s</a><br>\n", |
$body .= sprintf ("<a href=\"/%s.%s.html\">%s</a><br>\n", |
| 267 |
$file, $l, $file); |
$file, $l, $file); |
| 268 |
$translated{$lang}++; |
$translated{$lang}++; |
| 269 |
} |
} |
| 286 |
open (HTML, ">$config{'htmldir'}/index.html") |
open (HTML, ">$config{'htmldir'}/index.html") |
| 287 |
|| die "Can't open $config{'htmldir'}/index.html"; |
|| die "Can't open $config{'htmldir'}/index.html"; |
| 288 |
|
|
| 289 |
printf HTML "<html><head><title>%s</title></head><body bgcolor=#ffffff>\n", $config{'title'}; |
printf HTML "<html>\n<head><title>%s</title></head>\n<body bgcolor=#ffffff>\n", $config{'title'}; |
| 290 |
printf HTML "<h1>%s</h1>", $config{'title'}; |
printf HTML "<h1>%s</h1>\n", $config{'title'}; |
| 291 |
|
|
| 292 |
print HTML $border_head; |
print HTML $border_head; |
| 293 |
print HTML "<table border=0 bgcolor=\"#cdc9c9\">"; |
print HTML "<table border=0 bgcolor=\"#cdc9c9\">\n"; |
| 294 |
print HTML "<tr><th>Language</th><th>Percent</th><th>Translated</th><th>Out-dated</th><th>Untranslated</th></tr>\n"; |
print HTML "<tr><th>Language</th><th>Percent</th><th>Translated</th><th>Out-dated</th><th>Untranslated</th></tr>\n"; |
| 295 |
foreach $lang (sort (keys %langs)) { |
foreach $lang (sort (keys %langs)) { |
| 296 |
$l = $langs{$lang}; |
$l = $langs{$lang}; |
| 304 |
print HTML "</tr></table>"; |
print HTML "</tr></table>"; |
| 305 |
print HTML $border_foot; |
print HTML $border_foot; |
| 306 |
|
|
| 307 |
print HTML "</table>"; |
print HTML "</table>\n"; |
| 308 |
print HTML "<p><a href=\"webwml-stattrans\">webwml-stattrans</a><p>\n"; |
print HTML "<p>Made with <a href=\"http://cvs.debian.org/webwml/stattrans.pl?cvsroot=webwml\">webwml-stattrans</a>\n"; |
| 309 |
print HTML "<hr><address>Compiled at $date</address>\n"; |
print HTML "<p><hr><address>Compiled at $date</address>\n"; |
| 310 |
print HTML "</body></html>"; |
print HTML "</body></html>\n"; |
| 311 |
close (HTML); |
close (HTML); |
| 312 |
|
|
| 313 |
|
|