| 26 |
$opt_p = "*.wml"; |
$opt_p = "*.wml"; |
| 27 |
$opt_t = "Debian Web site Translation Statistics"; |
$opt_t = "Debian Web site Translation Statistics"; |
| 28 |
$opt_v = 0; |
$opt_v = 0; |
| 29 |
|
$opt_d = "u"; |
| 30 |
getopts('hwptv'); |
getopts('hwptv'); |
| 31 |
%config = ( |
%config = ( |
| 32 |
'htmldir' => $opt_h, |
'htmldir' => $opt_h, |
| 34 |
'wmlpat' => $opt_p, |
'wmlpat' => $opt_p, |
| 35 |
'title' => $opt_t, |
'title' => $opt_t, |
| 36 |
'verbose' => $opt_v, |
'verbose' => $opt_v, |
| 37 |
|
'diff' => $opt_d, |
| 38 |
); |
); |
| 39 |
|
|
| 40 |
$max_versions = 5; |
$max_versions = 5; |
| 231 |
# Outdated translations |
# Outdated translations |
| 232 |
$msg = check_translation ($version{"$lang/$file"}, $version{"english/$file"}, "$lang/$file"); |
$msg = check_translation ($version{"$lang/$file"}, $version{"english/$file"}, "$lang/$file"); |
| 233 |
if (length ($msg)) { |
if (length ($msg)) { |
| 234 |
$o_body .= sprintf ("<tr><td><a href=\"/%s.%s.html\">%s</a></td><td>%s</td><td>%s</td>" |
$o_body .= "<tr>"; |
| 235 |
."<td>%s</td></tr>\n", |
$o_body .= sprintf "<td><a href=\"/%s.%s.html\">%s</a></td>", $file, $l, $file; |
| 236 |
$file, $l, $file, $version{"$lang/$file"}, $version{"english/$file"}, $msg); |
$o_body .= sprintf "<td>%s</td>", $version{"$lang/$file"}; |
| 237 |
|
$o_body .= sprintf "<td>%s</td>", $version{"english/$file"}; |
| 238 |
|
$o_body .= sprintf "<td>%s</td>", $msg; |
| 239 |
|
$o_body .= sprintf "<td> <a href=\"http://cvs.debian.org/webwml/english/%s.wml.diff\?r1=%s\&r2=%s\&cvsroot=webwml\&diff_format=%s\">%s -> %s</a></td>", $file, $version{"$lang/$file"}, $version{"english/$file"}, $config{'diff_type'}, $version{"$lang/$file"}, $version{"english/$file"}; |
| 240 |
|
$o_body .= "</tr>\n"; |
| 241 |
$outdated{$lang}++; |
$outdated{$lang}++; |
| 242 |
} |
} |
| 243 |
} |
} |
| 282 |
if ($o_body) { |
if ($o_body) { |
| 283 |
print HTML "<h3>Outdated translations:</h3>"; |
print HTML "<h3>Outdated translations:</h3>"; |
| 284 |
print HTML "<table border=0 cellpadding=1 cellspacing=1>\n"; |
print HTML "<table border=0 cellpadding=1 cellspacing=1>\n"; |
| 285 |
print HTML "<tr><th>File</th><th>Translated</th><th>English</th><th>Comment</th></tr>\n"; |
print HTML "<tr><th>File</th><th>Translated</th><th>English</th><th>Comment</th>"; |
| 286 |
|
if ($opt_d eq "u") { print HTML "<th>Unified diff</th>"; } |
| 287 |
|
elsif ($opt_d eq "h") { print HTML "<th>Colored diff</th>"; } |
| 288 |
|
else { print HTML "<th>Diff</th>"; } |
| 289 |
|
print HTML "</tr>\n"; |
| 290 |
print HTML $o_body; |
print HTML $o_body; |
| 291 |
print HTML "</table>\n"; |
print HTML "</table>\n"; |
| 292 |
} |
} |