Skip to content

fix(profile): format XP numbers with the UI locale - #16008

Merged
diegosouzapw merged 3 commits into
cheaper-inference:release/v3.8.52from
pacocartones:fix/profile-xp-locale
Oct 16, 2026
Merged

diegosouzapw merged 3 commits into
cheaper-inference:release/v3.8.52from
pacocartones:fix/profile-xp-locale

Conversation

@pacocartones

Copy link
Copy Markdown
Contributor

Summary

  • The Profile page formatted the XP progress (x / y XP) and the total XP with toLocaleString() and no argument, so they followed the browser locale instead of the language selected in OmniRoute. The page already passes useLocale() to its dates; pass it to these two numbers too.

Related Issues

  • None.

Validation

  • Change type: UI / i18n
  • New test tests/unit/ui/profile-xp-locale.test.tsx (locale de, level 10, 1500 XP into the level): fails on the base ("1,500 /"), passes with the change; the three existing Profile UI tests still pass
  • prettier --check OK; npm run lint (whole repo) passes on the branch

Tests Added Or Updated

  • tests/unit/ui/profile-xp-locale.test.tsx (new).

Coverage Notes

  • Two expressions in src/app/(dashboard)/dashboard/profile/page.tsx, covered by the new test.

Reviewer Notes

  • Only the two XP numbers changed; I left the other toLocaleString-style calls elsewhere alone.

The Profile page already uses the next-intl locale for dates but formatted
the XP progress and total XP with toLocaleString() and no argument, so they
followed the browser locale instead of the language chosen in OmniRoute.
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Hi @pacocartones — closing this pull request to clear the open queue. The branch fix/profile-xp-locale is kept, so the commits stay. Comment here if it should be reopened.

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Hi @pacocartones — reopening this pull request. The close was a mistake, and it is back in the merge queue. The branch fix/profile-xp-locale was kept.

@diegosouzapw diegosouzapw reopened this Oct 10, 2026
@diegosouzapw
diegosouzapw merged commit 0fa38bb into cheaper-inference:release/v3.8.52 Oct 16, 2026
29 of 51 checks passed
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.

2 participants