Skip to content

Add localisation support to short relative timestamps on score leaderboards - #38250

Open
Newmcpe wants to merge 1 commit into
ppy:masterfrom
Newmcpe:localise-scoreboard-time
Open

Add localisation support to short relative timestamps on score leaderboards#38250
Newmcpe wants to merge 1 commit into
ppy:masterfrom
Newmcpe:localise-scoreboard-time

Conversation

@Newmcpe

@Newmcpe Newmcpe commented Jul 8, 2026

Copy link
Copy Markdown

Closes #38065.

Relative timestamps on score leaderboards ("4d", "9mo", "1y") were hardcoded to English rather than going through localisation, so non-English clients showed untranslated text while the hover tooltip was already localised. Reuses osu-web's existing common.scoreboard_time.* strings (same ones the in-game web views use) instead.

Before After
image image

…boards

Closes ppy#38065.

Reuses osu-web's `common.scoreboard_time.*` localised strings instead of the
previously hardcoded English suffixes (e.g. `4dys`, `9mos`, `1yr`).
@bdach bdach added the area:localisation Deals with localisation and regional display issues. label Jul 10, 2026
@bdach
bdach self-requested a review July 10, 2026 07:33
@bdach

bdach commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

This PR changes the formatting of timestamps in English.

before after
Screenshot 2026-07-10 at 09 46 24 Screenshot 2026-07-10 at 09 47 37

Previously the client formatting was intentionally deviated from the website's.

Deviations of particular note:

  • The English copy does not use plural forms at all

  • The English copy translates any numbers of seconds or minutes (any timespans below an hour) to now. As it turns out, translations take weird liberties and instead display the actual number of seconds or minutes. The game was attempting to reimplement this via the lowerCutoff argument of ToShortRelativeTime().

    This is relevant, because now if the web translations are used by the game directly, the local leaderboard in English will start showing timestamps of now for any score set within the last hour.

Before this can proceed, this entire mess probably needs to be cleared up and unified, one way or another.

@bdach bdach added the subjective PRs with subjective changes which have not been discussed prior. Need team consensus to proceed. label Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:localisation Deals with localisation and regional display issues. size/M subjective PRs with subjective changes which have not been discussed prior. Need team consensus to proceed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PL] Short relative timestamps not localised

2 participants