Skip to content

Commit 9cf05cf

Browse files
authoredApr 22, 2022
Add translation guide (#413)
1 parent 92fb0ac commit 9cf05cf

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
 

‎CONTRIBUTING.md

+15
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,20 @@ This website is based on Vuepress.
66

77
## Running Vuepress locally
88

9+
1. [Install Node.js](https://nodejs.org/en/download/)
910
1. [Install yarn](https://yarnpkg.com/getting-started/install)
1011
1. Run `yarn vuepress dev`
12+
13+
## Translation Guide
14+
15+
1. First of all, make sure you have installed `node.js`, `yarn`, and then clone the doc repo locally:
16+
`git clone git@github.com:nushell/nushell.github.io.git nu-docs`;
17+
2. Run `yarn install` in `nu-docs` dir after your cloning;
18+
3. Add a book dir(if not exists) for the specified locale in the docs' root folder, say `zh-CN`, and then create a `book` child folder for all your translated documents, and a README.md for the home page of your locale;
19+
4. Modify the vuepress config file `nu-docs/.vuepress/config.js`, add `zh-CN` related configs;
20+
5. Add README.md in the `book` dir, and that will be the default introduction page of Nushell.
21+
6. Run `yarn vuepress dev`, then open **http://localhost:8080/** in your browser, switch to the language you are going to translate into, and you will see the introduction page you have just created. You can translate the docs and save them to get a preview in the browser;
22+
7. Update the `nu-docs/i18n-meta.json` file, fill the locale value of the doc you have just finished. It's recommend to use `commit_id@author` or simply a `commit_id` to indicate your translation end to the specified commit;
23+
8. Commit your changes, It's recommend to squash all your commit in one commit with a commit message like this: `Translate your_doc_file.md to zh-CN from commit: f3dc86d3d`;
24+
9. Send a Pull Request;
25+
10. Check outdated translations: You can use command like `nu ./i18n.nu outdated zh-CN` to check the outdated translations(documents have been changed after your last translation) for the specified locale.

0 commit comments

Comments
 (0)
Please sign in to comment.