mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 23:12:21 -04:00
Use fmtPercentage to respect current locale decimal point, and split into smaller strings
This commit is contained in:
parent
5c0c44fa0a
commit
e9b88dddd6
1 changed files with 19 additions and 23 deletions
|
@ -189,31 +189,27 @@ class StatusView(object):
|
|||
self.progressBar.setPalette(p)
|
||||
self.progressBar.setValue(stats['dYesTotal%'])
|
||||
# tooltips
|
||||
stats['avgTime'] = anki.utils.fmtTimeSpan(stats['dAverageTime'], point=2)
|
||||
stats['revTime'] = anki.utils.fmtTimeSpan(stats['dReviewTime'], point=2)
|
||||
tip = _("""<h1>Performance</h1>
|
||||
The top bar shows your performance today. The bottom bar shows your<br>
|
||||
tip = "<h1>" + _("Performance") + "</h1>"
|
||||
tip += _("""The top bar shows your performance today. The bottom bar shows your<br>
|
||||
performance on cards scheduled for 21 days or more. The bottom bar should<br>
|
||||
generally be between 80-95%% - lower and you're forgetting mature cards<br>
|
||||
too often, higher and you're spending too much time reviewing.
|
||||
<h2>Reviews today</h2>
|
||||
<b>Correct today: %(dYesTotal%)0.1f%%
|
||||
(%(dYesTotal)d of %(dTotal)d)</b><br>
|
||||
Average time per answer: %(avgTime)s<br>
|
||||
Total review time: %(revTime)s""") % stats
|
||||
stats['avgTime'] = anki.utils.fmtTimeSpan(stats['gAverageTime'], point=2)
|
||||
stats['revTime'] = anki.utils.fmtTimeSpan(stats['gReviewTime'], point=2)
|
||||
tip += _("""<h2>All Reviews</h2>
|
||||
<b>Correct over a month: %(gMatureYes%)0.1f%%
|
||||
(%(gMatureYes)d of %(gMatureTotal)d)</b><br>
|
||||
Average time per answer: %(avgTime)s<br>
|
||||
Total review time: %(revTime)s<br>
|
||||
Correct under a month: %(gYoungYes%)0.1f%%
|
||||
(%(gYoungYes)d of %(gYoungTotal)d)<br>
|
||||
Correct first time: %(gNewYes%)0.1f%%
|
||||
(%(gNewYes)d of %(gNewTotal)d)<br>
|
||||
Total correct: %(gYesTotal%)0.1f%%
|
||||
(%(gYesTotal)d of %(gTotal)d)""") % stats
|
||||
too often, higher and you're spending too much time reviewing.""")
|
||||
tip += "<h2>" + _("Reviews today") + "</h2>"
|
||||
tip += "<b>" + _("Correct today: ") + anki.utils.fmtPercentage(stats['dYesTotal%'], point=1)
|
||||
tip += " (" + _("%(partOf)d of %(totalSum)d") % {'partOf' : stats['dYesTotal'], 'totalSum' : stats['dTotal'] } + ")</b><br>"
|
||||
tip += _("Average time per answer: ") + anki.utils.fmtTimeSpan(stats['dAverageTime'], point=2) +"<br>"
|
||||
tip += _("Total review time: ") + anki.utils.fmtTimeSpan(stats['dReviewTime'], point=2)
|
||||
tip += "<h2>" + _("All Reviews") + "</h2>"
|
||||
tip += "<b>" + _("Correct over a month: ") + anki.utils.fmtPercentage(stats['gMatureYes%'], point=1)
|
||||
tip += " (" + _("%(partOf)d of %(totalSum)d") % {'partOf' : stats['gMatureYes'], 'totalSum' : stats['gMatureTotal'] } + ")</b><br>"
|
||||
tip += _("Average time per answer: ") + anki.utils.fmtTimeSpan(stats['gAverageTime'], point=2) +"<br>"
|
||||
tip += _("Total review time: ") + anki.utils.fmtTimeSpan(stats['gReviewTime'], point=2) +"<br>"
|
||||
tip += _("Correct under a month: ") + anki.utils.fmtPercentage(stats['gYoungYes%'], point=1)
|
||||
tip += " (" + _("%(partOf)d of %(totalSum)d") % {'partOf' : stats['gYoungYes'], 'totalSum' : stats['gYoungTotal'] } + ")</b><br>"
|
||||
tip += _("Correct first time: ") + anki.utils.fmtPercentage(stats['gNewYes%'], point=1)
|
||||
tip += " (" + _("%(partOf)d of %(totalSum)d") % {'partOf' : stats['gNewYes'], 'totalSum' : stats['gNewTotal'] } + ")</b><br>"
|
||||
tip += _("Total correct: ") + anki.utils.fmtPercentage(stats['gYesTotal%'], point=1)
|
||||
tip += " (" + _("%(partOf)d of %(totalSum)d") % {'partOf' : stats['gYesTotal'], 'totalSum' : stats['gTotal'] } + ")</b><br>"
|
||||
self.combinedBar.setToolTip(tip)
|
||||
if self.main.config['showTimer']:
|
||||
self.drawTimer()
|
||||
|
|
Loading…
Reference in a new issue