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

Fix charts not recognising en-AU as a locale #3492

Closed
wants to merge 1 commit into from
Closed

Fix charts not recognising en-AU as a locale #3492

wants to merge 1 commit into from

Conversation

engram-design
Copy link
Contributor

@engram-design engram-design commented Nov 23, 2018

Just uncovered an interesting issue, when our site's locale is set to en-AU (as it most often is for us), the Commerce charts seem to render instead of a dollar sign.

screen shot 2018-11-23 at 12 12 37 pm

Diving into the code it relies on:

https://github.com/craftcms/cms/blob/develop/src/web/assets/d3/D3Asset.php#L57-L75

It'll try and locate a lib/d3-format/en-AU.json file, but since that doesn't exist, it'll find the first en-*.json file, which happens to be en-IN.json. I can see there's the default for en-US, but it never reaches that if there's at least one other english-variant file.

Adding this file (duplicating en-US) works as expected.

@brandonkelly
Copy link
Member

Thanks for pointing that out! This is a problem for more than just en-AU, so I took a different approach for the fix, but the result will be the same for you.

@engram-design
Copy link
Contributor Author

Even better, thanks!

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

Successfully merging this pull request may close these issues.

2 participants