[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: stattrans.pl improvements



        Hi!

On Mon, Sep 10, 2001, Matt Kraai wrote:
> The first hunk of this patch calculates the percentages of
> up-to-date and outdated pages relative to the number of pages
> translated into that language, rather than the total number of
> pages.
> 
> The first part of the second hunk inverts the colorization of the
> outdated and untranslated pages so that they are green when things
> are good (i.e., no outdated/untranslated page) and red when things
> are bad.

 Yes, that tweak sounds really reasonable.

> The second part of second hunk eliminates the special case for
> English so that its translation statistics are also displayed on
> the index page.

 Woooohooo!  This is all I ever wanted, and what we really need. I once
asked about it and was frowned upon - but I think people will see that
it helps us - like, people with originals in their language can now check
if they forgot to update the english version, finally!


> You can see the results of these changes at
> http://opensource.lineo.com/~kraai/stats/.  Are any/all of these
> changes OK?

 There is one little mistake in this page (I guess then, in the script,
too):  The untranslated files have the same % like the translated files,
although the numbers differ.  The translated % seems to be the correct
one.

> Unfixed by this patch, non-English originals with no English
> translation are not included in any of the statistics.  I'm
> planning to fix that.

 Sounds reasonable and good.  If there is an orig next to the
translation-check it should be considered correctly.

 Maybe you should add a second <th> row below "Up to date" and
"Outdated" which says "percents relative to translated" or such, to not
let come up any confusion.  Maybe in a small font or such.

 Something along these lines:

-----------------------------------------------------------------------
--- stattrans.pl        2001/09/07 21:46:20     1.25
+++ stattrans.pl        2001/09/10 16:59:36
@@ -324,7 +324,8 @@
 
 print HTML $border_head;
 print HTML "<table width=100% border=0 bgcolor=\"#cdc9c9\">\n";
-print HTML "<tr><th>Language</th><th>Translations</th><th>Up to date</th><th>Outdated</th><th>Not translated</th></tr>\n";
+print HTML "<tr><th rowspan=2>Language</th><th rowspan=2>Translations</th><th>Up to date</th><th>Outdated</th><th rowspan=2>Not translated</th></tr>\n";
+print HTML "<tr><th colspan=2><font size=\"-1\">percents relative to translated</font></th></tr>\n";
 foreach $lang (@search_in) {
     $l = $langs{$lang};
     $l = "zh-cn" if ($l eq "zh"); # kludge
-----------------------------------------------------------------------

 That should do the trick.
Alfie 
-- 
 You never learn anything  |   /"""""\                   ,'~~.
   by doing it right.      |  / chaos \  alfie.ist.org   |o ?~\
           -- unknown      |  \inside!/  alfie@ist.org  /_   ~<\
                           |   \_____/                   \__,~ \>



Reply to: