Loading...
Loading...
Compare original and translation side by side
/doc-smith-localize --lang en # 翻译所有文档到英文
/doc-smith-localize -l en -l ja # 翻译到多个语言
/doc-smith-localize -l en -p /overview # 只翻译指定文档
/doc-smith-localize -l en --force # 强制重新翻译
/doc-smith-localize -l en --skip-images # 跳过图片翻译/doc-smith-localize --lang en # Translate all documents to English
/doc-smith-localize -l en -l ja # Translate to multiple languages
/doc-smith-localize -l en -p /overview # Translate only the specified document
/doc-smith-localize -l en --force # Force re-translation
/doc-smith-localize -l en --skip-images # Skip image translation| 选项 | 别名 | 说明 |
|---|---|---|
| | 目标语言代码(可多次使用) |
| | 指定文档路径(可多次使用) |
| | 强制重新翻译,覆盖已有 |
| 跳过图片翻译 |
| Option | Alias | Description |
|---|---|---|
| | Target language code (can be used multiple times) |
| | Specify document path (can be used multiple times) |
| | Force re-translation, overwrite existing translations |
| Skip image translation |
.aigne/doc-smith/config.yamlplanning/document-structure.yaml/doc-smith.aigne/doc-smith/config.yamlplanning/document-structure.yaml/doc-smith--path--path--force--force.aigne/doc-smith/glossary.yaml.md.aigne/doc-smith/glossary.yaml.md--skip-imagesgeneration.shared: true/doc-smith-images --update--skip-imagesgeneration.shared: true/doc-smith-images --updatetranslateLanguagestranslateLanguagesnode skills/doc-smith-build/scripts/build.mjs \
--nav --workspace .aigne/doc-smith --output .aigne/doc-smith/distdist/assets/nav.jsnode skills/doc-smith-build/scripts/build.mjs \
--nav --workspace .aigne/doc-smith --output .aigne/doc-smith/distdist/assets/nav.js源 HTML → 提取可翻译区域 → 翻译 → 组装目标 HTML → 保存
dist/{source}/docs/{path}.html → dist/{target}/docs/{path}.html<title><meta name="description"><main data-ds="content"><nav data-ds="toc">Source HTML → Extract translatable regions → Translate → Assemble target HTML → Save
dist/{source}/docs/{path}.html → dist/{target}/docs/{path}.html<title><meta name="description"><main data-ds="content"><nav data-ds="toc">按 references/translate-document.md 流程使用单独的 Task tool 并行翻译以下文档:
- docPath=/overview, targetLanguage=en, sourceLanguage=zh, force=false
- docPath=/api/auth, targetLanguage=en, sourceLanguage=zh, force=falseUse separate Task tools to translate the following documents in parallel according to the references/translate-document.md process:
- docPath=/overview, targetLanguage=en, sourceLanguage=zh, force=false
- docPath=/api/auth, targetLanguage=en, sourceLanguage=zh, force=false/doc-smith-images "将图片中的文字从 {source} 翻译成 {target},保持布局和风格不变" \
--update .aigne/doc-smith/assets/{key}/images/{source}.png \
--savePath .aigne/doc-smith/assets/{key}/images/{target}.png \
--locale {target}/doc-smith-images "Translate text in images from {source} to {target}, keeping layout and style unchanged" \
--update .aigne/doc-smith/assets/{key}/images/{source}.png \
--savePath .aigne/doc-smith/assets/{key}/images/{target}.png \
--locale {target}images/{source}.pngimages/{target}.pngimages/{source}.pngimages/{target}.pngdist/dist//doc-smith--path/doc-smith--path