Skip to content

Commit

Permalink
Update (#934)
Browse files Browse the repository at this point in the history
* update doc

* update demos

* update docs

---------

Co-authored-by: Ren Xuancheng <17811943+jklj077@users.noreply.github.com>
  • Loading branch information
jklj077 and jklj077 authored Sep 20, 2024
1 parent b5765a9 commit f14f339
Show file tree
Hide file tree
Showing 6 changed files with 320 additions and 236 deletions.
22 changes: 20 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The documentation is available in both English and Simplified Chinese. We use

You need to install the Python package `sphinx-intl` before starting.

1. After updating the English documentation, run `make gettext`, and the pot files will be placed in the `build/gettext` directory.
1. After updating the English documentation, run `make gettext`, and the pot files will be placed in the `build/gettext` directory. `make gettext` can be slow if the doc is long.

2. Use the generated pot files to update the po files:
```bash
Expand All @@ -29,4 +29,22 @@ You need to install the Python package `sphinx-intl` before starting.

3. Translate po files at `locales\zh_CN\LC_MESSAGES`. Pay attention to fuzzy matches (messages after `#, fuzzy`). Please be careful not to break reST notation.

4. Build translated document: `make -e SPHINXOPTS="-D language='zh_CN'" html` or `sphinx-build -M html source build -D language=zh_CN`
4. Build translated document: `make -e SPHINXOPTS="-D language='zh_CN'" html` or `sphinx-build -M html source build -D language=zh_CN`

## Auto Build

```bash
pip install sphinx-autobuild
```

To autobuild the default version:
```bash
sphinx-autobuild source build/html
```

To autobuild the translated version:
```bash
sphinx-autobuild source build/html -D language=zh_CN --watch locales/zh_CN
```

By default, the doc is at `http://127.0.0.1:8000`
Loading

0 comments on commit f14f339

Please sign in to comment.