From 93032cdceb62554d39eeb38785dca9a8e47b3b00 Mon Sep 17 00:00:00 2001 From: Luc Mcgrady Date: Thu, 6 Feb 2025 07:17:39 +0000 Subject: [PATCH] Delete y-axis titles for graphs (#3789) * Remove simulator y axis labels * Remove forgetting curve y-axis title * ./check * Mark the card-stats string as deprecated as well (dae) --- ftl/core/card-stats.ftl | 5 ++++- ftl/core/deck-config.ftl | 6 +++--- ts/routes/card-info/forgetting-curve.ts | 4 +--- ts/routes/graphs/simulator.ts | 10 +--------- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/ftl/core/card-stats.ftl b/ftl/core/card-stats.ftl index 65c3b95f2..8591c8910 100644 --- a/ftl/core/card-stats.ftl +++ b/ftl/core/card-stats.ftl @@ -35,10 +35,13 @@ card-stats-fsrs-forgetting-curve-first-week = First Week card-stats-fsrs-forgetting-curve-first-month = First Month card-stats-fsrs-forgetting-curve-first-year = First Year card-stats-fsrs-forgetting-curve-all-time = All Time -card-stats-fsrs-forgetting-curve-probability-of-recalling = Probability of Recall card-stats-fsrs-forgetting-curve-desired-retention = Desired Retention ## Window Titles card-stats-current-card = Current Card ({ $context }) card-stats-previous-card = Previous Card ({ $context }) + +## NO NEED TO TRANSLATE. This text is no longer used by Anki, and will be removed in the future. + +card-stats-fsrs-forgetting-curve-probability-of-recalling = Probability of Recall diff --git a/ftl/core/deck-config.ftl b/ftl/core/deck-config.ftl index 3f5a550b8..e9e1daded 100644 --- a/ftl/core/deck-config.ftl +++ b/ftl/core/deck-config.ftl @@ -461,12 +461,9 @@ deck-config-answer-hard = Answer Hard deck-config-answer-good = Answer Good deck-config-days-to-simulate = Days to simulate deck-config-desired-retention-below-optimal = Your desired retention is below optimal. Increasing it is recommended. -deck-config-fsrs-simulator-y-axis-title-time = Review Time/Day -deck-config-fsrs-simulator-y-axis-title-count = Review Count/Day # Description of the y axis in the FSRS simulation # diagram (Deck options -> FSRS) showing the total number of # cards that can be recalled or retrieved on a specific date. -deck-config-fsrs-simulator-y-axis-title-memorized = Memorized Total deck-config-fsrs-simulator-experimental = FSRS simulator (experimental) deck-config-additional-new-cards-to-simulate = Additional new cards to simulate deck-config-simulate = Simulate @@ -479,6 +476,9 @@ deck-config-fsrs-simulator-radio-memorized = Memorized ## NO NEED TO TRANSLATE. This text is no longer used by Anki, and will be removed in the future. +deck-config-fsrs-simulator-y-axis-title-time = Review Time/Day +deck-config-fsrs-simulator-y-axis-title-count = Review Count/Day +deck-config-fsrs-simulator-y-axis-title-memorized = Memorized Total deck-config-bury-siblings = Bury siblings deck-config-do-not-bury = Do not bury siblings deck-config-bury-if-new = Bury if new diff --git a/ts/routes/card-info/forgetting-curve.ts b/ts/routes/card-info/forgetting-curve.ts index 0ee1f2c11..cb9dc2962 100644 --- a/ts/routes/card-info/forgetting-curve.ts +++ b/ts/routes/card-info/forgetting-curve.ts @@ -234,9 +234,7 @@ export function renderForgettingCurve( .attr("x", 0 - (bounds.height / 2)) .attr("font-size", "1rem") .attr("dy", "1.1em") - .attr("fill", "currentColor") - .style("text-anchor", "middle") - .text(`${tr.cardStatsFsrsForgettingCurveProbabilityOfRecalling()}(%)`); + .attr("fill", "currentColor"); const lineGenerator = line() .x((d) => x(d.date)) diff --git a/ts/routes/graphs/simulator.ts b/ts/routes/graphs/simulator.ts index 4779fa3be..c24c8f0bb 100644 --- a/ts/routes/graphs/simulator.ts +++ b/ts/routes/graphs/simulator.ts @@ -82,12 +82,6 @@ export function renderSimulationChart( [SimulateSubgraph.memorized]: convertedData.map(d => ({ ...d, y: d.memorized })), })[subgraph]; - const subgraph_title = ({ - [SimulateSubgraph.count]: tr.deckConfigFsrsSimulatorYAxisTitleCount(), - [SimulateSubgraph.time]: tr.deckConfigFsrsSimulatorYAxisTitleTime(), - [SimulateSubgraph.memorized]: tr.deckConfigFsrsSimulatorYAxisTitleMemorized(), - })[subgraph]; - const yMax = max(subgraph_data, d => d.y)!; const y = scaleLinear() .range([bounds.height - bounds.marginBottom, bounds.marginTop]) @@ -113,9 +107,7 @@ export function renderSimulationChart( .attr("x", 0 - (bounds.height / 2)) .attr("font-size", "1rem") .attr("dy", "1.1em") - .attr("fill", "currentColor") - .style("text-anchor", "middle") - .text(subgraph_title); + .attr("fill", "currentColor"); // x lines const points = subgraph_data.map((d) => [x(d.date), y(d.y), d.label]);