-
Notifications
You must be signed in to change notification settings - Fork 67
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
DT-1055 - ensure all text in holocene is rendered via slot or prop #1487
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I guess my general question is why pass in a prop with the translated text instead of translating the string directly in the Holocene component? |
Definitely agree with moving that list of components to |
Good question. If we want to publicize Holocene as a UI component library that can be consumed by external users, they may already be using their own internationalization framework other than i18next, or they may not have any i18n requirement at all. If we translated strings directly in our Holocene components, we'd be requiring everyone who uses Holocene to also bundle i18next in their app and host their own json files with the strings in them. Having all the text as props makes the Holocene agnostic to any potential internationalization frameworks. |
Description & motivation 💭
In order to fully internationalize the UI, we need to make sure there are no hard-coded strings in Holocene components. This PR takes care of that with a few exceptions.
I also moved some components out of
src/lib/holocene
and intosrc/lib/components
, because they dealt with specific Temporal logic. Those include:These components can be translated at a later date.
Screenshots (if applicable) 📸
Design Considerations 🎨
N/a
Testing 🧪
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Checklists
Draft Checklist
Merge Checklist
Issue(s) closed
Docs
Any docs updates needed?