mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 23:42:23 -04:00
Add "No reviews to optimize" message (#3610)
* Separate failed message from optimal * No reviews only * Fix: Can't block optimize if not optimal * Wording change * Update ftl/core/deck-config.ftl * Simplify code (dae)
This commit is contained in:
parent
039c7fc0a9
commit
d6ffaa921f
2 changed files with 10 additions and 4 deletions
|
@ -452,6 +452,7 @@ deck-config-percent-of-reviews =
|
||||||
deck-config-optimizing-preset = Optimizing preset { $current_count }/{ $total_count }...
|
deck-config-optimizing-preset = Optimizing preset { $current_count }/{ $total_count }...
|
||||||
deck-config-fsrs-must-be-enabled = FSRS must be enabled first.
|
deck-config-fsrs-must-be-enabled = FSRS must be enabled first.
|
||||||
deck-config-fsrs-params-optimal = The FSRS parameters currently appear to be optimal.
|
deck-config-fsrs-params-optimal = The FSRS parameters currently appear to be optimal.
|
||||||
|
deck-config-fsrs-params-no-reviews = No reviews found. Please check that this preset is assigned to all decks you want to optimize (including subdecks) and try again.
|
||||||
|
|
||||||
deck-config-wait-for-audio = Wait for audio
|
deck-config-wait-for-audio = Wait for audio
|
||||||
deck-config-show-reminder = Show Reminder
|
deck-config-show-reminder = Show Reminder
|
||||||
|
|
|
@ -148,14 +148,19 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
ignoreRevlogsBeforeMs: getIgnoreRevlogsBeforeMs(),
|
ignoreRevlogsBeforeMs: getIgnoreRevlogsBeforeMs(),
|
||||||
currentParams: params,
|
currentParams: params,
|
||||||
});
|
});
|
||||||
if (
|
|
||||||
|
const already_optimal =
|
||||||
(params.length &&
|
(params.length &&
|
||||||
params.every(
|
params.every(
|
||||||
(n, i) => n.toFixed(4) === resp.params[i].toFixed(4),
|
(n, i) => n.toFixed(4) === resp.params[i].toFixed(4),
|
||||||
)) ||
|
)) ||
|
||||||
resp.params.length === 0
|
resp.params.length === 0;
|
||||||
) {
|
|
||||||
setTimeout(() => alert(tr.deckConfigFsrsParamsOptimal()), 200);
|
if (already_optimal) {
|
||||||
|
const msg = resp.fsrsItems
|
||||||
|
? tr.deckConfigFsrsParamsOptimal()
|
||||||
|
: tr.deckConfigFsrsParamsNoReviews();
|
||||||
|
setTimeout(() => alert(msg), 200);
|
||||||
} else {
|
} else {
|
||||||
$config.fsrsParams5 = resp.params;
|
$config.fsrsParams5 = resp.params;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue