Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Mar 17, 2025

Important

Localize number formatting and update formatLargeNumber and formatDate in format.ts to use locale-specific formats.

  • Localization:
    • Add number_format suffixes for thousands, millions, and billions in common.json for multiple locales (e.g., ca, de, en, es, fr, hi, it, ja, ko, pl, pt-BR, tr, vi, zh-CN, zh-TW).
  • Functions:
    • Update formatLargeNumber in format.ts to use localized suffixes via i18next.t().
    • Modify formatDate in format.ts to use locale-specific formatting and transformations.

This description was created by Ellipsis for 76b37b1. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Mar 17, 2025

⚠️ No Changeset found

Latest commit: a8ef2e1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 17, 2025
@dosubot dosubot bot added lgtm This PR has been approved by a maintainer enhancement New feature or request labels Mar 17, 2025
Copy link
Contributor

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.

Copy link
Contributor

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.

Suggested change
"billion_suffix": "Mrd"
"billion_suffix": "Mld"

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
@mrubens mrubens merged commit 56ff9ea into main Mar 17, 2025
7 checks passed
@mrubens mrubens deleted the i18n_format branch March 17, 2025 20:29
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants