Skip to content
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

Add support for the "scale" stem to formatted numbers #2414

Closed
jwarby opened this issue Dec 16, 2020 · 1 comment
Closed

Add support for the "scale" stem to formatted numbers #2414

jwarby opened this issue Dec 16, 2020 · 1 comment

Comments

@jwarby
Copy link

jwarby commented Dec 16, 2020

Which package?
intl-messageformat-parser

Is your feature request related to a problem? Please describe.
I'd like to pass an object with some percentage values to a formatted message which is using the percent option. The values are already scaled appropriately, eg value: 25.67 for 25.67%, but percent will multiply the value by 100.

Describe the solution you'd like
To be able to use the scale/dddd stem in number skeletons, eg {value, number, ::percent scale/0.1}

Describe alternatives you've considered
Our current workaround is to add a special case for percentage values and divide them by 100 before passing them to the formatting component.

Additional context
Add any other context or screenshots about the feature request here.

@jwarby
Copy link
Author

jwarby commented Dec 17, 2020

Thanks for this @longlho!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant