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

Diff of /webwml/stattrans.pl

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

revision 1.61 by barbier, Sat May 8 15:49:03 2004 UTC revision 1.62 by barbier, Sat May 8 15:56:10 2004 UTC
# Line 209  my ( %po_translated, %po_fuzzy, %po_untr Line 209  my ( %po_translated, %po_fuzzy, %po_untr
209  my ( %percent_po_t, %percent_po_u, %percent_po_f );  my ( %percent_po_t, %percent_po_u, %percent_po_f );
210  foreach $lang (@search_in) {  foreach $lang (@search_in) {
211      next if $lang eq 'english';      next if $lang eq 'english';
     $l = $langs{$lang};  
212      $po_translated{"total"}{$lang} = $po_fuzzy{"total"}{$lang} = $po_untranslated{"total"}{$lang} = 0;      $po_translated{"total"}{$lang} = $po_fuzzy{"total"}{$lang} = $po_untranslated{"total"}{$lang} = 0;
213      my @status = qx,LC_ALL=C make -C $opt_w/$lang/po stats 2>&1 1>/dev/null,;      my @status = qx,LC_ALL=C make -C $opt_w/$lang/po stats 2>&1 1>/dev/null,;
214      foreach $line (@status) {      foreach $line (@status) {
# Line 398  foreach $lang (@search_in) { Line 397  foreach $lang (@search_in) {
397      #            print HTML $border_head;      #            print HTML $border_head;
398                  print HTML "<table width=\"100%\" border=0>\n";                  print HTML "<table width=\"100%\" border=0>\n";
399                  print HTML "<tr><th>File</th><th>Up to date</th><th>Fuzzy</th><th>Untranslated</th><th>Total</th></tr>\n";                  print HTML "<tr><th>File</th><th>Up to date</th><th>Fuzzy</th><th>Untranslated</th><th>Total</th></tr>\n";
                 $l = $langs{$lang};  
                 $l = "zh-cn" if ($l eq "zh"); # kludge  
   
400                  foreach my $domain (sort keys %po_total) {                  foreach my $domain (sort keys %po_total) {
401                      next if $domain eq 'total';                      next if $domain eq 'total';
402                      print HTML "<tr>";                      print HTML "<tr>";
# Line 456  foreach $lang (@search_in) { Line 452  foreach $lang (@search_in) {
452      my @processed_langs = ($langs{$lang});      my @processed_langs = ($langs{$lang});
453      @processed_langs = ("zh-cn", "zh-tw") if $langs{$lang} eq "zh";      @processed_langs = ("zh-cn", "zh-tw") if $langs{$lang} eq "zh";
454      foreach $l (@processed_langs) {      foreach $l (@processed_langs) {
455      $color_a = get_color ($percent_a{$lang});          $color_a = get_color ($percent_a{$lang});
456      $color_t = get_color ($percent_t{$lang});          $color_t = get_color ($percent_t{$lang});
457      $color_o = get_color (100 - $percent_o{$lang});          $color_o = get_color (100 - $percent_o{$lang});
458      $color_u = get_color (100 - $percent_u{$lang});          $color_u = get_color (100 - $percent_u{$lang});
459    
460      print HTML "<tr>";          print HTML "<tr>";
461      printf HTML "<td><a href=\"%s.html\">%s</a> (%s)</td>", $l, ucfirst $lang, $l;          printf HTML "<td><a href=\"%s.html\">%s</a> (%s)</td>", $l, ucfirst $lang, $l;
462      printf HTML "<td bgcolor=\"%s\" align=right>%d (%d%%)</td>", $color_a, $wml{$lang}, $percent_a{$lang};          printf HTML "<td bgcolor=\"%s\" align=right>%d (%d%%)</td>", $color_a, $wml{$lang}, $percent_a{$lang};
463      printf HTML "<td bgcolor=\"%s\" align=right>%d (%d%%)</td>", $color_t, $translated{$lang}, $percent_t{$lang};          printf HTML "<td bgcolor=\"%s\" align=right>%d (%d%%)</td>", $color_t, $translated{$lang}, $percent_t{$lang};
464      printf HTML "<td bgcolor=\"%s\" align=right>%d (%d%%)</td>", $color_o, $outdated{$lang}, $percent_o{$lang};          printf HTML "<td bgcolor=\"%s\" align=right>%d (%d%%)</td>", $color_o, $outdated{$lang}, $percent_o{$lang};
465      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};
466      print HTML "</tr>\n",          print HTML "</tr>\n",
467      }      }
468  }  }
469  print HTML "</table>\n";  print HTML "</table>\n";
# Line 483  foreach $lang (@search_in) { Line 479  foreach $lang (@search_in) {
479      my @processed_langs = ($langs{$lang});      my @processed_langs = ($langs{$lang});
480      @processed_langs = ("zh-cn", "zh-tw") if $langs{$lang} eq "zh";      @processed_langs = ("zh-cn", "zh-tw") if $langs{$lang} eq "zh";
481      foreach $l (@processed_langs) {      foreach $l (@processed_langs) {
482      print HTML "<tr>";          print HTML "<tr>";
483      printf HTML "<td><a href=\"%s.html#gettext\">%s</a> (%s)</td>", $l, ucfirst $lang, $l;          printf HTML "<td><a href=\"%s.html#gettext\">%s</a> (%s)</td>", $l, ucfirst $lang, $l;
484      $color_t = get_color ($percent_po_t{'total'}{$lang});          $color_t = get_color ($percent_po_t{'total'}{$lang});
485      $color_f = get_color (100 - $percent_po_f{'total'}{$lang});          $color_f = get_color (100 - $percent_po_f{'total'}{$lang});
486      $color_u = get_color (100 - $percent_po_u{'total'}{$lang});          $color_u = get_color (100 - $percent_po_u{'total'}{$lang});
487      printf HTML "<td bgcolor=\"%s\" align=right>%d (%d%%)</td>", $color_t, $po_translated{'total'}{$lang}, $percent_po_t{'total'}{$lang};          printf HTML "<td bgcolor=\"%s\" align=right>%d (%d%%)</td>", $color_t, $po_translated{'total'}{$lang}, $percent_po_t{'total'}{$lang};
488      printf HTML "<td bgcolor=\"%s\" align=right>%d (%d%%)</td>", $color_f, $po_fuzzy{'total'}{$lang}, $percent_po_f{'total'}{$lang};          printf HTML "<td bgcolor=\"%s\" align=right>%d (%d%%)</td>", $color_f, $po_fuzzy{'total'}{$lang}, $percent_po_f{'total'}{$lang};
489      printf HTML "<td bgcolor=\"%s\" align=right>%d (%d%%)</td>", $color_u, $po_untranslated{'total'}{$lang}, $percent_po_u{'total'}{$lang};          printf HTML "<td bgcolor=\"%s\" align=right>%d (%d%%)</td>", $color_u, $po_untranslated{'total'}{$lang}, $percent_po_u{'total'}{$lang};
490      print HTML "</tr>\n";          print HTML "</tr>\n";
491      }      }
492  }  }
493    

Legend:
Removed from v.1.61  
changed lines
  Added in v.1.62

  ViewVC Help
Powered by ViewVC 1.1.5