Skip to content

Commit c32eea9

Browse files
aidoczhYikun
andauthored
[Doc]Add Chinese translation for documentation (#1870)
### What this PR does / why we need it? This PR adds a complete Chinese translation for the documentation using PO files and the gettext toolchain. The goal is to make the documentation more accessible to Chinese-speaking users and help the community grow. ### Does this PR introduce any user-facing change? Yes. This PR introduces Chinese documentation, which users can access alongside the original English documentation. No changes to the core code or APIs. ### How was this patch tested? The translated documentation was built locally using the standard documentation build process (`make html` or `sphinx-build`). I checked the generated HTML pages to ensure the Chinese content displays correctly and matches the original structure. No code changes were made, so no additional code tests are required. vLLM version: v0.9.2 vLLM main: vllm-project/vllm@5780121 --- Please review the translation and let me know if any improvements are needed. I am happy to update the translation based on feedback. - vLLM version: v0.9.2 - vLLM main: vllm-project/vllm@7ba34b1 --------- Signed-off-by: aidoczh <aidoczh@163.com> Signed-off-by: Yikun Jiang <yikunkero@gmail.com> Co-authored-by: Yikun Jiang <yikunkero@gmail.com>
1 parent 8cfd257 commit c32eea9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+9553
-7
lines changed

docs/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ help:
1919
%: Makefile
2020
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2121

22+
intl:
23+
sphinx-intl build
24+
@$(SPHINXBUILD) -b html -D language=zh_CN "$(SOURCEDIR)" "$(BUILDDIR)/html/zh-cn" $(SPHINXOPTS) $(O)
25+

docs/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ pip install -r requirements-docs.txt
1111
# Build the docs.
1212
make clean
1313
make html
14-
```
1514

16-
## Open the docs with your browser
15+
# Build the docs with translation
16+
make intl
1717

18-
```bash
18+
# Open the docs with your browser
1919
python -m http.server -d _build/html/
2020
```
2121

22-
Launch your browser and open http://localhost:8000/.
23-
22+
Launch your browser and open:
23+
- English version: http://localhost:8000
24+
- Chinese version: http://localhost:8000/zh_CN

docs/requirements-docs.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ sphinx-togglebutton
77
myst-parser
88
msgspec
99
sphinx-substitution-extensions
10+
sphinx-intl

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@
8888
#
8989
# This is also used if you do content translation via gettext catalogs.
9090
# Usually you set "language" from the command line for these cases.
91-
language = 'en'
92-
91+
locale_dirs = ['locale/']
92+
gettext_compact = False
9393
# List of patterns, relative to source directory, that match files and
9494
# directories to ignore when looking for source files.
9595
# This pattern also affects html_static_path and html_extra_path.

0 commit comments

Comments
 (0)