(minor) Leaderboard shows "Identification for Month Year" instead of actual date

Not even sure this counts as a bug, but the title pretty much says it all but I’ve included a screenshot. It said the same thing for the 4 or 5 months I flipped through when I noticed it.

Platform (Android, iOS, Website): website

Browser, if a website issue (Firefox, Chrome, etc) : Chrome

URLs (aka web addresses) of any relevant observations or pages: https://www.inaturalist.org/people/leaderboard/2025/4 (and other dates)

Seems to be a bug. Also, no matter what language you choose, it’s still in English.

That’s an interesting aspect of the problem. Perhaps that is related to something I noticed in my review of the leaderboard view code:

Each leaderboard column is rendered via the leaderboard_column partial. I noticed that while the plural for observation and species are each correct, it passes noun_plural: 'identification' as the plural of identification! I think that at least accounts for the missing translations, and possibly also the bug itself. I don’t have a way to test it myself, though.

See: https://github.com/inaturalist/inaturalist/blob/1b711b21d0b9fac440f28b81343d07e93ff2d8ec/app/views/users/leaderboard.html.haml#L26-L31

Compare with the similar code for leaderboard on the users page (i.e. https://www.inaturalist.org/people ) that does correctly pass noun_plural: 'identifications' and doesn’t suffer from this bug:

https://github.com/inaturalist/inaturalist/blob/1b711b21d0b9fac440f28b81343d07e93ff2d8ec/app/views/users/index.html.erb#L122-L153

The translation strings are named after the plural. For example, see the results of this search:

https://github.com/search?q=repo%3Ainaturalist%2Finaturalist+identifications_in_month_year&type=code

1 Like

Yes, there’s a open PR for it: https://github.com/inaturalist/inaturalist/pull/4593

2 Likes

Doh! I should’ve checked. Anyway, it was fun trying to figure it out myself. Thanks.

1 Like

Should be fixed now. How’s it looking for you all?

Fixed for me!

1 Like

This topic was automatically closed after 2 days. New replies are no longer allowed.