-
Notifications
You must be signed in to change notification settings - Fork 32
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
Web components: Embed translations #566
Conversation
Affected libs:
|
and do not generate translations in assets anymore
based on existing readmes
97c907e
to
37692ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work, clean and simple! I've added a comment to make sure that we don't burden the bundles other than the web component one, but nothing else to add. And kudos for adding so much doc on the web components!!
I'm approving the PR so that you can merge whenever you're done. Thanks 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Angi-Kinas, all good!
PR adds a
EmbeddedTranslateLoader
that allows to embed translations in the built js and uses this loader for web components. This prevents the need to ship translation files along with the web component script. For now, it increases thegn-wc.js
for about 14 kb per language. At a total size of 4 mb this change seems acceptable to me. Improvements might be made here when we optimize the web component's total bundling size (maybe by including only used translations or lazy loading).TODO: