alienfast / vite-plugin-i18next-loader

Vite plugin to client bundle i18next locales composited from one to many json/yaml files from one to many libraries. Zero config HMR support included.
Other
42 stars 3 forks source link

Support language tags with more than one hyphen #14

Closed martian111 closed 7 months ago

martian111 commented 8 months ago

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

martian111 commented 7 months ago

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 commented 7 months ago

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

rosskevin commented 7 months ago

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

martian111 commented 7 months ago

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 commented 7 months ago

:rocket: PR was released in v2.0.10 :rocket:

rosskevin commented 7 months ago

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 commented 7 months ago

Thank you too @rosskevin!