From a958734f8b16abea944882772da5d8bd6a2897c4 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 29 Mar 2009 03:51:06 +0900 Subject: [PATCH] strip trailing whitespace and wrap lines in stats --- anki/stats.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/anki/stats.py b/anki/stats.py index 91dda8fda..367e3f966 100644 --- a/anki/stats.py +++ b/anki/stats.py @@ -332,20 +332,27 @@ class DeckStats(object): html += _("Total number of facts:") + " %d

" % d.factCount html += "" + _("Card counts") + "
" - html += _("Mature cards:") + " %(old)d (%(oldP)s)
" % {'old': stats['old'], 'oldP' : fmtPerc(stats['oldP'])} - html += _("Young cards:") + " %(young)d (%(youngP)s)
" % {'young': stats['young'], 'youngP' : fmtPerc(stats['youngP'])} - html += _("Unseen cards:") + " %(new)d (%(newP)s)

" % {'new': stats['new'], 'newP' : fmtPerc(stats['newP'])} + html += _("Mature cards:") + " %(old)d (%(oldP)s)
" % { + 'old': stats['old'], 'oldP' : fmtPerc(stats['oldP'])} + html += _("Young cards:") + " %(young)d (%(youngP)s)
" % { + 'young': stats['young'], 'youngP' : fmtPerc(stats['youngP'])} + html += _("Unseen cards:") + " %(new)d (%(newP)s)

" % { + 'new': stats['new'], 'newP' : fmtPerc(stats['newP'])} html += "" + _("Correct answers") + "
" html += _("Mature cards:") + "" + fmtPerc(stats['gMatureYes%']) + ( - " " + _("%(partOf)d of %(totalSum)d") % {'partOf' : stats['gMatureYes'], + " " + _("%(partOf)d of %(totalSum)d") % { + 'partOf' : stats['gMatureYes'], 'totalSum' : stats['gMatureTotal'] } + "
") html += _("Young cards:") + " " + fmtPerc(stats['gYoungYes%']) + ( - " " + _("%(partOf)d of %(totalSum)d") % {'partOf' : stats['gYoungYes'], + " " + _("%(partOf)d of %(totalSum)d") % { + 'partOf' : stats['gYoungYes'], 'totalSum' : stats['gYoungTotal'] } + "
") html += _("First-seen cards:") + " " + fmtPerc(stats['gNewYes%']) + ( - " " + _("%(partOf)d of %(totalSum)d") % {'partOf' : stats['gNewYes'], + " " + _("%(partOf)d of %(totalSum)d") % { + 'partOf' : stats['gNewYes'], 'totalSum' : stats['gNewTotal'] } + "

") + # average pending time existing = d.cardCount - d.newCountToday avgInt = self.getAverageInterval()