Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

forkdo/docker-chinese-docs

Open more actions menu
 
 

Repository files navigation

Docker 中文文档

本文档使用 AI 翻译

项目流程

1. 拉取上游文档

  1. 创建空分支
git switch --orphan docs
  1. 创建 README.md
cat > README.md <<EOF
# 中文文档

本文档使用 AI 翻译
EOF
  1. 首次提交
git add .
git commit -am init
git push origin docs
  1. 设置上游仓库
# GitHub fork Codespaces 方式已自动设置
git remote set-url upstream https://github.com/docker/docs.git
git fetch upstream main
git checkout upstream/main -- content
  1. 增量翻译
rm -rf docs
mv content docs
git diff docs/
  1. 本地测试
git clone https://github.com/docker/docs.git docsite
cp -r docs_zh/* ./docsite/content
cd docsite
npm install

# 构建 0.141.0
hugo build

2. AI 翻译

  • 安装 CLI 工具 (增量更新直接使用 AI CLI 工具直接对比)
# npm install -g npm
npm install -g @google/gemini-cli
npm install -g @qwen-code/qwen-code
  • 使用 UV Python 脚本翻译
curl -L fx4.cn/uv | bash
uv sync
uv run translate_docs.py
  1. 设置环境变量 .env
API_KEY=
MODEL=
API_URL=https://openrouter.ai/api/v1/chat/completions

ROOT_DIR=./docs
EXCLUDE_DIR=
OUTPUT_MODE=new_folder
  1. AI 翻译

文档管理器

hugo build

About

Source repo for Docker's Documentation

Resources

Stars

Watchers

Forks

Languages

  • Python 88.9%
  • Shell 11.1%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.