-
Notifications
You must be signed in to change notification settings - Fork 85
feat: finalize basic i18n support #133
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
Conversation
|
Deploying tutorialkit-demo-page with
|
Latest commit: |
5468bcd
|
Status: | ✅ Deploy successful! |
Preview URL: | https://5291945c.tutorialkit-demo-page.pages.dev |
Branch Preview URL: | https://joan-i18n-missing-places.tutorialkit-demo-page.pages.dev |
Deploying tutorialkit-docs-page with
|
Latest commit: |
a47d0ec
|
Status: | ✅ Deploy successful! |
Preview URL: | https://a5a7917c.tutorialkit-docs-page.pages.dev |
Branch Preview URL: | https://joan-i18n-missing-places.tutorialkit-docs-page.pages.dev |
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.
Looks good to me!
In future we'll need to be careful with the packages/components/react
package. Exported public components should not define any texts that need localizing. They should always accept them as props. Maybe we should set up ESLint rule that prevents using/importing i18n
in those files.
That's a very good point. Maybe we should write that down in a What do you think? |
That would be great. I've been planning to create good For ESLint I've used this kind of rule before: https://gist.github.com/AriPerkkio/fab0f24753b0f8457b63da187a4aee9e. That restricts importing from specific directories from files that inside specific directories. E.g. prevent importing from |
Oh interesting! I like a lot the idea of using eslint to enforce this. From a quick look around, this eslint rule came up: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md It's not perfect but it would catch a few usecase. |
This PR completes the initial i18n support added in #127 for the remaining part of the UI where text should be customizable.