Add generation of qualified list
authorPeter Eisentraut <peter_e@gmx.net>
Sat, 3 Oct 2009 05:48:19 +0000 (05:48 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Sat, 3 Oct 2009 05:48:19 +0000 (05:48 +0000)
wwwtools/nls-status-page
wwwtools/nls-status-table
wwwtools/update-nls-www

index 7caa9dd26c28c083d5854cd24074d030ed8a8d9c..f20cc93caf03178c368aa7381f46a030a0e48608 100755 (executable)
@@ -119,6 +119,8 @@ foreach $b (@branches) {
     open F, "$dir/table-${b}.html" or die $!;
     print foreach <F>;
     close F;
+
+    print "<p><a href='qualified-list-$b.txt'>qualified list</a></p>\n" if -e "$dir/qualified-list-$b.txt";
 }
 
 print <<_EOF_;
index 43a61250fb8e1e1889f414449774059f5f745f28..e98e9677cd35f0320fd49871a5744b69238702ba 100755 (executable)
@@ -14,8 +14,10 @@ use I18N::LangTags::List;
 our $QUALIFIED_CUTOFF = 80;
 
 my %opts;
-getopts('U:', \%opts) or die;
+getopts('U:l:', \%opts) or die;
 my $po_url = $opts{'U'} || 'po';
+my $list_file = $opts{'l'};
+open LIST, '>', $opts{'l'} if $list_file;
 
 my $everything;
 my $errors;
@@ -136,6 +138,8 @@ foreach my $catalog (sort @catalogs) {
            print "&#x00A0;";
        }
        print "</td>\n";
+
+       print LIST "$catalog/$lang\n" if $list_file and $pct >= $QUALIFIED_CUTOFF;
     }
 
     print "<td align=\"center\">";
@@ -169,6 +173,7 @@ print "</tr>\n\n";
 print "</table>\n";
 print "</div>\n";
 
+close LIST if $list_file;
 
 
 sub list_sum {
index c08c6acfe503ebd6eb5a93d6346f9af5ec2ac3be..46b512b406e6cf31a1c3c055685652105bcb5dd3 100755 (executable)
@@ -63,13 +63,13 @@ for branch in $active_branches; do
        popd
 
        # remove old data in case it contained garbage
-       rm -rf $WEBDIR/po-$branch $WEBDIR/table-$branch.html
+       rm -rf $WEBDIR/po-$branch $WEBDIR/qualified-list-$branch.txt $WEBDIR/table-$branch.html
 
        mkdir -p $WEBDIR/po-$branch
        files=`find $PGSRC.work -name nls.mk`
        $MYDIR/pg-make-po -o $WEBDIR/po-$branch -v $branch $files
 
-       (cd $WEBDIR/po-$branch && $MYDIR/nls-status-table -U po-$branch *.pot *.po >$WEBDIR/table-$branch.html)
+       (cd $WEBDIR/po-$branch && $MYDIR/nls-status-table -U po-$branch -l $WEBDIR/qualified-list-$branch.txt *.po *.pot >$WEBDIR/table-$branch.html)
 
 #      $MYDIR/pg-make-conflicts $branch $MYDIR $WEBDIR