diff --git a/__init__.py b/__init__.py index 2b5701b..bd4dccc 100644 --- a/__init__.py +++ b/__init__.py @@ -18,19 +18,22 @@ ## CHANGE ANSWER BUTTONS TO PASS/FAIL ## +# Hardcoding the shortcut keys is a lazy solution, +# but one I'm reasonably okay with def pfAnswerButtonList(self): - l = ((1, _("Fail")),) + l = ((1, _("Fail"), _("Shortcut key: 1")),) cnt = self.mw.col.sched.answerButtons(self.card) if cnt == 2 or cnt == 3: - return l + ((2, _("Pass")),) + return l + ((2, _("Pass"), _("Shortcut keys: 2, 3, 4")),) else: - return l + ((3, _("Pass")),) + return l + ((3, _("Pass"), _("Shortcut keys: 2, 3, 4")),) # For some reason it's necessary to copy over this function instead of # just wrapping _answerButtonList, I couldn't say why. def pfAnswerButtons(self, _old): default = self._defaultEase() - def but(i, label): + def but(i, label, shortcutDialog): + cnt = self.mw.col.sched.answerButtons(self.card) if i == default: extra = "id=defease" else: @@ -38,10 +41,10 @@ def but(i, label): due = self._buttonTime(i) return ''' %s''' % (due, extra, _("Shortcut key: %s") % i, i, i, label) +%s''' % (due, extra, shortcutDialog, i, i, label) buf = "
" - for ease, label in pfAnswerButtonList(self): - buf += but(ease, label) + for ease, label, shortcutDialog in pfAnswerButtonList(self): + buf += but(ease, label, shortcutDialog) buf += "
" script = """ """