On Wed, May 07, 2003 at 01:27:13AM +0200, Frank Lichtenheld wrote:
> Package: www.debian.org
> Version: N/A; reported 2003-05-07
> Severity: minor
> 
> One (better three) example(s) for files, that are translated, but not checked 
> by stattrans.pl are the international/l10n/*/tmpl.src files.
> The problem is obvious: they do not end in .wml
> Since the suffix .wml is hardcoded at several places in stattrans.pl 
> (a quick check reveals at least four times), I can't provide a quick fix 
> for this, so just reporting ;)

This patch should work, but I did not fully check.

Denis
Index: stattrans.pl
===================================================================
RCS file: /cvs/webwml/webwml/stattrans.pl,v
retrieving revision 1.56
diff -u -r1.56 stattrans.pl
--- stattrans.pl        30 Apr 2003 10:41:46 -0000      1.56
+++ stattrans.pl        7 May 2003 00:24:08 -0000
@@ -31,7 +31,7 @@
 
 $opt_h = "/org/www.debian.org/www/devel/website/stats";
 $opt_w = "/org/www.debian.org/webwml";
-$opt_p = "*.wml";
+$opt_p = "*.(wml|src)";
 $opt_t = "Debian web site translation statistics";
 $opt_v = 0;
 $opt_d = "u";
@@ -113,10 +113,9 @@
     foreach my $f (@listfiles) {
        $file = substr ($f, $cutfrom);
        next if $transignore->is_global($file);
-       $file =~ s/\.wml$//;
        $files{$file} = 1;
        $wmlfiles{$lang} .= " " . $file;
-       my $transcheck = Webwml::TransCheck->new("$dir/$file.wml");
+       my $transcheck = Webwml::TransCheck->new("$dir/$file");
        if ($transcheck->revision()) {
            $transversion{"$lang/$file"} = $transcheck->revision();
            $original{"$lang/$file"} ||= $transcheck->original();
@@ -283,8 +282,8 @@
                        $o_body .= sprintf "<td>%s</td>", 
$transversion{"$lang/$file"};
                        $o_body .= sprintf "<td>%s</td>", 
$version{"$orig/$file"};
                        $o_body .= sprintf "<td>%s</td>", $msg;
-                       $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"};
-                       $o_body .= sprintf "<td><a 
href=\"http://cvs.debian.org/webwml/$orig/%s.wml?cvsroot=webwml#rev%s\";>[L]</a></td>",
 $file, $version{"$orig/$file"};
+                       $o_body .= sprintf "<td>&nbsp;&nbsp;<a 
href=\"http://cvs.debian.org/webwml/$orig/%s.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"};
+                       $o_body .= sprintf "<td><a 
href=\"http://cvs.debian.org/webwml/$orig/%s?cvsroot=webwml#rev%s\";>[L]</a></td>",
 $file, $version{"$orig/$file"};
                        $o_body .= sprintf "<td align=center>%s</td>", 
$maintainer{"$lang/$file"} || "";
                        $o_body .= "</tr>\n";
                        $outdated{$lang}++;

Reply via email to