Updated webwml-stattrans.
Hello. I've been doing some changes to webwml-stattrans because I find it
useful but not the most useful tool for tracking changes. I wanted to add the
feature of being able to see the CVS changes between versions.
Output corresponding to the changed script is in
http://ulises.adi.uam.es/~ender/webstats/
The patch to webwmlstattrans is attached. I'd like that you apply it, Joey.
:-)
Regards,
Ender.
PS: The diff can be an unified diff, too. It's only a config option. But I
prefer colored diff...it's cuter. :-)
--
Why is a cow? Mu. (Ommmmmmmmmm)
--
Responsable de News - Newsmanager
Servicios de red - Network services
Centro de Comunicaciones CSIC/RedIRIS
Spanish Academic Network for Research and Development
Madrid (Spain)
Tlf 91.585.49.05
--- webwml-stattrans.orig Mon Jun 18 17:07:02 2001
+++ webwml-stattrans Mon Jun 18 17:27:45 2001
@@ -27,6 +27,8 @@
'wmlpat' => '*.wml',
'title' => 'Website Translation Statistics',
'verbose' => 0,
+ #'diff_type' => '',
+ 'diff_type' => '&diff_format=h',
);
$max_versions = 5;
@@ -231,15 +233,24 @@
$msg = check_translation ($version{"$lang/$file"}, $version{"english/$file"}, "$lang/$file");
if (length ($msg)) {
$body .= sprintf ("<tr><td><a href=\"http://www.debian.org/%s.%s.html\">%s</a></td><td>%s</td><td>%s</td>"
- ."<td>%s</td></tr>\n",
- $file, $l, $file, $version{"$lang/$file"}, $version{"english/$file"}, $msg);
+ ."<td>%s</td><td>"
+ ." <a href=\"http://cvs.debian.org/webwml/english/%s.wml.diff\?r1=%s\&r2=%s\&cvsroot=webwml%s\">"
+ ."Diff between %s and %s</a></td></tr>\n",
+ $file, $l, $file, $version{"$lang/$file"}, $version{"english/$file"}, $msg, $file, $version{"$lang/$file"},
+ $version{"english/$file"}, $config{'diff_type'}, $version{"$lang/$file"}, $version{"english/$file"});
$outdated{$lang}++;
}
}
if ($body) {
print HTML "<h3>Out-dated pages:</h3>";
print HTML "<table border=0 cellpadding=1 cellspacing=1>\n";
- print HTML "<tr><th>File</th><th>Translated</th><th>English</th><th>Comment</th></tr>\n";
+ print HTML "<tr><th>File</th><th>Translated</th><th>English</th><th>Comment</th>";
+ if ($config{'diff_type'}) {
+ print HTML "<th>Colored diff</th>";
+ } else {
+ print HTML "<th>Unified diff</th>";
+ }
+ print HTML "</tr>\n";
print HTML $body;
print HTML "</table>\n";
}
Reply to: