mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
fix error on stats when translation had %f in different place
This commit is contained in:
parent
8e2b653bd0
commit
1fc1c56aa9
1 changed files with 5 additions and 4 deletions
|
@ -354,13 +354,14 @@ group by day order by day""" % (self._limit(), lim),
|
||||||
if total and tot:
|
if total and tot:
|
||||||
perMin = total / float(tot)
|
perMin = total / float(tot)
|
||||||
perMin = round(perMin, 1)
|
perMin = round(perMin, 1)
|
||||||
perMin = _("%.01f cards/minute") % perMin
|
|
||||||
# don't round down to zero
|
# don't round down to zero
|
||||||
if float(perMin.split(' ')[0]) < 0.1:
|
if perMin < 0.1:
|
||||||
perMin = _("less than 0.1 cards/minute")
|
text = _("less than 0.1 cards/minute")
|
||||||
|
else:
|
||||||
|
text = _("%.01f cards/minute") % perMin
|
||||||
self._line(
|
self._line(
|
||||||
i, _("Average answer time"),
|
i, _("Average answer time"),
|
||||||
_("%(a)0.1fs (%(b)s)") % dict(a=(tot*60)/total, b=perMin))
|
_("%(a)0.1fs (%(b)s)") % dict(a=(tot*60)/total, b=text))
|
||||||
return self._lineTbl(i), int(tot)
|
return self._lineTbl(i), int(tot)
|
||||||
|
|
||||||
def _splitRepData(self, data, spec):
|
def _splitRepData(self, data, spec):
|
||||||
|
|
Loading…
Reference in a new issue