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

Integration de p.d.o/~bertol dans w.d.o/intl/l10n: premier jet



Hello,

j'ai reussi a hacker un truc vite fait qui permet d'avoir l'etat tel
qu'annonce sur la liste dans les pages de stats. Pour cela, il faut:

1/ Les scripts de Nico (people.debian.org/~bertol/scripts) et surtout la DB qui
se trouve la. 

2/ Le fichier l10n-convert en attachement. Il ressemble au proto poste y'a deux
jours, mais fait son boulot, lui ;)

3/ En le lancant, on gagne un status.fr Il faut copier ce fichier dans
<wmlroot>/english/international/l10n/data

4/ Ensuite, il faut appliquer le patch diff-db.pm a
<wmlroot>/Perl/Webwml/L10n/Db.pm pour ajouter de nouveaux champs de control

5/ Ensuite, il faut appliquer le patch diff-scripts a
<wmlroot>/english/international/l10n/ pour que les scripts de generation des
pages prennent les donnees calculees a l'etape 3.

C'est bien goret a souhait. Ca ne fonctionne que pour la langue francaise
(j'ai un peu hardcode au debut de gen-files.sh, mais rien de grave je
pense), mais la colonne status est ajoutee dans toutes les langues. 

Les autres sont en droit de raler, mais si on arrive a mettre en place ce
service pour toutes les equipes, ils vont moins raller...

Donc, si on arrive a mettre en place la collecte pour toutes les langues, on
peut afficher les donnees pour toutes les langues. Elle est pas belle, la vie?

Le resultat est visible ici:
http://graal.ens-lyon.fr/~mquinson/debian/po-debconf.fr.html

Ya des trucs bizarres. Pleins de BTS et autres pour des trads deja a jour...
Je sais pas d'ou vient l'erreur, mais en indice, la DB pompee sur les pages
de Nico me cause pas doux (assert error, ou un truc du genre), alors j'ai
genere la mienne, presque pas brutalement...


Mon hack montre aussi l'etat des trucs pas encore traduits du tout, ce dont
je suis tres fier ;)


Bon, comment on fait pour faire que ce script ait une adresse mail a lui, et
recoive le courrier automatiquement?


Bye, Mt.

-- 
Source is provided to this software because we believe users have the right
to know exactly what a program is going to do before they run it.
#!/usr/bin/perl -w

use strict;
use utf8;

=head1 NAME

l10n-index

=head1 SYNOPSIS

l10n-index

=head1 DESCRIPTION

This script uses the SQLite database filled by the l10n-bot script to build a DB usable on w.d.o/intl/l10n

=cut

use DBI;

my $dbh = DBI -> connect("dbi:SQLite:dbname=l10n.sql", "", "", {RaiseError => 1, AutoCommit => 1});
use lib "/home/mquinson/src/DEBIAN/webwml/Perl";
use Webwml::L10n::Db;

my $data = Webwml::L10n::Db->new();
# $data->add_array2("aze");

# name, Translator, Status, Date, File, Bug

my $id_all;

my @types;
foreach (@{ $dbh -> selectall_arrayref("SELECT DISTINCT type FROM translation") }) {
	push @types, @$_;
}
@types = sort @types;

foreach my $type (@types) {

        my @names;
	
	foreach (@{ $dbh -> selectall_arrayref("SELECT DISTINCT name FROM translation WHERE type='$type'") }) {
		push @names, @$_;
	}
	@names = sort @names;
#    print "SELECT DISTINCT name FROM translation WHERE type='$type' -> ".scalar @names."\n";

    my $add = "$type";
    $add = "po-debconf" if ($type eq "debian-installer");
    next unless $add eq "po-debconf" || $add eq "po";

    $add = "po" if $add eq "po";
    $add = "podebconf" if $add eq "po-debconf";
    $add = "add_${add}status";
#    $add = "add_gettext";
    print "Handle $add ($type)\n";

	foreach my $name (@names) {
#	    print "Name = $name\n";
		my $class;

		my $row_all = $dbh -> selectall_arrayref("SELECT status,translator,date,url,bugnb  FROM translation WHERE type='$type' AND name='$name' ORDER BY date DESC");
		foreach my $row (@$row_all) {
			my ($status) = @$row;
			my %status = (
				taf  => 0,
				itt  => 1,
				rfr  => 2,
				itr  => 3,
				lcfc => 4,
				bts  => 5,
				done => 6,
				);
			$class = $status unless $class;
			$class = $status unless $status{$class} > $status{$status};
		}

		foreach my $row (@$row_all) {
		    my ($status, $translator, $date, $url, $bugnb) = @$row;
		    next if $status =~ m/^done$/;
		    
			my $file;
			if ($url) {
				$_ = $url;
				s/.*?(\d\d\d\d)(\d\d)\/msg(\d\d\d\d\d)\.html/[$1-$2-$3]/;
				$status = "<a href=\"$url\">$status</a>";
			}

		    $bugnb = "" unless (defined ($bugnb) and $bugnb ne "NULL");

		    my $pkgname = $name;
		    $file = $name;
		    $pkgname =~ s|/.*||;
		    $file =~ s|[^/]*/||;
		    if (!$data->has_package($pkgname)) {
#			print STDERR "Add pkg $pkgname\n";
			$data->package($pkgname);
			$data->add_package($pkgname,$pkgname);
		    }
#		    print "$add pkg($pkgname) translator($translator) status($status) bug($bugnb) file($file)\n";
		    $data->$add($pkgname,$translator,$status,$bugnb,$file);
		    last;
		}
	}
}
$data->write("status.fr");

=head1 LICENSE

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 

=head1 COPYRIGHT (C)

2003 Tim Dijkstra
2004 Tim Dijkstra, Nicolas Bertolissio

=cut
2004-03-02

Package: aboot-installer
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00348.html";>rfr</a>!!fr.po

Package: acl-installer
PodebconfStatus:
 Martin Quinson!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00282.html";>taf</a>!!fr.po

Package: acpid
PodebconfStatus:
 Cl&eacute;ment Stenac!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00772.html";>lcfc</a>!!fr.po

Package: album
PodebconfStatus:
 Denis Barbier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00295.html";>lcfc</a>!!fr.po

Package: aolserver4
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00517.html";>lcfc</a>!!fr.po

Package: apt-build
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00031.html";>rfr</a>!!fr.po

Package: aptitude
PoStatus:
 Martin Quinson!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00283.html";>taf</a>!!aptitude
 Nicolas Bertolissio!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00398.html";>itt</a>!!po/fr.po

Package: atlas3
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00219.html";>lcfc</a>!!fr.po

Package: base-config
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00424.html";>rfr</a>!!fr.po
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00342.html";>rfr</a>!!po/fr.po

Package: base-installer
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00783.html";>rfr</a>!!fr.po
 Michel Grentzinger!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00651.html";>bts</a>!!fr.po

Package: cdebootstrap
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00570.html";>bts</a>!232113!fr.po

Package: cdrom-detect
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00125.html";>rfr</a>!!fr.po

Package: clamav
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00782.html";>lcfc</a>!!fr.po

Package: common-lisp-controller
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00687.html";>bts</a>!227063!fr.po

Package: countrychooser
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00401.html";>rfr</a>!!fr.po

Package: courier
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00036.html";>bts</a>!235573!fr.po

Package: cpufreqd
PodebconfStatus:
 Eric!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00808.html";>bts</a>!234956!fr.po

Package: cvs
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00836.html";>lcfc</a>!!fr.po

Package: dhcp3
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00788.html";>bts</a>!211279!fr.po

Package: ding
PodebconfStatus:
 Olivier Gauwin!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00047.html";>rfr</a>!!fr.po

Package: epos
PodebconfStatus:
 R&eacute;mi Pannequin!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00296.html";>bts</a>!232099!fr.po

Package: facturalux
PodebconfStatus:
 Olivier Gauwin!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00034.html";>bts</a>!230817!fr.po

Package: flex
PodebconfStatus:
 Denis Barbier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00752.html";>itt</a>!!fr.po

Package: flow-tools
PodebconfStatus:
 R&eacute;mi Pannequin!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00065.html";>itt</a>!!fr.po

Package: fltk1.1
PodebconfStatus:
 eric!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00478.html";>bts</a>!232941!fr.po

Package: foomatic-filters
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00547.html";>lcfc</a>!!fr.po

Package: galternatives
PoStatus:
 Sebastien Bacher!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00278.html";>lcfc</a>!!fr.po

Package: gnus
PodebconfStatus:
 f1sxo!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00841.html";>itt</a>!!fr.po

Package: grep-dctrl
PoStatus:
 Nicolas Bertolissio!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00304.html";>itt</a>!!grep-dctrl
 Nicolas Bertolissio!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00291.html";>rfr</a>!!po/fr.po

Package: gtktrain
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00006.html";>lcfc</a>!!fr.po

Package: heimdal
PodebconfStatus:
 R&eacute;mi Pannequin!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00087.html";>rfr</a>!!fr.po

Package: hinfo
PodebconfStatus:
 Denis Barbier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00753.html";>itt</a>!!fr.po

Package: ilohamail
PodebconfStatus:
 Nicolas Bertolissio!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00444.html";>rfr</a>!!fr.po

Package: ipmask
PodebconfStatus:
 Philippe Batailler!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00214.html";>rfr</a>!!fr.po

Package: ipmasq
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00690.html";>bts</a>!227430!fr.po

Package: ircd-hybrid
PodebconfStatus:
 R&eacute;mi Pannequin!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00860.html";>bts</a>!235190!fr.po

Package: iso-codes
PoStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00149.html";>taf</a>!!fr.po

Package: iso-scan
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00318.html";>rfr</a>!!fr.po

Package: iterm
PodebconfStatus:
 R&eacute;mi Pannequin!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00089.html";>rfr</a>!!fr.po

Package: john
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00616.html";>lcfc</a>!!fr.po

Package: jsboard
PodebconfStatus:
 Martin Quinson!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00324.html";>taf</a>!!fr.po

Package: jspwiki
PodebconfStatus:
 R&eacute;mi Pannequin!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00859.html";>bts</a>!235191!fr.po

Package: juman
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00824.html";>taf</a>!!fr.po

Package: kdebase
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00009.html";>lcfc</a>!!fr.po

Package: kdevelop3
PodebconfStatus:
 Eric!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00020.html";>lcfc</a>!!fr.po

Package: kdrill
PodebconfStatus:
 Denis Barbier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00074.html";>lcfc</a>!!fr.po

Package: knews
PodebconfStatus:
 Eric!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00018.html";>bts</a>!235646!fr.po

Package: libapache-mod-acct
PodebconfStatus:
 R&eacute;mi Pannequin!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00843.html";>itt</a>!!fr.po

Package: libnss-ldap
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00854.html";>lcfc</a>!!fr.po

Package: libpam-ldap
PodebconfStatus:
 Martin Quinson!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00136.html";>bts</a>!220803!fr.po

Package: libusb
PodebconfStatus:
 Eric Madesclair!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00540.html";>bts</a>!233256!fr.po

Package: lyskom-elisp-client
PodebconfStatus:
 Olivier Gauwin!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00084.html";>rfr</a>!!fr.po

Package: lyx
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00692.html";>bts</a>!227198!fr.po

Package: mailman
PodebconfStatus:
 Philippe Batailler!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00289.html";>lcfc</a>!!fr.po

Package: man-db
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00372.html";>lcfc</a>!!fr.po

Package: mdadm
PodebconfStatus:
 eric!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00214.html";>lcfc</a>!!fr.po

Package: med-common
PodebconfStatus:
 Eric!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00022.html";>lcfc</a>!!fr.po

Package: med-dent
PodebconfStatus:
 Eric!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00021.html";>lcfc</a>!!fr.po

Package: mirrormagic
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00565.html";>lcfc</a>!!fr.po

Package: moodle
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00001.html";>lcfc</a>!!fr.po

Package: muse
PodebconfStatus:
 Cl&eacute;ment Stenac!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00285.html";>lcfc</a>!!fr.po

Package: myodbc
PodebconfStatus:
 Cl&eacute;ment Stenac!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00415.html";>lcfc</a>!!fr.po

Package: mysql-dfsg
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00107.html";>rfr</a>!!fr.po

Package: nas
PodebconfStatus:
 Eric!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00054.html";>rfr</a>!!fr.po

Package: nessus-plugins
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00696.html";>bts</a>!227961!fr.po

Package: nessusd-plugins
PodebconfStatus:
 Michel Grentzinger!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00729.html";>bts</a>!227961!fr.po

Package: netenv
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00007.html";>lcfc</a>!!fr.po

Package: nobootloader
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00515.html";>rfr</a>!!fr.po

Package: noflushd
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00628.html";>lcfc</a>!!fr.po

Package: nut
PodebconfStatus:
 Michel Grentzinger!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00653.html";>bts</a>!227964!fr.po

Package: oops
PodebconfStatus:
 Michel Grentzinger!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00579.html";>bts</a>!233489!fr.po

Package: openldap2
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00375.html";>lcfc</a>!!fr.po

Package: partman
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00908.html";>rfr</a>!!fr.po
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00850.html";>rfr</a>!!fr.po

Package: partman-auto
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00008.html";>rfr</a>!!fr.po

Package: partman-basicfilesystems
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00268.html";>lcfc</a>!!fr.po

Package: partman-basicmethods
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00265.html";>lcfc</a>!!fr.po

Package: partman-ext3
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00249.html";>rfr</a>!!fr.po

Package: partman-partitioning
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00906.html";>rfr</a>!!fr.po

Package: partman-target
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00274.html";>lcfc</a>!!fr.po

Package: pconsole
PodebconfStatus:
 Martin Quinson!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00137.html";>bts</a>!213809!debian/fr.po

Package: plex86
PodebconfStatus:
 Nicolas Bertolissio!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00883.html";>bts</a>!235273!fr.po

Package: plptools
PodebconfStatus:
 Nicolas Bertolissio!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00460.html";>bts</a>!228480!fr.po

Package: pnm2ppa
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00014.html";>lcfc</a>!!fr.po

Package: popularity-contest
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00105.html";>lcfc</a>!!fr.po

Package: post-faq
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00078.html";>bts</a>!230984!fr.po

Package: postgresql
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00279.html";>lcfc</a>!!fr.po

Package: ppp
PodebconfStatus:
 Olivier Gauwin!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00081.html";>rfr</a>!!fr.po

Package: prc-tools
PodebconfStatus:
 Martin Quinson!fix!193769!debian/fr.po

Package: prospect
PodebconfStatus:
 R&eacute;mi Pannequin!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00066.html";>rfr</a>!!fr.po

Package: quota
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00100.html";>rfr</a>!!fr.po

Package: sash
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00481.html";>lcfc</a>!!fr.po

Package: solid-pop3d
PodebconfStatus:
 R&eacute;mi Pannequin!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00309.html";>bts</a>!232111!fr.po

Package: surfraw
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00034.html";>rfr</a>!!fr.po

Package: tetex-bin
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00106.html";>rfr</a>!!fr.po

Package: thinkpad
PodebconfStatus:
 Michel Grentzinger!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00661.html";>bts</a>!228350!fr.po

Package: tiger
PodebconfStatus:
 Martin Quinson!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00139.html";>bts</a>!226883!debian/fr.po

Package: tripwire
PodebconfStatus:
 Michel Grentzinger!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00017.html";>bts</a>!230650!fr.po

Package: ucf
PodebconfStatus:
 Eric!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200403/msg00053.html";>lcfc</a>!!fr.po

Package: xfree86
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200402/msg00796.html";>bts</a>!234903!fr.po

Package: zope-formulator
PodebconfStatus:
 Christian Perrier!<a href="http://lists.debian.org/debian-l10n-french/2004/debian-l10n-french-200401/msg00010.html";>lcfc</a>!!fr.po

Attachment: diff-db.pm
Description: Perl program

Index: dtc.def
===================================================================
RCS file: /cvs/webwml/webwml/english/international/l10n/dtc.def,v
retrieving revision 1.43
diff -u -r1.43 dtc.def
--- dtc.def	10 Sep 2003 07:39:55 -0000	1.43
+++ dtc.def	2 Mar 2004 20:32:04 -0000
@@ -23,6 +23,10 @@
   <gettext domain="l10n">Translator</gettext>
 </define-tag>
 
+<define-tag status whitespace=delete>
+  <gettext domain="l10n">Status</gettext>
+</define-tag>
+
 <define-tag team whitespace=delete>
   <gettext domain="l10n">Team</gettext>
 </define-tag>
@@ -108,6 +112,7 @@
   <th><score></th>
   <th><file></th>
   <th><translator></th>
+  <th><status></th>
 </tr>
 %body
 </table>
Index: scripts/gen-files.pl
===================================================================
RCS file: /cvs/webwml/webwml/english/international/l10n/scripts/gen-files.pl,v
retrieving revision 1.41
diff -u -r1.41 gen-files.pl
--- scripts/gen-files.pl	7 Jan 2004 06:56:41 -0000	1.41
+++ scripts/gen-files.pl	2 Mar 2004 20:32:04 -0000
@@ -82,6 +82,11 @@
         }
 }
 
+# Get info about what's going on on the translator ML
+my %teaminfo;
+$teaminfo{'fr'} = Webwml::L10n::Db->new();
+$teaminfo{'fr'}->read("$opt_l/data/status.fr");
+
 sub transform_translator {
         my $name = shift or return "";
         #  Some translators forget the right angle bracket
@@ -502,8 +507,27 @@
 		        $str .= "</td><td>".show_stat($stat)."</td><td><a href=\"";
                         $str .= ($data->section($pkg) =~ m/non-US/ ? $rootnonus : $root) . "po/unstable/";
                         $str .= $data->pooldir($pkg)."/$link.gz\">$pofile</a></td>";
-		        $str .= "<td>$translator</td>".
-                              "</tr>\n";
+		        $str .= "<td>$translator</td>";
+		        my $lclang=lc($lang);
+		        if (defined ($teaminfo{"$lclang"}) 
+			    && $teaminfo{"$lclang"}->has_package($pkg)
+			    && $teaminfo{"$lclang"}->has_podebconfstatus($pkg)) {
+				print STDERR "USING PODEBCONFSTATUS\n";
+				foreach my $statusline (@{$teaminfo{"$lclang"}->podebconfstatus($pkg)}) {
+				    
+				    my ($ignore,$status,$bts,$ignoretoo)=@{$statusline};
+				    print STDERR "bts=".(defined $bts? $bts : "n/a")."status=$status;\n";
+				    $str .= "<td>$status ";
+				    if (defined $bts && length $bts) {
+					$str .= "(<a href=\"http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=$bts\";>#$bts</a>)";
+				    }
+				    $str .= "</td>";
+				    last;
+				}
+			}  else {
+			    $str .= "<td>&nbsp;</td>";
+			}
+		        $str .= "</tr>\n";
                         if ($stat =~ m/^(\d+)t(\d+)f(\d+)u$/) {
                                 $score{$lang} += $1;
                                 $addtotal = $1 + $2 + $3
@@ -521,10 +545,25 @@
                 $total{$section} += $addtotal;
 
                 foreach $lang (@pd_langs) {
-                        my $l = uc($lang) || 'UNKNOWN';
-                        next if $list{$l};
-                        $excl{$l}  = '' unless defined($excl{$l});
-                        $excl{$l} .= "<a href=\"pot#$pkg\">$pkg</a>, ";
+		    my $l = uc($lang) || 'UNKNOWN';
+		    next if $list{$l};
+		    $excl{$l}  = '' unless defined($excl{$l});
+		    $excl{$l} .= "<a href=\"pot#$pkg\">$pkg</a>";
+		    
+		    my $lclang = lc($lang);
+		    if (defined ($teaminfo{"$lclang"}) 
+			&& $teaminfo{"$lclang"}->has_package($pkg)
+			&& $teaminfo{"$lclang"}->has_podebconfstatus($pkg)) {
+
+			    foreach my $statusline (@{$teaminfo{"$lclang"}->podebconfstatus($pkg)}) {
+				my ($ignore,$status,$bts,$ignoretoo)=@{$statusline};
+				print STDERR "bts=".(defined $bts? $bts : "n/a")."status=$status;\n";
+				$excl{$l} .= " ($status)";
+				last;
+			    }
+			}
+		    $excl{$l} .= ", ";
+
                 }
         }
         foreach $lang (@pd_langs) {

Attachment: signature.asc
Description: Digital signature


Reply to: