diff --git a/ftl/core/statistics.ftl b/ftl/core/statistics.ftl index 99582a234..21401c59e 100644 --- a/ftl/core/statistics.ftl +++ b/ftl/core/statistics.ftl @@ -95,11 +95,12 @@ statistics-range-search = Search statistics-card-ease-title = Card Ease statistics-card-difficulty-title = Card Difficulty statistics-card-stability-title = Card Stability -statistics-card-stability-subtitle = Predicted delay that you have a 90% chance of remembering. +statistics-card-stability-subtitle = The delay at which you're 90% likely to remember. +statistics-average-stability = Average stability statistics-card-retrievability-title = Card Retrievability statistics-card-ease-subtitle = The lower the ease, the more frequently a card will appear. statistics-card-difficulty-subtitle = The higher the difficulty, the harder it is to remember. -statistics-retrievability-subtitle = How likely you are to remember. +statistics-retrievability-subtitle = The probability of recalling a card today. # eg "3 cards with 150-170% ease" statistics-card-ease-tooltip = { $cards -> @@ -162,6 +163,16 @@ statistics-intervals-day-single = [one] { $cards } card with a { $day } day interval *[other] { $cards } cards with a { $day } day interval } +statistics-stability-day-range = + { $cards -> + [one] { $cards } card with a { $daysStart }~{ $daysEnd } day stability + *[other] { $cards } cards with a { $daysStart }~{ $daysEnd } day stability + } +statistics-stability-day-single = + { $cards -> + [one] { $cards } card with a { $day } day stability + *[other] { $cards } cards with a { $day } day stability + } # hour range, eg "From 14:00-15:00" statistics-hours-range = From { $hourStart }:00~{ $hourEnd }:00 statistics-hours-correct = { $correct }/{ $total } correct ({ $percent }%) diff --git a/ts/graphs/IntervalsGraph.svelte b/ts/graphs/IntervalsGraph.svelte index 4251d4f55..b2ce21c29 100644 --- a/ts/graphs/IntervalsGraph.svelte +++ b/ts/graphs/IntervalsGraph.svelte @@ -42,6 +42,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html range, dispatch, $prefs.browserLinksSupported, + false, ); } diff --git a/ts/graphs/StabilityGraph.svelte b/ts/graphs/StabilityGraph.svelte index 024c821e2..7cc4b948a 100644 --- a/ts/graphs/StabilityGraph.svelte +++ b/ts/graphs/StabilityGraph.svelte @@ -42,6 +42,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html range, dispatch, $prefs.browserLinksSupported, + true, ); } diff --git a/ts/graphs/intervals.ts b/ts/graphs/intervals.ts index 06335248e..55fbe0b9f 100644 --- a/ts/graphs/intervals.ts +++ b/ts/graphs/intervals.ts @@ -47,16 +47,19 @@ export function intervalLabel( daysStart: number, daysEnd: number, cards: number, + fsrs: boolean, ): string { if (daysEnd - daysStart <= 1) { // singular - return tr.statisticsIntervalsDaySingle({ + const fn = fsrs ? tr.statisticsStabilityDaySingle : tr.statisticsIntervalsDaySingle; + return fn({ day: daysStart, cards, }); } else { // range - return tr.statisticsIntervalsDayRange({ + const fn = fsrs ? tr.statisticsStabilityDayRange : tr.statisticsIntervalsDayRange; + return fn({ daysStart, daysEnd: daysEnd - 1, cards, @@ -80,6 +83,7 @@ export function prepareIntervalData( range: IntervalRange, dispatch: SearchDispatch, browserLinksSupported: boolean, + fsrs: boolean, ): [HistogramData | null, TableDatum[]] { // get min/max const allIntervals = data.intervals; @@ -144,7 +148,7 @@ export function prepareIntervalData( percent: number, ): string { // const day = dayLabel(bin.x0!, bin.x1!); - const interval = intervalLabel(bin.x0!, bin.x1!, bin.length); + const interval = intervalLabel(bin.x0!, bin.x1!, bin.length, fsrs); const total = tr.statisticsRunningTotal(); return `${interval}
${total}: \u200e${localizedNumber(percent, 1)}%`; } @@ -160,7 +164,7 @@ export function prepareIntervalData( const meanIntervalString = timeSpan(meanInterval * 86400, false); const tableData = [ { - label: tr.statisticsAverageInterval(), + label: fsrs ? tr.statisticsAverageStability() : tr.statisticsAverageInterval(), value: meanIntervalString, }, ];