-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
Fix web component i18n issues #2585
Fix web component i18n issues #2585
Conversation
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.
This looks good. Just some comments.
959f146
to
fac1888
Compare
3b41303
to
916e50d
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.
These are really great changes. There is one thing that needs to be removed, though.
400b24e
to
aac6c68
Compare
Add alchemy_i18n gem to test multiple translations in out dummy app.
Export translation and currentLocale function. Move the default translations into locales/en.js and import them directly into the i18n.js to have the translations in place and prevent raise conditions. Remove Alchemy.locale and use the lang attribute of html - element.
remove the Alchemy object from alchemy-tinymce and alchemy-datepicker and use i18n function instead. This reduce the dependencies and prevents raise conditions.
Migrate the character counter component to the default AlchemyHtmlElemenet and rename the max character - attribute. Also removed the Alchemy.t - function and replaced it by the default translate function to prevent raise conditions. Added a spec file to test the component.
Update our styleguide to use our web components for tinymce, character count, and datepicker.
Reload the admin interface completely after a language change to have a proper initialization of locales and the usage of the i18n translate function inside of our web components.
aac6c68
to
b387b27
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.
🥳
What is this pull request for?
Checklist