-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Support language tags with more than one hyphen #14
Conversation
Language tags are composed of one or more subtags (reference: https://en.wikipedia.org/wiki/IETF_language_tag) and are not limited to two subtags with one hyphen. Fixed the "jsNormalizedLang" utility function to support more than one hyphen (for example, "zh-Hant-HK").
Hi @alienfast / @rosskevin, I just want to check if you received this and if you have any comments or concerns with this pull request. Thanks! |
Hey @martian111, sorry, I didn't see it. It looks like ci didn't run on this, I'll check it out. |
Hang in there with the notifications @martian111 - I'm using this to get my github actions workflow triggers corrected. |
No problem at all, thank you! |
🚀 PR was released in |
Thanks @martian111, I finally sorted out a working workflow for external committers, sorry it took so long. Thank you for pinging me because I wasn't watching the repo (and I am now). |
Thank you too @rosskevin! |
Language tags are composed of one or more subtags (reference: https://en.wikipedia.org/wiki/IETF_language_tag) and are not limited to two subtags with one hyphen. Fixed the "jsNormalizedLang" utility function to support more than one hyphen (for example, "zh-Hant-HK").
Before this fix, such language tags would cause invalid code to be generated, such as:
export const zh_Hant-HK = {"translation":{"layouts":{"header":{"title":"Example Title"}}}