interval -> workload

This commit is contained in:
Luc Mcgrady 2025-05-22 13:00:28 +01:00
parent 8f6224f971
commit 5376b5a3ae
No known key found for this signature in database
GPG key ID: 4F3D7A0B17CC3D9C
2 changed files with 8 additions and 7 deletions

View file

@ -470,9 +470,9 @@ deck-config-compute-optimal-retention-tooltip4 =
willing to invest more study time to achieve it. Setting your desired retention lower than the minimum
is not recommended, as it will lead to a higher workload, because of the high forgetting rate.
deck-config-please-save-your-changes-first = Please save your changes first.
deck-config-intervals-percentage-increase = Your intervals will increase by { $percent }%.
deck-config-intervals-percentage-decrease = Your intervals will decrease by { $percent }%.
deck-config-intervals-percentage-unchanged = The higher this value, the more frequently cards will be shown to you.
deck-config-workload-percentage-increase = Your workload will increase by approximately { $percent }%.
deck-config-workload-percentage-decrease = Your workload will decrease by approximately { $percent }%.
deck-config-workload-percentage-unchanged = The higher this value, the more frequently cards will be shown to you.
deck-config-desired-retention-too-low = Your desired retention is very low which can lead to very long intervals
deck-config-desired-retention-too-high = Your desired retention is very high which can lead very short intervals

View file

@ -100,17 +100,18 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
function getRetentionChangeInfo(retention: number, params: number[]): string {
if (+startingDesiredRetention == roundedRetention) {
return tr.deckConfigIntervalsPercentageUnchanged();
return tr.deckConfigWorkloadPercentageUnchanged();
}
const before = getInterval(+startingDesiredRetention, params);
const after = getInterval(retention, params);
const percent = 100 * (after / before) - 100;
// (1 / after) / (1 / before)
const percent = 100 * (before / after) - 100;
if (percent > 0) {
return tr.deckConfigIntervalsPercentageIncrease({
return tr.deckConfigWorkloadPercentageIncrease({
percent,
});
} else {
return tr.deckConfigIntervalsPercentageDecrease({
return tr.deckConfigWorkloadPercentageDecrease({
percent: -percent,
});
}