Repository navigation
fix(ui): format figures with the pinned en-US locale everywhere - #5059
Merged
Merged
Conversation
Contributor
|
Worth a look: 1 thing to check below.
✅ Health of changed files: 7.1 (unchanged) Average full file score (structure and history) of 112 changed code files, weighted by size before this PR; not the repository score.
Settings and updatesSilence one PR with |
RaghavChamadiya
force-pushed
the
fix/ui-pin-number-locale
branch
2 times, most recently
from
October 30, 2026 20:27
0b0e0d1 to
edaf7cb
Compare
RaghavChamadiya
force-pushed
the
fix/ui-pin-number-locale
branch
from
November 1, 2026 10:54
edaf7cb to
8f5e187
Compare
A bare number .toLocaleString() formats in the runtime's locale, so a server render and a browser in en-IN disagree on any figure above 99,999 (1,261,599 vs 12,61,599). That mismatch fails hydration and React throws away the server HTML. formatNumber is already pinned to en-US; route every bare number .toLocaleString() in ui and web through it.
RaghavChamadiya
force-pushed
the
fix/ui-pin-number-locale
branch
from
November 1, 2026 15:01
8f5e187 to
cf7ce43
Compare
swati510
approved these changes
Nov 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Bare
Number#toLocaleString()formats with the runtime's locale, so a server in one locale and a browser in another produced different digit grouping (for example1,261,599vs12,61,599), and hydration failed.How
.toLocaleString()on a number inpackages/uiandpackages/webnow goes through the existingformatNumber, which is pinned to en-US.undefined.String(value).Based on #5058.
Verification
tsc --noEmit: clean.