mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
add average-answer-time to Fluent
drop the 0.1 special case; we're using two decimals now
This commit is contained in:
parent
a85bca51b2
commit
0fbe59cd57
2 changed files with 12 additions and 11 deletions
|
@ -453,20 +453,15 @@ group by day order by day"""
|
||||||
)
|
)
|
||||||
if total and tot:
|
if total and tot:
|
||||||
perMin = total / float(tot)
|
perMin = total / float(tot)
|
||||||
perMin = round(perMin, 1)
|
average_secs = (tot * 60) / total
|
||||||
# don't round down to zero
|
|
||||||
if perMin < 0.1:
|
|
||||||
text = _("less than 0.1 cards/minute")
|
|
||||||
else:
|
|
||||||
text = _("%.01f cards/minute") % perMin
|
|
||||||
self._line(
|
self._line(
|
||||||
i,
|
i,
|
||||||
_("Average answer time"),
|
_("Average answer time"),
|
||||||
# T: For example, in the statistics line: " Average
|
self.col.backend.translate(
|
||||||
# answer time: 16.8s (3.6 cards/minute)", then
|
StringsGroup.STATISTICS,
|
||||||
# "%(a)0.1fs" represents "16.8s" and "%(b)s" represents
|
"average-answer-time",
|
||||||
# "3.6 cards/minutes")
|
**{"cards-per-minute": perMin, "average-seconds": average_secs},
|
||||||
_("%(a)0.1fs (%(b)s)") % dict(a=(tot * 60) / total, b=text),
|
),
|
||||||
)
|
)
|
||||||
return self._lineTbl(i), int(tot)
|
return self._lineTbl(i), int(tot)
|
||||||
|
|
||||||
|
|
|
@ -4,3 +4,9 @@ due-date = Due
|
||||||
due-count = Due
|
due-count = Due
|
||||||
# Shown in the Due column of the Browse screen when the card is a new card
|
# Shown in the Due column of the Browse screen when the card is a new card
|
||||||
due-for-new-card = New #{$number}
|
due-for-new-card = New #{$number}
|
||||||
|
|
||||||
|
|
||||||
|
## eg 16.8s (3.6 cards/minute)
|
||||||
|
|
||||||
|
cards-per-min = {$cards-per-minute} cards/minute
|
||||||
|
average-answer-time = {$average-seconds}s ({cards-per-min})
|
||||||
|
|
Loading…
Reference in a new issue