You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve noticed that if you study for exactly one hour, you’re told “Studied n cards in 1 hours today (_m_s/card).”
This is an incredibly minor point, but ideally it would say “1 hour” instead of “1 hours” (but be plural again for “1.1 hours”, “1.2 hours”, etc.).
It's caused by non-integer numbers that are rounded to an integer in format_number_values(), eg 1.0005 becomes 1.00 which ends up being to 1. I'm not sure we can easily fix this, as I think the plural choice is happening in fluent's code, not ours. Converting the fluent numbers to integers if they round to an integer might work?
The text was updated successfully, but these errors were encountered:
I realise this is a very trivial thing, but would it not be possible to display all of the numbers in decimal format (including 1, 2, 3, etc.)?
Numbers expressed in the decimal format use the noun's plural form.
Showing "1.00" will not only guarantee formatting consistency between the whole hours and the partials, but it will also address the plural problem that is mentioned above. Two birds, one stone.
So, force decimals on all numbers:
1 -> 1.00
2 -> 2.00
3 -> 3.00
...
I guess it would be a lot easier to code than the alternative?
Edit:
Ah, I see that there is thislet mut val: Cow<str> = with_max_precision.trim_end_matches('0').into();. Then, in that case, you can ignore my suggestion.
Originally reported on https://forums.ankiweb.net/t/1-hours-today/42956
It's caused by non-integer numbers that are rounded to an integer in format_number_values(), eg 1.0005 becomes 1.00 which ends up being to 1. I'm not sure we can easily fix this, as I think the plural choice is happening in fluent's code, not ours. Converting the fluent numbers to integers if they round to an integer might work?
The text was updated successfully, but these errors were encountered: