-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[docs] Translate the key wordings #14317
[docs] Translate the key wordings #14317
Conversation
oliviertassinari
commented
Jan 27, 2019
•
edited
Loading
edited
- Wait for people to update their documentation website to spam notifications
- Setup a minimal key translation infrastructure, to iterate
@@ -0,0 +1,66 @@ | |||
const translations = { |
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.
It would be great to move that file in Crowdin cc @mbrookes
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.
@alexanmtz Kindly offered to submit a POC PR using react-intl to allow us to translate strings in code, as he has already integrated it with CrowdIn for his own project. It would be great to be able to translate the home page.
I'm not sure how it will work with this file in its current structure (multiple languages concurrently), but I'm sure we can work out something that does.
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.
For me, the biggest challenge is to handle the translations data. Once we have it, I doubt we need any libraries. I have always found react-intl over engineered. https://airbnb.io/polyglot.js/ should often be enough. But I think that we can live without.
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.
Well, I would propose the integration with https://github.com/yahoo/react-intl to translate the strings as I did before in my project and I could integrate with Crowdin successfully. There's some tricks but I think it's a good approach to I18n with React, and there's some tools built upon it like https://github.com/yahoo/babel-plugin-react-intl
But I agree that is a little bit engineered but that fits in many scenarios.
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.
@alexanmtz Thank you for proposing your help 🙏. As far as I have looked that the problem, we only deal with static string data. We don't need to format, numbers, dates or handle dynamic data.