Files
xc-llm-kunlun/docs/README.md
2025-12-10 17:51:24 +08:00

57 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 🚀 Installation
```bash
uv venv myenv --python 3.12 --seed
source myenv/bin/activate
# 步骤1进入docs目录
cd docs
# 步骤2安装依赖使用uv
uv pip install -r requirements-docs.txt
# 安装 sphinx-autobuild如果没在 requirements 文件里)
uv pip install sphinx-autobuild
# 从 docs 目录运行:
sphinx-autobuild ./source ./_build/html --port 8000
# 步骤1清理旧文件
make clean
# 步骤2构建HTML
make html
# 步骤3本地预览
python -m http.server -d _build/html/
浏览器访问http://localhost:8000
🌍 Internationalization
国际化翻译流程(以中文为例)
# 步骤1提取可翻译文本生成 .pot
sphinx-build -b gettext source _build/gettext
# 步骤2生成/更新中文 .po 文件
sphinx-intl update -p _build/gettext -l zh_CN
# 步骤3人工翻译 .po 文件
# 用文本编辑器打开 source/locale/zh_CN/LC_MESSAGES/*.po
# 在 msgstr "" 里填入中文翻译
# 步骤4编译并构建中文文档
make intl
# 步骤5查看效果
python -m http.server -d _build/html
浏览器访问:
英文版: http://localhost:8000
中文版: http://localhost:8000/zh-cn
```