vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
11.48k stars 1.86k forks source link

docs(zh): add translations for zh-CN #1593

Closed awxiaoxian2020 closed 6 months ago

awxiaoxian2020 commented 1 year ago

close #1285.

You can preview it at https://deploy-preview-2249--vitepress-docs.netlify.app/zh/

It will be ready for review after:

awxiaoxian2020 commented 1 year ago

@brc-dd How do you think the VitePress i18n docs config structure should be better?

brc-dd commented 1 year ago

Add zh directory, keep english one on the root. This way it won't break the URLs.

awxiaoxian2020 commented 1 year ago

Add zh directory, keep english one on the root. This way it won't break the URLs.

What I said is config like nav. Where should I add zh nav? in docs/.vitepress/config.ts directly?

brc-dd commented 1 year ago

Ah okay. You can create a config directory and create two files (en.ts and zh.ts). and merge/reexport them from config/index.ts. It would be cleaner that way.

awxiaoxian2020 commented 1 year ago

Welcome to review by clicking here!

awxiaoxian2020 commented 1 year ago

@brc-dd Could we add a netlify bot for previewing directly like this?

brc-dd commented 1 year ago

Deploy previews are already enabled. Just the bot isn't added to prevent noise. One can open the deploy preview like this:

image

(Click on details aside deploy/netlify.)

awxiaoxian2020 commented 1 year ago

Deploy previews are already enabled. Just the bot isn't added to prevent noise. One can open the deploy preview like this:

image

(Click on details aside deploy/netlify.)

OK thanks!

kiaking commented 1 year ago

Hi! Thank you so much on working on this translations 🙏 Just to let you know, I'm planning to go through whole docs before stable release, and might restructure the contents here and there. So, please do not work too hard on this since I don't want to break your work badly 😅

awxiaoxian2020 commented 1 year ago

Hi! Thank you so much on working on this translations 🙏 Just to let you know, I'm planning to go through whole docs before stable release, and might restructure the contents here and there. So, please do not work too hard on this since I don't want to break your work badly 😅

Got it! Thanks!

kiaking commented 1 year ago

Hi! Seems like Evan had done whole doc rewrites and it's done now. I think you should expect that the doc is quite fixed 👍

awxiaoxian2020 commented 11 months ago

@brc-dd Could we consider merging this PR now?

jrappen commented 10 months ago

Hi, I assume the config should be moved to docs/.vitepress/config/index.ts, compare the pro tip at the end of the relevant vitepress docs section at:

https://vitepress.dev/guide/i18n#internationalization

Also, this might help as a reference:

image
brc-dd commented 10 months ago

Could we consider merging this PR now?

Yeah I'll ask the translations team to review it. 👍

awxiaoxian2020 commented 10 months ago

Could we consider merging this PR now?

Yeah I'll ask the translations team to review it. 👍

It has many typos indeed. But maintaining it here by myself is so hard. It's so large.

awxiaoxian2020 commented 6 months ago

Closing as support #2249.