-
Notifications
You must be signed in to change notification settings - Fork 286
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
[Bug] useMoney Hook Error: Incorrect locale provided (hydrogen-react package) #1059
Comments
Hello @lordofthecactus and @frehner, Sorry to ping you but I think you are familiar with this issue. Thanks, |
Hi @danf97, thank you for spotting this bug. we'll get a release out with a fix that make sure we stripe out SFAPI specific language strings so that it works with |
@wizardlyhel does this mean that there will be a change to the language and money codes in the near future? |
Not on the storefront API - just within Hydrogen |
What is the location of your example repository?
No response
Which package or tool is having this issue?
hydrogen-react
What version of that package or tool are you using?
2023.4.4
What version of Remix are you using?
No response
Steps to Reproduce
This happens when using the useMoney hook from hydrogen-react when having a language iso code with more then 2 characters. For example: 'PT_PT', 'PT_BR'.
Meaning that there are possible locales like: PT_PT-PT, PT_PT-BR, PT_ES
So there is a combination of the country iso code (that are always 2 digits) - documentation here - and language iso code (that can be 2 digits - XX - or 5 digits - XX_XX) - documentation here
Expected Behavior
It should take into count that are possible iso codes that have more then two characters.
Actual Behavior
It should take into count that are possible languages iso codes that have more then two characters.
Related issue: [BUG] useMeasurement and useMoney Hooks Error: Incorrect locale information provided #1800
The text was updated successfully, but these errors were encountered: