move
move copied to clipboard
Add move-book i18n ability.
Motivation
Gather multi-lang move-book in a gh-page.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
you guys can view it on my gh-page. https://chengyuejia.github.io/move/en/conditionals.html The lang-switcher is near the printer.

link to #512
I will accept this, but I think the final call is up to @geometryolife--let me know if this is good to go from your perspective and I will land!
Ok, I will review this pr tomorrow.

How should the local preview be? I did mdbook build then mdbook serve --open and it doesn't seem to work.
I have installed mdbook-i18n.
@ChengYueJia @funkill
@geometryolife Hi!
Each mdbook render saves artifacts to separate directory: builtin render to html dir, for other render - in directory with render's name https://github.com/rust-lang/mdBook/blob/master/src/book/mod.rs#L216. While serving, mdbook looks only for html directory https://github.com/rust-lang/mdBook/blob/master/src/cmd/serve.rs#L88 and we can't use serve command for other renders.
How should the local preview be? I did
mdbook buildthenmdbook serve --openand it doesn't seem to work. I have installedmdbook-i18n.
@geometryolife Hi, you have to add the lang-path to the url. http://127.0.0.1:3000/i18n/lang eg: http://127.0.0.1:3000/i18n/zh, http://127.0.0.1:3000/i18n/en
For the online one, not need for the /i18n, just specify the lang.
like this. https://chengyuejia.github.io/move/en/abilities.html
How should the local preview be? I did
mdbook buildthenmdbook serve --openand it doesn't seem to work. I have installedmdbook-i18n.@geometryolife Hi, you have to add the lang-path to the url. http://127.0.0.1:3000/i18n/lang eg: http://127.0.0.1:3000/i18n/zh, http://127.0.0.1:3000/i18n/en
For the online one, not need for the
/i18n, just specify the lang. like this. https://chengyuejia.github.io/move/en/abilities.html

I tried it, but it seems that no rendering resources will be loaded locally, which seems to be bad for local development and inspection.
I tried it, but it seems that no rendering resources will be loaded locally, which seems to be bad for local development and inspection.
@geometryolife
The problem seem like we have to specifiy the chapter on url. eg http://localhost:3000/i18n/en/introduction.html
This won't happen online for I've specify it on the workflow. Hope this can help you.

The problem seem like we have to specifiy the chapter on url. eg http://localhost:3000/i18n/en/introduction.html This won't happen online for I've specify it on the workflow. Hope this can help you.
I'm using the latest commit from your repository and it's running normally now. Looks Good To Me. @sblackshear
@tnowacki Could you help take a look and give some suggestion?
I thought about it carefully. If this PR is merged, move-book-zh will not support serve, and the updated content cannot be rendered in time, which will increase the difficulty of maintenance. The translation of move-book-zh is still in progress, I think this PR will be merged later. @ChengYueJia @sblackshear