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] Multi-lingual documentation site #1673

Closed
Huxpro opened this issue Sep 17, 2015 · 7 comments
Closed

[Docs] Multi-lingual documentation site #1673

Huxpro opened this issue Sep 17, 2015 · 7 comments
Labels
docs Improvements or additions to the documentation

Comments

@Huxpro
Copy link

Huxpro commented Sep 17, 2015

Hey.
I am a big fan of React, Material Design and now you guys Material-UI.
This components set is so awesome that I wanna do a translation, also build a github pages to help my hometown China.

I am trying to copy docs alone, install dependencies and run webpack build but got lots of errors and I finally realized this repo include everything so all the components required are resolved to the src of root instead of to node_module..
And I am also worried about how to sync updates with your official sites/release, seeing all docs are directly wrote into .jsx files, so it may not easy using git diff to checkout diffs.
Well..so is there any best practice can help? directly fork the whole repos and output to gh-pages branch with only docs/build? (How to do that will a nice npm script..)

Looking forward to your reply, thanks

@shaurya947
Copy link
Contributor

Hey @Huxpro ! I think it's great that you want to help spread the word about Material-UI in another language. 👍

Yes, the docs project relies on the src folder in the root of the repo. When you run npm install at the root level, babel compiles all the source files and puts them in the lib folder, which is again in the root of the repo. The files in the lib folder is what is actually used.

I see your point about all text being written directly into the .jsx files. In my opinion, the ideal solution would be to consolidate all text strings into a separate module, which can then be require()'d into a page. Of course, we would have different modules for different languages. This is like storing all your strings in a language resource file. So after creating a basic layout of a page, it can be translated to any language by simply adding a new string resource module.

What do you think @hai-cea ?

@Huxpro
Copy link
Author

Huxpro commented Sep 21, 2015

@shaurya947 Thanks for your reply!
Exactly. Separate text module is a perfect solution, similar to iOS/Android ways, very easy to maintain. But it also need you guys to do lots of work firstly, is it cost?

I dont wanna bother you guys with that at first ;(

@shaurya947
Copy link
Contributor

@Huxpro do you wanna help us? It might be quicker that way :-)

To start off, you could submit a PR that modifies the existing documentation site by moving all hard-coded strings into text modules. Let me know if this is something you would like to undertake.

@Huxpro
Copy link
Author

Huxpro commented Sep 22, 2015

@shaurya947 Sure. I would like to try it in my free time, after I finish my work with this framework ; )

@shaurya947 shaurya947 changed the title May I do a translation? [Docs] Multi-lingual documentation site Sep 22, 2015
@shaurya947 shaurya947 added the docs Improvements or additions to the documentation label Sep 22, 2015
@oliviertassinari oliviertassinari removed this from the Improve the documentation milestone Feb 1, 2016
@tintin1343
Copy link
Contributor

@Huxpro : Are you still planning to go ahead with this?

@Huxpro
Copy link
Author

Huxpro commented May 8, 2016

@tintin1343 Sorry but im too busy to do that. I'll appreciate sooooo much if someone can accomplish this work.

@tintin1343
Copy link
Contributor

@Huxpro : Thanks for replying.

I am closing this for now as this is not a pressing issue for us. Whenever you get time to work on this do let us know. We will reopen this. Hope that is alright.

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

No branches or pull requests

4 participants