/[webwml]/webwml/stattrans.pl
ViewVC logotype

Diff of /webwml/stattrans.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.40 by barbier, Sun Nov 3 22:02:40 2002 UTC revision 1.41 by barbier, Sun Nov 3 22:13:55 2002 UTC
# Line 77  $altcvs->options( Line 77  $altcvs->options(
77  $max_versions = 5;  $max_versions = 5;
78  $min_versions = 1;  $min_versions = 1;
79    
80  $border_head = "<table width=95% align=center border=0 cellpadding=0 cellspacing=0><tr bgcolor=#000000><td>"  $border_head = "<table width=\"95%\" align=\"center\" border=0 cellpadding=0 cellspacing=0><tr bgcolor=\"#000000\"><td>"
81                ."<table width=100% border=0 cellpadding=0 cellspacing=1><tr bgcolor=#ffffff><td>";                ."<table width=\"100%\" border=0 cellpadding=0 cellspacing=1><tr bgcolor=\"#ffffff\"><td>";
82  $border_foot = "</td></tr></table></td></tr></table>";  $border_foot = "</td></tr></table></td></tr></table>";
83    
84    
# Line 252  foreach $lang (@search_in) { Line 252  foreach $lang (@search_in) {
252                          $o_body .= sprintf "<td>%s</td>", $transversion{"$lang/$file"};                          $o_body .= sprintf "<td>%s</td>", $transversion{"$lang/$file"};
253                          $o_body .= sprintf "<td>%s</td>", $version{"$orig/$file"};                          $o_body .= sprintf "<td>%s</td>", $version{"$orig/$file"};
254                          $o_body .= sprintf "<td>%s</td>", $msg;                          $o_body .= sprintf "<td>%s</td>", $msg;
255                          $o_body .= sprintf "<td>&nbsp;&nbsp;<a href=\"http://cvs.debian.org/webwml/$orig/%s.wml.diff\?r1=%s\&r2=%s\&cvsroot=webwml\&diff_format=%s\">%s -> %s</a></td>", $file, $transversion{"$lang/$file"}, $version{"$orig/$file"}, $config{'difftype'}, $transversion{"$lang/$file"}, $version{"$orig/$file"};                          $o_body .= sprintf "<td>&nbsp;&nbsp;<a href=\"http://cvs.debian.org/webwml/$orig/%s.wml.diff\?r1=%s\&amp;r2=%s\&amp;cvsroot=webwml\&amp;diff_format=%s\">%s -> %s</a></td>", $file, $transversion{"$lang/$file"}, $version{"$orig/$file"}, $config{'difftype'}, $transversion{"$lang/$file"}, $version{"$orig/$file"};
256                          $o_body .= "</tr>\n";                          $o_body .= "</tr>\n";
257                          $outdated{$lang}++;                          $outdated{$lang}++;
258                  # Up-to-date translations                  # Up-to-date translations
# Line 287  foreach $lang (@search_in) { Line 287  foreach $lang (@search_in) {
287      $percent_u{$lang} = 100 - $percent_a{$lang};      $percent_u{$lang} = 100 - $percent_a{$lang};
288    
289      if (open (HTML, ">$config{'htmldir'}/$l.html")) {      if (open (HTML, ">$config{'htmldir'}/$l.html")) {
290          printf HTML "<html><head><title>%s: %s</title></head><body bgcolor=#ffffff>\n", $config{'title'}, ucfirst $lang;          printf HTML "<html><head><title>%s: %s</title></head><body bgcolor=\"#ffffff\">\n", $config{'title'}, ucfirst $lang;
291    
292          $color = get_color ($percent_a{$lang});          $color = get_color ($percent_a{$lang});
293    
294          printf HTML "<table width=100%% cellpadding=2 cellspacing=0 bgcolor=%s>\n", $color;          printf HTML "<table width=\"100%%\" cellpadding=2 cellspacing=0 bgcolor=\"%s\">\n", $color;
295    
296          printf HTML "<tr><td colspan=4><h1 align=center>%s: %s</h1></td></tr>", $config{'title'}, ucfirst $lang;          printf HTML "<tr><td colspan=4><h1 align=\"center\">%s: %s</h1></td></tr>", $config{'title'}, ucfirst $lang;
297    
298          print HTML "<tr>\n";          print HTML "<tr>\n";
299          printf HTML "<td align=center width=25%%><b>%d files (%d%%) translated</b></td>", $wml{$lang}, $percent_a{$lang};          printf HTML "<td align=\"center\" width=\"25%%\"><b>%d files (%d%%) translated</b></td>", $wml{$lang}, $percent_a{$lang};
300          printf HTML "<td align=center width=25%%><b>%d files (%d%%) up to date</b></td>", $translated{$lang}, $percent_t{$lang};          printf HTML "<td align=\"center\" width=\"25%%\"><b>%d files (%d%%) up to date</b></td>", $translated{$lang}, $percent_t{$lang};
301          printf HTML "<td align=center width=25%%><b>%d files (%d%%) outdated</b></td>", $outdated{$lang}, $percent_o{$lang};          printf HTML "<td align=\"center\" width=\"25%%\"><b>%d files (%d%%) outdated</b></td>", $outdated{$lang}, $percent_o{$lang};
302          printf HTML "<td align=center width=25%%><b>%d files (%d%%) not translated</b></td>", $untranslated{$lang}, $percent_u{$lang};          printf HTML "<td align=\"center\" width=\"25%%\"><b>%d files (%d%%) not translated</b></td>", $untranslated{$lang}, $percent_u{$lang};
303          print HTML "</tr>\n";          print HTML "</tr>\n";
304          print HTML "</table>\n";          print HTML "</table>\n";
305    
# Line 326  foreach $lang (@search_in) { Line 326  foreach $lang (@search_in) {
326              print HTML $t_body;              print HTML $t_body;
327          }          }
328    
         print HTML "</table>\n";  
329          print HTML "<hr><address>Compiled at $date</address>\n";          print HTML "<hr><address>Compiled at $date</address>\n";
330          print HTML "</body></html>";          print HTML "</body></html>";
331          close (HTML);          close (HTML);
# Line 340  print "Creating index.html... " if ($con Line 339  print "Creating index.html... " if ($con
339  open (HTML, ">$config{'htmldir'}/index.html")  open (HTML, ">$config{'htmldir'}/index.html")
340      || die "Can't open $config{'htmldir'}/index.html";      || die "Can't open $config{'htmldir'}/index.html";
341    
342  printf HTML "<html>\n<head><title>%s</title></head>\n<body bgcolor=#ffffff>\n", $config{'title'};  printf HTML "<html>\n<head><title>%s</title></head>\n<body bgcolor=\"#ffffff\">\n", $config{'title'};
343  printf HTML "<h1 align=center>%s</h1>\n", $config{'title'};  printf HTML "<h1 align=\"center\">%s</h1>\n", $config{'title'};
344    
345  print HTML $border_head;  print HTML $border_head;
346  print HTML "<table width=100% border=0 bgcolor=\"#cdc9c9\">\n";  print HTML "<table width=\"100%\" border=0 bgcolor=\"#cdc9c9\">\n";
347  print HTML "<tr><th>Language</th><th>Translations</th><th>Up to date</th><th>Outdated</th><th>Not translated</th></tr>\n";  print HTML "<tr><th>Language</th><th>Translations</th><th>Up to date</th><th>Outdated</th><th>Not translated</th></tr>\n";
348  foreach $lang (@search_in) {  foreach $lang (@search_in) {
349      $l = $langs{$lang};      $l = $langs{$lang};
# Line 363  foreach $lang (@search_in) { Line 362  foreach $lang (@search_in) {
362      printf HTML "<td bgcolor=\"%s\" align=right>%d (%d%%)</td>", $color_u, $untranslated{$lang}, $percent_u{$lang};      printf HTML "<td bgcolor=\"%s\" align=right>%d (%d%%)</td>", $color_u, $untranslated{$lang}, $percent_u{$lang};
363      print HTML "</tr>\n",      print HTML "</tr>\n",
364  }  }
 print HTML $border_foot;  
365  print HTML "</table>\n";  print HTML "</table>\n";
366    print HTML $border_foot;
367    
368  print HTML $border_head;  print HTML $border_head;
369  print HTML "<table width=100% border=0 bgcolor=\"#cdc9c9\">\n";  print HTML "<table width=\"100%\" border=0 bgcolor=\"#cdc9c9\">\n";
370  print HTML "<tr><th>Language</th><th>File</th><th>Up to date</th><th>Fuzzy</th><th>Untranslated</th><th>Total</th></tr>\n";  print HTML "<tr><th>Language</th><th>File</th><th>Up to date</th><th>Fuzzy</th><th>Untranslated</th><th>Total</th></tr>\n";
371  foreach $lang (@search_in) {  foreach $lang (@search_in) {
372      next if $lang eq 'english';      next if $lang eq 'english';
# Line 396  foreach $lang (@search_in) { Line 395  foreach $lang (@search_in) {
395          print HTML "</tr>\n";          print HTML "</tr>\n";
396      }      }
397  }  }
 print HTML $border_foot;  
398  print HTML "</table>\n";  print HTML "</table>\n";
399    print HTML $border_foot;
400    
401  print HTML "<p><hr noshade size=1 width=100%>\n";  print HTML "<p><hr noshade size=1 width=\"100%\">\n";
402  print HTML "<p>Created with <a href=\"http://cvs.debian.org/webwml/stattrans.pl?cvsroot=webwml\">webwml-stattrans</a> at $date\n";  print HTML "<p>Created with <a href=\"http://cvs.debian.org/webwml/stattrans.pl?cvsroot=webwml\">webwml-stattrans</a> at $date\n";
403  print HTML "</body></html>\n";  print HTML "</body></html>\n";
404  close (HTML);  close (HTML);

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

  ViewVC Help
Powered by ViewVC 1.1.5