-
Notifications
You must be signed in to change notification settings - Fork 32
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
Feature/add i18n docs support #51
Conversation
Hey @Bardreamaster, thank you for creating this PR to support multi-language documentation. However, after I pulled from your branch and tested the documentation, I noticed that it doesn't seem to be working as expected.
|
@starjustice Yes I know there's problem as you see. As the problem I mentioned in the description:
It's because when you click zh-Hans option on dropdown tab, there's no avalible route for the main page. So if you:
I'm not sure how docusaurus manage these routings for multi-language pages. That why I ask for help. Maybe you can try as i say. Thanks. |
And another comment for this PR. Could you please change the merge branch from |
Hey @Bardreamaster thanks for reply my comment. I have already tried your steps and we will added this in our sprint to be fix |
@starjustice I'v changed. Thanks for reply. |
Hey @Bardreamaster just want to inform I already made some changes in this PR for page/index.js Maybe you can check and try again after these changes changes
|
690d8cf
to
7375393
Compare
@starjustice Thanks for reply and sorry for reply too late. I've pull the latest update to check if the main page redirect is right. Unfortunately, there are problems:
I'm very confused about it. Hope you can help to solve. I'll keep translate content while you are fixing it. |
Hey @Bardreamaster, could you please change the target merge branch from |
Type of PR
style:
andperf:
commits)Description
I added the docs i18n files refer to the docusaurus i18n doc. With it, we can translate docs using git. It will create a folder contains all i18n files includes docs, theme, plugins..... We only have to initialize the folder and translate the text, then push back.
I have translate two pages for review and test the workflow, which are
intro
at/zh-Hans/version-2.0.0-beta/
andquick-start
at/zh-Hans/version-2.0.0-beta/quick-start
.To view the translation, you only have to build and serve the docs locally.
Although most page looks good, there's still a problem I need help:
As you click the logo on top-left, it will redirect to
/version-2.0.0-beta
even if you are in zh-Hans page before. It is caused by the home setting indocumentation/src/pages/index.js
which just redirect the home page by hard code like this:So, you cannot jump into a homepage with other language. Please help to fix that. If necessary, I'll put it in issue.
And after checking this i18n related workflow, I could keep translate docs.
Changes
/i18n