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

Support language tags with more than one hyphen #14

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

martian111
Copy link
Contributor

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"}}}

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").
@martian111
Copy link
Contributor Author

martian111 commented Feb 9, 2024

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!

@rosskevin
Copy link
Member

Hey @martian111, sorry, I didn't see it. It looks like ci didn't run on this, I'll check it out.

@rosskevin rosskevin self-requested a review February 9, 2024 20:31
@rosskevin rosskevin closed this Feb 9, 2024
@rosskevin rosskevin reopened this Feb 9, 2024
@rosskevin rosskevin self-requested a review February 9, 2024 20:33
@rosskevin
Copy link
Member

Hang in there with the notifications @martian111 - I'm using this to get my github actions workflow triggers corrected.

@rosskevin rosskevin closed this Feb 9, 2024
@rosskevin rosskevin reopened this Feb 9, 2024
@rosskevin rosskevin closed this Feb 9, 2024
@rosskevin rosskevin reopened this Feb 9, 2024
@martian111
Copy link
Contributor Author

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!

@rosskevin rosskevin closed this Feb 10, 2024
@rosskevin rosskevin reopened this Feb 10, 2024
@rosskevin rosskevin merged commit 559c2b3 into alienfast:main Feb 10, 2024
10 of 15 checks passed
@rosskevin
Copy link
Member

🚀 PR was released in v2.0.10 🚀

@rosskevin
Copy link
Member

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).

@martian111
Copy link
Contributor Author

Thank you too @rosskevin!

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

Successfully merging this pull request may close these issues.

2 participants