[Debian-l10n-commits] r1265 - in /dl10n/trunk: Changelog dl10n-txt
nekral-guest at users.alioth.debian.org
nekral-guest at users.alioth.debian.org
Fri Sep 26 18:49:27 UTC 2008
Author: nekral-guest
Date: Fri Sep 26 18:49:27 2008
New Revision: 1265
URL: http://svn.debian.org/wsvn/?sc=1&rev=1265
Log:
* dl10n-txt: Add support for databases with history.
Modified:
dl10n/trunk/Changelog
dl10n/trunk/dl10n-txt
Modified: dl10n/trunk/Changelog
URL: http://svn.debian.org/wsvn/dl10n/trunk/Changelog?rev=1265&op=diff
==============================================================================
--- dl10n/trunk/Changelog (original)
+++ dl10n/trunk/Changelog Fri Sep 26 18:49:27 2008
@@ -1,3 +1,7 @@
+2008-09-07 Nicolas François <nicolas.francois at centraliens.net>
+
+ * dl10n-txt: Add support for databases with history.
+
2008-09-07 Nicolas François <nicolas.francois at centraliens.net>
* lib/Debian/L10n/Spider.pm: Do not fail if there is no From:
Modified: dl10n/trunk/dl10n-txt
URL: http://svn.debian.org/wsvn/dl10n/trunk/dl10n-txt?rev=1265&op=diff
==============================================================================
--- dl10n/trunk/dl10n-txt (original)
+++ dl10n/trunk/dl10n-txt Fri Sep 26 18:49:27 2008
@@ -251,24 +251,27 @@
$score{$part} = '---';
if ($show_status && $statusDB->has_package($pkg) && $statusDB->has_status($pkg)) {
- my $nobts = 0;
+ my $tmpstatus;
foreach my $statusline (@{$statusDB->status($pkg)}) {
my ($kind,$file,$date,$status_from_db,$translator,$url,$bug_nb) = @{$statusline};
+ # FIXME sort on file? (e.g. dpkg has different
+ # files)
if ($kind eq $part) {
my $days = "??";
if ($date =~ m/^(\d{4})-(\d\d)-(\d\d) (\d*):(\d*):(\d*)/) { # 2003-07-26
$days = sprintf "%.0f",
(time - timelocal ($6,$5,$4,$3,$2-1,$1)) / (60 * 60 * 24);
}
- $status .= "$status_from_db, $days days ";
- if (($status_from_db =~ m/^(bts|done|hold|fix|wontfix)$/i) and (not $nobts)) {
+ $tmp = "$status_from_db, $days days ";
+ if ($status_from_db =~ m/^(bts|done|hold|fix|wontfix)$/i) {
$bts_reported = 1;
} else {
$bts_reported = 0;
- $nobts = 1;
}
}
}
+ # Only keep the last status.
+ $status .= $tmpstatus if defined $tmpstatus;
} elsif ($show_status && $statusEnDB->has_package($pkg) && $statusEnDB->has_status($pkg)) {
foreach my $statusline (@{$statusEnDB->status($pkg)}) {
my ($kind,$file,$date,$status_from_db,$translator,$url,$foo,$bug_nb) = @{$statusline};
More information about the Debian-l10n-commits
mailing list