Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sommerluk
Copy link
Contributor

I hope statistics-total is not used in another context with a different meaning?

@dae
Copy link
Member

dae commented Mar 26, 2025

Let's not hope, let's check.

% rg statisticsTotal
ts/routes/graphs/reviews.ts
397:        { label: tr.statisticsTotal(), value: totalString },

ts/routes/graphs/true-retention.ts
101:            return tr.statisticsTotal();

ts/routes/graphs/added.ts
91:            label: tr.statisticsTotal(),

ts/routes/graphs/future-due.ts
131:            label: tr.statisticsTotal(),

% rg statistics_total
zsh: exit 1     rg statistics_total

The true retention graph is a bit different. How about something like the following wording instead?

# This is used in a variety of graphs to refer to the total amount of something (cards, mature cards, etc) for a given period.

If translators need to use different wording for different contexts, we'll need to split it into multiple strings.

@sommerluk
Copy link
Contributor Author

As I do not really understand the code, I've tried to capture some screenshots. Can you tell me if those are actually the correct places?

ts/routes/graphs/reviews.ts

grafik

ts/routes/graphs/added.ts

grafik

ts/routes/graphs/future-due.ts

grafik

ts/routes/graphs/true-retention.ts

Here I'm not sure where to find it. There is:
grafik
However, here the word "Total" comes from statistics-true-retention-total and not statistics-total. I know that because we have different German translations for these two strings, and in the German translation in Anki 25.02 apprears the translation for the former.

@GithubAnon0000
Copy link
Contributor

ts/routes/graphs/true-retention.ts
101: return tr.statisticsTotal();

I don't know how dae found that. statisticsTotal doesn't exist in true-retention.ts (looking at branch main).

However, here the word "Total" comes from statistics-true-retention-total and not statistics-total.

If you are looking for the code that "creates" the total string of the true retention table, you can find it here:

<th scope="col" class="col-header total">
{tr.statisticsTrueRetentionTotal()}
</th>

@dae
Copy link
Member

dae commented Mar 31, 2025

Sorry, I must have had an old branch checked out when I did the check. 🤦
It looks like statisticsTotal is also used in the FSRS simulator in the deck options:

ts/routes/graphs/simulator.ts
232:                ${tr.statisticsTotal()}: ${formatY(total)}`,

@sommerluk
Copy link
Contributor Author

Okay. I've adapted the wording.

@dae dae merged commit 56613be into ankitects:main Apr 10, 2025
1 check passed
@sommerluk sommerluk deleted the total branch April 25, 2025 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants