fix(i18n): date and number format#17791
Merged
Merged
Conversation
- feat: add numberFormat wrapper util handling `ar` and `ur` numbering system overrides -- recommended by Gemini as best-practices for web3 content - refactor: convert usage of Intl.NumberFormat to use imported numberFormat helper util throughout repo - deprecate: getLocaleForNumberFormat helper which was performing no logic in its function call - refactor: migrate numberToPercent to numbers.ts and remove Lang type preference in favor of string for locale - fix: apply `locale` property where appropriate over hard-coded "en" or `undefined` - docs: add AGENTS documentation for use of numberFormat as preferred approach over Intl.NumberFormat
- feat: add dateTimeFormat wrapper util handling ar and ur numbering system overrides -- recommended by Gemini as best-practices for web3 content - refactor: convert usage of Intl.DateTimeFormat date.toLocaleDateString and date.toLocaleTimeString to use imported dateTimeformat helper util throughout repo - refactor: migrate getLocaleFormattedDate to date.ts from time.ts - docs: update AGENTS documentation for use of dateTimeFormat as preferred approach
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
pettinarip
reviewed
Mar 24, 2026
| // Extract blob stats directly (getBlobscanStats returns BlobscanStats, not wrapped in MetricReturnData) | ||
| const blobStats = { | ||
| avgBlobFee: blobscanOverallStats.avgBlobFee, | ||
| totalBlobs: new Intl.NumberFormat(undefined, { |
pettinarip
approved these changes
Mar 24, 2026
Member
pettinarip
left a comment
There was a problem hiding this comment.
@wackerow nice refactor 💪🏼
Co-authored-by: Pablo Pettinari <pettinarip@gmail.com>
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.

Description
Standardizes locale-aware number and date formatting across the codebase to ensure correct numeral rendering for RTL languages (Urdu, Arabic) and enforce the Gregorian calendar universally. These changes were recommended by Gemini as best-practice improvements upon repo review.
numberFormat()wrapper (src/lib/utils/numbers.ts) aroundIntl.NumberFormat-- forces Extended Arabic numerals for Urdu, and Western Arabic for all other locales including Arabic (removes potential browser inconsistencies)dateTimeFormat()wrapper (src/lib/utils/date.ts) aroundIntl.DateTimeFormat-- same numeral logic plus enforces Gregorian calendarIntl.NumberFormat,.toLocaleString()(on numbers),Intl.DateTimeFormat,.toLocaleDateString(), and.toLocaleTimeString()calls with the respective wrappersAdds CSS(cherry-picked and merged in i18n: Gemini translations (ur) #17854)list-style-type: urdufor ordered lists under:lang(ur)withpersianfallbacknumberToPercent.ts, stale translation helpers)41 files changed across components, pages, and utilities.
Related issue
Ongoing i18n efforts