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

Cannot generate bundle file when the locale is "zh_Hant_HK" #63

Open
huhu1884 opened this issue May 27, 2020 · 2 comments
Open

Cannot generate bundle file when the locale is "zh_Hant_HK" #63

huhu1884 opened this issue May 27, 2020 · 2 comments

Comments

@huhu1884
Copy link

I have two store view with different languages: en_US and zh_Hant_HK, after I run "baler build" command, I can only find the bundle file in en_US folder. Seems the regex rule in src/magentoFS.ts not support the locale such as "zh_Hant_HK".

@martinbabic
Copy link

I have the same issue, and here's the snippet of code that filters out any non "xx_XX" formatted store locales:

In file src/MagentoFS.ts:

Selection_033

@martinbabic
Copy link

martinbabic commented Jul 1, 2020

As a temp fix I replaced this line (190) with this:

const reLang = /^[a-z]{2}(?:_[a-z]{4})?(?:_[a-z]{2})?$/i;

That fixed the issue for me. The regex is not quite correct as it will also recognize any folder in the form 'xx_XXXX' which shouldn't be the case.

Note: This edit needs to be done before building baler.

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

No branches or pull requests

2 participants