-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Localize formatting helpers #1752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
webview-ui/src/utils/format.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using a more robust date formatting library (like date-fns or moment) to avoid manual string replacements in formatDate(). This manual replacement may not cover all locale-specific nuances.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: The billion_suffix value is set to 'Mrd'. In Italian, the typical abbreviation for 'miliardo' is 'Mld'. Consider updating 'Mrd' to 'Mld' for consistency with Italian conventions.
| "billion_suffix": "Mrd" | |
| "billion_suffix": "Mld" |
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Important
Localize number formatting and update
formatLargeNumberandformatDateinformat.tsto use locale-specific formats.number_formatsuffixes for thousands, millions, and billions incommon.jsonfor multiple locales (e.g.,ca,de,en,es,fr,hi,it,ja,ko,pl,pt-BR,tr,vi,zh-CN,zh-TW).formatLargeNumberinformat.tsto use localized suffixes viai18next.t().formatDateinformat.tsto use locale-specific formatting and transformations.This description was created by
for 76b37b1. It will automatically update as commits are pushed.