OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / untrans-list.pl
1 #!/usr/bin/env perl
2
3 print <<EOF;
4 <HTML>
5 <HEAD>Translation status of LDP man-pages</HEAD>
6 <BODY>
7 <TABLE BORDER=1>
8 <TR><TH>page name</TH><TH>remaining</TH><TH>comp. %</TH></TR>
9 EOF
10
11 $poname = "";
12
13 while (<>) {
14     if (/^po4a/) {
15         @dat = split;
16         $cfg = $dat[$#dat];
17         @dat = split('/', $cfg);
18         $poname = $dat[2];
19         $poname =~ s/\.cfg$//;
20         printf("<TR><TD ALIGN=\"center\" COLSPAN=3 BGCOLOR=\"Yellow\">" .
21                "<B>%s</B></TD></TR>\n", $poname);
22     }
23     next if ! /^Discard /;
24     s/\(//;
25     s/\)//;
26     @dat = split(' ');
27     $page = $dat[1];
28     $comp = $dat[2];
29     $all  = $dat[4];
30     $ratio = $comp/$all*100;
31     #printf("%s: %d/%d, %.2f\n", $page, $comp, $all, $comp/$all*100);
32     printf("<TR><TD>%s</TD><TD>%d/%d</TD><TD>%.2f</TD>\n",
33            $page, ($all - $comp), $all, $ratio);
34 }
35
36 print <<EOF;
37 </TABLE>
38 </BODY></HTML>
39 EOF