-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
localeCurrencyName pipe incorrect translation #971
Comments
Related note from Slack discussion: One more interesting moment. Update: It can also be used for country names meaning we can remove all the manual translations of country names from all translation files, woo hoo! |
Related issue: the logic in the CurrencyInputComponent that determines whether to place the currency symbol before or after the number is broken for the same reason. |
Relates to #971. Allows us to get rid of all manual translations of language names!
Describe the bug
In the Admin UI we use the
localeCurrencyName
pipe to localize the names of currencies, e.g. in the currency select input of the Channel detail view.In some languages, e.g. Russian, the displayed currencies include "not a number".
To Reproduce
Steps to reproduce the behavior:
where "не число" means "not a number"
Expected behavior
Should not display "not a number"
Environment (please complete the following information):
Additional context
This is caused by a bad assumption in the pipe that passing
undefined
to theformat()
method will always output the stringNaN
:vendure/packages/admin-ui/src/lib/core/src/shared/pipes/locale-currency-name.pipe.ts
Line 36 in ae07134
There is a proper API to do this without hacky string replacement: formatToParts()
The text was updated successfully, but these errors were encountered: