This repository has been archived by the owner on Oct 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 221
[react-i18n] Fix unformatCurrency utility stripping significant digits on RSD currency #1902
Merged
Conversation
This file contains 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
atesgoral
reviewed
May 18, 2021
packages/react-i18n/CHANGELOG.md
Outdated
Comment on lines
8
to
9
## Unreleased | ||
- Fixed `currencyDecimalSymbol` function returning `DECIMAL_NOT_SUPPORTED` for RSD |
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.
Suggested change
## Unreleased | |
- Fixed `currencyDecimalSymbol` function returning `DECIMAL_NOT_SUPPORTED` for RSD | |
<!-- Unreleased --> | |
- Fixed `currencyDecimalSymbol` function returning `DECIMAL_NOT_SUPPORTED` for RSD [#1902](https://github.com/Shopify/quilt/pull/1902) |
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.
saw this just after I pushed the change up 🙈
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.
There's more to update though :) The heading is a comment, and we recursively mention the PR
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.
ahh will fix :)
atesgoral
approved these changes
May 18, 2021
@lhoffbeck |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Part of a fix to resolves Shopify/shopify issue #284738, along with shopify/web PR #43731.
RSD supports 2 decimal places, but (per Christian Jaekl)
For example:
Because of this, when our unformatCurrency utility calls currencyDecimalSymbol, the
formatCurrency
rounds all RSD values to the nearest Int--unless you pass aform: short
.This change adds the
form: short
option to thecurrencyDecimalSymbol
utility and updates the tests to check for this use case.To 🎩 you can remove the change and the RSD test should fail.
Type of change
Checklist