Invert seconds to show question/answer; tweak wording

The previous wording could be interpreted as 'time until showing question'
or 'time that question should be shown'. I'd intended the latter, and
I didn't notice that the original implementation was doing the former.
This commit is contained in:
Damien Elmes 2023-12-11 13:40:44 +10:00
parent 699a63b85a
commit 8157d88038
3 changed files with 10 additions and 10 deletions

View file

@ -234,10 +234,10 @@ deck-config-stop-timer-on-answer = Stop timer on answer
deck-config-stop-timer-on-answer-tooltip = deck-config-stop-timer-on-answer-tooltip =
Whether to stop the timer when the answer is revealed. Whether to stop the timer when the answer is revealed.
This doesn't affect statistics. This doesn't affect statistics.
deck-config-seconds-to-show-question = Seconds to show question deck-config-seconds-to-show-question = Seconds to show question for
deck-config-seconds-to-show-question-tooltip = The number of seconds to wait before automatically advancing to the next question. Set to 0 to disable. deck-config-seconds-to-show-question-tooltip-2 = When auto advance is activated, the number of seconds to wait before revealing the answer. Set to 0 to disable.
deck-config-seconds-to-show-answer = Seconds to show answer deck-config-seconds-to-show-answer = Seconds to show answer for
deck-config-seconds-to-show-answer-tooltip = The number of seconds to wait before automatically revealing the answer. Set to 0 to disable. deck-config-seconds-to-show-answer-tooltip-2 = When auto advance is activated, the number of seconds to wait before applying the answer action. Set to 0 to disable.
deck-config-answer-action = Answer action deck-config-answer-action = Answer action
deck-config-answer-action-tooltip = The action to perform on the current card before automatically advancing to the next one. deck-config-answer-action-tooltip = The action to perform on the current card before automatically advancing to the next one.
deck-config-wait-for-audio-tooltip = Wait for audio to finish before automatically revealing answer or next question deck-config-wait-for-audio-tooltip = Wait for audio to finish before automatically revealing answer or next question

View file

@ -399,9 +399,9 @@ class Reviewer:
self.card.current_deck_id() self.card.current_deck_id()
) )
timer = None timer = None
if conf["secondsToShowAnswer"]: if conf["secondsToShowQuestion"]:
timer = self._show_answer_timer = self.mw.progress.timer( timer = self._show_answer_timer = self.mw.progress.timer(
int(conf["secondsToShowAnswer"] * 1000), int(conf["secondsToShowQuestion"] * 1000),
lambda: self._on_show_answer_timeout(timer), lambda: self._on_show_answer_timeout(timer),
repeat=False, repeat=False,
parent=self.mw, parent=self.mw,
@ -469,9 +469,9 @@ class Reviewer:
self.card.current_deck_id() self.card.current_deck_id()
) )
timer = None timer = None
if conf["secondsToShowQuestion"]: if conf["secondsToShowAnswer"]:
timer = self._show_question_timer = self.mw.progress.timer( timer = self._show_question_timer = self.mw.progress.timer(
int(conf["secondsToShowQuestion"] * 1000), int(conf["secondsToShowAnswer"] * 1000),
lambda: self._on_show_question_timeout(timer), lambda: self._on_show_question_timeout(timer),
repeat=False, repeat=False,
parent=self.mw, parent=self.mw,

View file

@ -48,11 +48,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
}, },
secondsToShowQuestion: { secondsToShowQuestion: {
title: tr.deckConfigSecondsToShowQuestion(), title: tr.deckConfigSecondsToShowQuestion(),
help: tr.deckConfigSecondsToShowQuestionTooltip(), help: tr.deckConfigSecondsToShowQuestionTooltip2(),
}, },
secondsToShowAnswer: { secondsToShowAnswer: {
title: tr.deckConfigSecondsToShowAnswer(), title: tr.deckConfigSecondsToShowAnswer(),
help: tr.deckConfigSecondsToShowAnswerTooltip(), help: tr.deckConfigSecondsToShowAnswerTooltip2(),
}, },
waitForAudio: { waitForAudio: {
title: tr.deckConfigWaitForAudio(), title: tr.deckConfigWaitForAudio(),