Skip to content
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

Merged

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Jan 27, 2019

  • Wait for people to update their documentation website to spam notifications
  • Setup a minimal key translation infrastructure, to iterate

@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation label Jan 27, 2019
@@ -0,0 +1,66 @@
const translations = {
Copy link
Member Author

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

Copy link
Member

@mbrookes mbrookes Jan 27, 2019

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.

Copy link
Member Author

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.

Copy link
Contributor

@alexanmtz alexanmtz Jan 27, 2019

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.

Copy link
Member Author

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.

@oliviertassinari oliviertassinari merged commit b0e8b8e into mui:master Jan 27, 2019
@oliviertassinari oliviertassinari deleted the docs-i18n-translate-the-button branch January 27, 2019 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants