mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
UPDATE answer button graph tooltip to include I) answer button name and II) description of what "correct" means (#3979)
* ADD name of the button after button number (1 → again...) * ADD info string to explain what 'correct' means * Run ./check and make it happy * Apply suggestion from @dae to make text shorter
This commit is contained in:
parent
1c69333210
commit
37dfbca094
2 changed files with 17 additions and 1 deletions
|
@ -229,6 +229,7 @@ statistics-stability-day-single =
|
|||
# hour range, eg "From 14:00-15:00"
|
||||
statistics-hours-range = From { $hourStart }:00~{ $hourEnd }:00
|
||||
statistics-hours-correct = { $correct }/{ $total } correct ({ $percent }%)
|
||||
statistics-hours-correct-info = → (not 'Again')
|
||||
# the emoji depicts the graph displaying this number
|
||||
statistics-hours-reviews = 📊 { $reviews } reviews
|
||||
# the emoji depicts the graph displaying this number
|
||||
|
|
|
@ -222,8 +222,23 @@ export function renderButtons(
|
|||
const button = tr.statisticsAnswerButtonsButtonNumber();
|
||||
const timesPressed = tr.statisticsAnswerButtonsButtonPressed();
|
||||
const correctStr = tr.statisticsHoursCorrect(totalCorrect(d.group));
|
||||
const correctStrInfo = tr.statisticsHoursCorrectInfo();
|
||||
const pressedStr = `${timesPressed}: ${totalPressedStr(d)}`;
|
||||
return `${button}: ${d.buttonNum}<br>${pressedStr}<br>${correctStr}`;
|
||||
|
||||
let buttonText: string;
|
||||
if (d.buttonNum === 1) {
|
||||
buttonText = tr.studyingAgain();
|
||||
} else if (d.buttonNum === 2) {
|
||||
buttonText = tr.studyingHard();
|
||||
} else if (d.buttonNum === 3) {
|
||||
buttonText = tr.studyingGood();
|
||||
} else if (d.buttonNum === 4) {
|
||||
buttonText = tr.studyingEasy();
|
||||
} else {
|
||||
buttonText = "";
|
||||
}
|
||||
|
||||
return `${button}: ${d.buttonNum} (${buttonText})<br>${pressedStr}<br>${correctStr} ${correctStrInfo}`;
|
||||
}
|
||||
|
||||
svg.select("g.hover-columns")
|
||||
|
|
Loading…
Reference in a new issue