novelws 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +161 -0
- package/LICENSE +22 -0
- package/README.md +372 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +50 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/check.d.ts +6 -0
- package/dist/commands/check.d.ts.map +1 -0
- package/dist/commands/check.js +32 -0
- package/dist/commands/check.js.map +1 -0
- package/dist/commands/init.d.ts +6 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +160 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/plugin.d.ts +6 -0
- package/dist/commands/plugin.d.ts.map +1 -0
- package/dist/commands/plugin.js +135 -0
- package/dist/commands/plugin.js.map +1 -0
- package/dist/commands/upgrade.d.ts +6 -0
- package/dist/commands/upgrade.d.ts.map +1 -0
- package/dist/commands/upgrade.js +92 -0
- package/dist/commands/upgrade.js.map +1 -0
- package/dist/core/config.d.ts +72 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +136 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/errors.d.ts +59 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +125 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/platform.d.ts +27 -0
- package/dist/core/platform.d.ts.map +1 -0
- package/dist/core/platform.js +75 -0
- package/dist/core/platform.js.map +1 -0
- package/dist/core/template.d.ts +35 -0
- package/dist/core/template.d.ts.map +1 -0
- package/dist/core/template.js +94 -0
- package/dist/core/template.js.map +1 -0
- package/dist/plugins/identifier.d.ts +13 -0
- package/dist/plugins/identifier.d.ts.map +1 -0
- package/dist/plugins/identifier.js +72 -0
- package/dist/plugins/identifier.js.map +1 -0
- package/dist/plugins/installers/base.d.ts +27 -0
- package/dist/plugins/installers/base.d.ts.map +1 -0
- package/dist/plugins/installers/base.js +30 -0
- package/dist/plugins/installers/base.js.map +1 -0
- package/dist/plugins/installers/github.d.ts +22 -0
- package/dist/plugins/installers/github.d.ts.map +1 -0
- package/dist/plugins/installers/github.js +133 -0
- package/dist/plugins/installers/github.js.map +1 -0
- package/dist/plugins/installers/local.d.ts +16 -0
- package/dist/plugins/installers/local.d.ts.map +1 -0
- package/dist/plugins/installers/local.js +69 -0
- package/dist/plugins/installers/local.js.map +1 -0
- package/dist/plugins/installers/npm.d.ts +20 -0
- package/dist/plugins/installers/npm.d.ts.map +1 -0
- package/dist/plugins/installers/npm.js +99 -0
- package/dist/plugins/installers/npm.js.map +1 -0
- package/dist/plugins/manager.d.ts +77 -0
- package/dist/plugins/manager.d.ts.map +1 -0
- package/dist/plugins/manager.js +349 -0
- package/dist/plugins/manager.js.map +1 -0
- package/dist/plugins/registry.d.ts +48 -0
- package/dist/plugins/registry.d.ts.map +1 -0
- package/dist/plugins/registry.js +111 -0
- package/dist/plugins/registry.js.map +1 -0
- package/dist/plugins/types.d.ts +66 -0
- package/dist/plugins/types.d.ts.map +1 -0
- package/dist/plugins/types.js +2 -0
- package/dist/plugins/types.js.map +1 -0
- package/dist/plugins/validator.d.ts +19 -0
- package/dist/plugins/validator.d.ts.map +1 -0
- package/dist/plugins/validator.js +164 -0
- package/dist/plugins/validator.js.map +1 -0
- package/dist/utils/logger.d.ts +13 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +48 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/project.d.ts +24 -0
- package/dist/utils/project.d.ts.map +1 -0
- package/dist/utils/project.js +61 -0
- package/dist/utils/project.js.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +21 -0
- package/dist/version.js.map +1 -0
- package/package.json +76 -0
- package/plugins/authentic-voice/README.md +31 -0
- package/plugins/authentic-voice/commands/authentic-voice.md +73 -0
- package/plugins/authentic-voice/commands/authenticity-audit.md +37 -0
- package/plugins/authentic-voice/config.yaml +30 -0
- package/plugins/authentic-voice/experts/authentic-editor.md +27 -0
- package/plugins/export/README.md +319 -0
- package/plugins/export/commands/export.md +460 -0
- package/plugins/export/commands/generate-cover.md +256 -0
- package/plugins/export/commands/metadata.md +309 -0
- package/plugins/export/config.yaml +47 -0
- package/plugins/export/experts/publishing-expert.md +171 -0
- package/plugins/export/templates/epub/chapter-template.html +13 -0
- package/plugins/export/templates/epub/cover-template.html +14 -0
- package/plugins/export/templates/epub/stylesheet.css +200 -0
- package/plugins/export/templates/pdf/ebook-style.css +137 -0
- package/plugins/export/templates/pdf/print-style.css +179 -0
- package/plugins/export/templates/platforms/jinjiang-format.md +101 -0
- package/plugins/export/templates/platforms/qidian-format.md +108 -0
- package/plugins/export/templates/platforms/tomato-format.md +95 -0
- package/plugins/translate/README.md +265 -0
- package/plugins/translate/commands/glossary.md +731 -0
- package/plugins/translate/commands/translate-preview.md +543 -0
- package/plugins/translate/commands/translate.md +649 -0
- package/plugins/translate/config.yaml +43 -0
- package/plugins/translate/experts/literary-translator.md +605 -0
- package/templates/commands/analyze.md +1485 -0
- package/templates/commands/checklist.md +434 -0
- package/templates/commands/clarify.md +257 -0
- package/templates/commands/constitution.md +257 -0
- package/templates/commands/expert.md +136 -0
- package/templates/commands/plan.md +749 -0
- package/templates/commands/recap.md +613 -0
- package/templates/commands/relations.md +96 -0
- package/templates/commands/revise.md +341 -0
- package/templates/commands/specify.md +682 -0
- package/templates/commands/tasks.md +142 -0
- package/templates/commands/timeline.md +73 -0
- package/templates/commands/track-init.md +137 -0
- package/templates/commands/track.md +463 -0
- package/templates/commands/write.md +1264 -0
- package/templates/config/keyword-mappings.json +106 -0
- package/templates/knowledge/audit-config.json +26 -0
- package/templates/knowledge/character-profiles.md +152 -0
- package/templates/knowledge/character-voices.md +137 -0
- package/templates/knowledge/locations.md +184 -0
- package/templates/knowledge/world-setting.md +121 -0
- package/templates/knowledge-base/README.md +285 -0
- package/templates/knowledge-base/character-archetypes/01-hero.md +233 -0
- package/templates/knowledge-base/character-archetypes/02-mentor.md +177 -0
- package/templates/knowledge-base/character-archetypes/03-shadow.md +221 -0
- package/templates/knowledge-base/character-archetypes/04-ally.md +178 -0
- package/templates/knowledge-base/character-archetypes/05-shapeshifter.md +177 -0
- package/templates/knowledge-base/character-archetypes/06-trickster.md +181 -0
- package/templates/knowledge-base/character-archetypes/07-threshold-guardian.md +177 -0
- package/templates/knowledge-base/character-archetypes/08-herald.md +180 -0
- package/templates/knowledge-base/character-archetypes/09-father.md +249 -0
- package/templates/knowledge-base/character-archetypes/10-mother.md +202 -0
- package/templates/knowledge-base/character-archetypes/11-child.md +183 -0
- package/templates/knowledge-base/character-archetypes/12-sage.md +202 -0
- package/templates/knowledge-base/character-archetypes/README.md +60 -0
- package/templates/knowledge-base/character-archetypes/application-guide.md +222 -0
- package/templates/knowledge-base/character-archetypes/archetype-combinations.md +242 -0
- package/templates/knowledge-base/character-archetypes/config.yaml +28 -0
- package/templates/knowledge-base/character-archetypes/examples-analysis.md +223 -0
- package/templates/knowledge-base/craft/character-arc.md +1153 -0
- package/templates/knowledge-base/craft/dialogue.md +1170 -0
- package/templates/knowledge-base/craft/pacing.md +1200 -0
- package/templates/knowledge-base/craft/scene-structure.md +1136 -0
- package/templates/knowledge-base/craft/show-not-tell.md +1012 -0
- package/templates/knowledge-base/emotional-beats/01-first-meeting.md +145 -0
- package/templates/knowledge-base/emotional-beats/02-bonding-moment.md +226 -0
- package/templates/knowledge-base/emotional-beats/03-declaration.md +284 -0
- package/templates/knowledge-base/emotional-beats/04-triumph.md +240 -0
- package/templates/knowledge-base/emotional-beats/05-reunion.md +396 -0
- package/templates/knowledge-base/emotional-beats/06-forgiveness.md +204 -0
- package/templates/knowledge-base/emotional-beats/07-betrayal.md +204 -0
- package/templates/knowledge-base/emotional-beats/08-loss.md +214 -0
- package/templates/knowledge-base/emotional-beats/09-rejection.md +254 -0
- package/templates/knowledge-base/emotional-beats/10-failure.md +244 -0
- package/templates/knowledge-base/emotional-beats/11-misunderstanding.md +205 -0
- package/templates/knowledge-base/emotional-beats/12-farewell.md +283 -0
- package/templates/knowledge-base/emotional-beats/13-revelation.md +242 -0
- package/templates/knowledge-base/emotional-beats/14-point-of-no-return.md +215 -0
- package/templates/knowledge-base/emotional-beats/15-dark-night.md +244 -0
- package/templates/knowledge-base/emotional-beats/16-sacrifice.md +246 -0
- package/templates/knowledge-base/emotional-beats/17-awakening.md +246 -0
- package/templates/knowledge-base/emotional-beats/18-confrontation.md +217 -0
- package/templates/knowledge-base/emotional-beats/19-bittersweet-goodbye.md +368 -0
- package/templates/knowledge-base/emotional-beats/20-moral-dilemma.md +248 -0
- package/templates/knowledge-base/emotional-beats/21-temptation.md +240 -0
- package/templates/knowledge-base/emotional-beats/22-redemption.md +210 -0
- package/templates/knowledge-base/emotional-beats/README.md +104 -0
- package/templates/knowledge-base/emotional-beats/beat-sequences.md +276 -0
- package/templates/knowledge-base/emotional-beats/config.yaml +30 -0
- package/templates/knowledge-base/emotional-beats/pacing-guide.md +390 -0
- package/templates/knowledge-base/genres/historical.md +1127 -0
- package/templates/knowledge-base/genres/mystery.md +1123 -0
- package/templates/knowledge-base/genres/revenge.md +846 -0
- package/templates/knowledge-base/genres/romance.md +948 -0
- package/templates/knowledge-base/genres/sci-fi.md +156 -0
- package/templates/knowledge-base/genres/thriller.md +166 -0
- package/templates/knowledge-base/genres/wuxia.md +143 -0
- package/templates/knowledge-base/references/README.md +96 -0
- package/templates/knowledge-base/references/china-1920s/culture.md +423 -0
- package/templates/knowledge-base/references/china-1920s/daily-life.md +616 -0
- package/templates/knowledge-base/references/china-1920s/overview.md +298 -0
- package/templates/knowledge-base/references/china-1920s/society.md +703 -0
- package/templates/knowledge-base/references/china-1920s/warlords.md +427 -0
- package/templates/knowledge-base/references/cultivation-world/daily-life.md +108 -0
- package/templates/knowledge-base/references/cultivation-world/overview.md +64 -0
- package/templates/knowledge-base/references/cultivation-world/power-system.md +108 -0
- package/templates/knowledge-base/references/cultivation-world/sects.md +104 -0
- package/templates/knowledge-base/references/cultivation-world/world-setting.md +108 -0
- package/templates/knowledge-base/references/modern-workplace/corporate.md +115 -0
- package/templates/knowledge-base/references/modern-workplace/daily-life.md +129 -0
- package/templates/knowledge-base/references/modern-workplace/overview.md +73 -0
- package/templates/knowledge-base/references/modern-workplace/relationships.md +107 -0
- package/templates/knowledge-base/references/modern-workplace/tech-industry.md +131 -0
- package/templates/knowledge-base/references/tang-dynasty/culture.md +135 -0
- package/templates/knowledge-base/references/tang-dynasty/daily-life.md +139 -0
- package/templates/knowledge-base/references/tang-dynasty/overview.md +76 -0
- package/templates/knowledge-base/references/tang-dynasty/politics.md +121 -0
- package/templates/knowledge-base/references/tang-dynasty/society.md +126 -0
- package/templates/knowledge-base/requirements/README.md +240 -0
- package/templates/knowledge-base/requirements/anti-ai-v3.md +46 -0
- package/templates/knowledge-base/requirements/anti-ai-v4.md +430 -0
- package/templates/knowledge-base/requirements/fast-paced.md +552 -0
- package/templates/knowledge-base/requirements/no-poison.md +60 -0
- package/templates/knowledge-base/requirements/romance-angst.md +102 -0
- package/templates/knowledge-base/requirements/romance-sweet.md +63 -0
- package/templates/knowledge-base/requirements/serious-literature.md +45 -0
- package/templates/knowledge-base/requirements/strong-emotion.md +60 -0
- package/templates/knowledge-base/styles/README.md +302 -0
- package/templates/knowledge-base/styles/ancient-style.md +579 -0
- package/templates/knowledge-base/styles/literary.md +439 -0
- package/templates/knowledge-base/styles/minimal.md +472 -0
- package/templates/knowledge-base/styles/natural-voice.md +930 -0
- package/templates/knowledge-base/styles/web-novel.md +525 -0
- package/templates/memory/constitution.md +140 -0
- package/templates/memory/personal-voice.md +113 -0
- package/templates/scripts/README.md +187 -0
- package/templates/scripts/bash/analyze-story.sh +170 -0
- package/templates/scripts/bash/check-consistency.sh +463 -0
- package/templates/scripts/bash/check-plot.sh +374 -0
- package/templates/scripts/bash/check-timeline.sh +346 -0
- package/templates/scripts/bash/check-world.sh +395 -0
- package/templates/scripts/bash/check-writing-state.sh +854 -0
- package/templates/scripts/bash/clarify-story.sh +117 -0
- package/templates/scripts/bash/common.sh +151 -0
- package/templates/scripts/bash/constitution.sh +114 -0
- package/templates/scripts/bash/generate-tasks.sh +65 -0
- package/templates/scripts/bash/init-tracking.sh +183 -0
- package/templates/scripts/bash/manage-relations.sh +174 -0
- package/templates/scripts/bash/plan-story.sh +100 -0
- package/templates/scripts/bash/specify-story.sh +93 -0
- package/templates/scripts/bash/tasks-story.sh +96 -0
- package/templates/scripts/bash/test-word-count.sh +182 -0
- package/templates/scripts/bash/tests/bench-preload-cache.sh +100 -0
- package/templates/scripts/bash/tests/run-all-benchmarks.sh +16 -0
- package/templates/scripts/bash/tests/test-cache-semantics.sh +199 -0
- package/templates/scripts/bash/tests/test-cross-platform.sh +35 -0
- package/templates/scripts/bash/tests/test-edge-cases-bash.sh +60 -0
- package/templates/scripts/bash/tests/test-phase1-bash.sh +28 -0
- package/templates/scripts/bash/tests/test-preload-cache.sh +123 -0
- package/templates/scripts/bash/tests/test-regex-precompile.sh +89 -0
- package/templates/scripts/bash/tests/test-regression-bash.sh +42 -0
- package/templates/scripts/bash/tests/test-task6-verification.sh +200 -0
- package/templates/scripts/bash/text-audit.sh +144 -0
- package/templates/scripts/bash/track-progress.sh +194 -0
- package/templates/scripts/powershell/analyze-story.ps1 +171 -0
- package/templates/scripts/powershell/check-analyze-stage.ps1 +110 -0
- package/templates/scripts/powershell/check-consistency.ps1 +138 -0
- package/templates/scripts/powershell/check-plot.ps1 +139 -0
- package/templates/scripts/powershell/check-timeline.ps1 +112 -0
- package/templates/scripts/powershell/check-writing-state.ps1 +490 -0
- package/templates/scripts/powershell/check-writing-state.ps1.backup +135 -0
- package/templates/scripts/powershell/clarify-story.ps1 +107 -0
- package/templates/scripts/powershell/common.ps1 +36 -0
- package/templates/scripts/powershell/constitution.ps1 +142 -0
- package/templates/scripts/powershell/generate-tasks.ps1 +75 -0
- package/templates/scripts/powershell/init-tracking.ps1 +98 -0
- package/templates/scripts/powershell/manage-relations.ps1 +134 -0
- package/templates/scripts/powershell/plan-story.ps1 +96 -0
- package/templates/scripts/powershell/specify-story.ps1 +82 -0
- package/templates/scripts/powershell/tests/bench-ps-cache.ps1 +80 -0
- package/templates/scripts/powershell/tests/test-cross-platform.ps1 +27 -0
- package/templates/scripts/powershell/tests/test-edge-cases-ps.ps1 +29 -0
- package/templates/scripts/powershell/tests/test-phase1-ps.ps1 +28 -0
- package/templates/scripts/powershell/tests/test-ps-cache.ps1 +73 -0
- package/templates/scripts/powershell/tests/test-regression-ps.ps1 +40 -0
- package/templates/scripts/powershell/text-audit.ps1 +100 -0
- package/templates/scripts/powershell/track-progress.ps1 +105 -0
- package/templates/skills/genre-knowledge/fantasy/SKILL.md +355 -0
- package/templates/skills/genre-knowledge/mystery/SKILL.md +337 -0
- package/templates/skills/genre-knowledge/romance/SKILL.md +228 -0
- package/templates/skills/genre-knowledge/sci-fi/SKILL.md +65 -0
- package/templates/skills/genre-knowledge/thriller/SKILL.md +95 -0
- package/templates/skills/quality-assurance/consistency-checker/SKILL.md +341 -0
- package/templates/skills/quality-assurance/continuity-tracker/SKILL.md +157 -0
- package/templates/skills/quality-assurance/forgotten-elements/SKILL.md +147 -0
- package/templates/skills/quality-assurance/getting-started/SKILL.md +224 -0
- package/templates/skills/quality-assurance/pacing-monitor/SKILL.md +143 -0
- package/templates/skills/quality-assurance/pov-validator/SKILL.md +135 -0
- package/templates/skills/quality-assurance/pre-write-checklist/SKILL.md +583 -0
- package/templates/skills/quality-assurance/requirement-detector/CONFLICT_RESOLUTION.md +119 -0
- package/templates/skills/quality-assurance/requirement-detector/EXAMPLES.md +146 -0
- package/templates/skills/quality-assurance/requirement-detector/KEYWORDS.md +160 -0
- package/templates/skills/quality-assurance/requirement-detector/SKILL.md +149 -0
- package/templates/skills/quality-assurance/setting-detector/SKILL.md +611 -0
- package/templates/skills/quality-assurance/style-detector/CONFLICT_RESOLUTION.md +126 -0
- package/templates/skills/quality-assurance/style-detector/EXAMPLES.md +206 -0
- package/templates/skills/quality-assurance/style-detector/KEYWORDS.md +207 -0
- package/templates/skills/quality-assurance/style-detector/SKILL.md +126 -0
- package/templates/skills/quality-assurance/workflow-guide/SKILL.md +381 -0
- package/templates/skills/writing-techniques/character-arc/SKILL.md +267 -0
- package/templates/skills/writing-techniques/dialogue-techniques/SKILL.md +366 -0
- package/templates/skills/writing-techniques/multi-thread-narrative/SKILL.md +553 -0
- package/templates/skills/writing-techniques/multi-thread-narrative/experts/thread-analyst.md +226 -0
- package/templates/skills/writing-techniques/pacing-control/SKILL.md +377 -0
- package/templates/skills/writing-techniques/reader-expectation/SKILL.md +578 -0
- package/templates/skills/writing-techniques/reader-expectation/experts/expectation-analyst.md +209 -0
- package/templates/skills/writing-techniques/revision-polish/SKILL.md +496 -0
- package/templates/skills/writing-techniques/revision-polish/experts/revision-editor.md +221 -0
- package/templates/skills/writing-techniques/scene-structure/SKILL.md +361 -0
- package/templates/skills/writing-techniques/style-learning/SKILL.md +436 -0
- package/templates/specification-example.md +146 -0
- package/templates/tracking/character-state.json +78 -0
- package/templates/tracking/plot-tracker.json +62 -0
- package/templates/tracking/relationships.json +70 -0
- package/templates/tracking/timeline.json +49 -0
- package/templates/tracking/tracking-log.md +110 -0
- package/templates/tracking/validation-rules.json +128 -0
|
@@ -0,0 +1,649 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 小说翻译 - /translate
|
|
3
|
+
description: 翻译章节或全书,保持文学性与术语一致性
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 小说翻译
|
|
7
|
+
|
|
8
|
+
## 使用方法
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
/translate [选项] [文件/范围]
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### 基本用法
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
/translate --to en chapter-01.md # 翻译单章为英文
|
|
18
|
+
/translate --to en --all # 翻译全书为英文
|
|
19
|
+
/translate --to ja --chapters 1-10 # 翻译第 1-10 章为日文
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### 选项
|
|
23
|
+
|
|
24
|
+
| 选项 | 说明 | 默认值 |
|
|
25
|
+
|------|------|--------|
|
|
26
|
+
| `--from <语言>` | 源语言 | 自动检测 |
|
|
27
|
+
| `--to <语言>` | 目标语言(必需) | - |
|
|
28
|
+
| `--all` | 翻译全书 | false |
|
|
29
|
+
| `--chapters <范围>` | 章节范围(如 `1-10`) | - |
|
|
30
|
+
| `--style <风格>` | 翻译风格 | literary |
|
|
31
|
+
| `--glossary <文件>` | 指定术语表 | .specify/translation/glossary.json |
|
|
32
|
+
| `--skip-existing` | 跳过已翻译章节 | false |
|
|
33
|
+
|
|
34
|
+
### 语言代码
|
|
35
|
+
|
|
36
|
+
| 代码 | 语言 | 说明 |
|
|
37
|
+
|------|------|------|
|
|
38
|
+
| `zh` | 中文(简体) | 默认源语言 |
|
|
39
|
+
| `en` | 英文 | 网文出海首选 |
|
|
40
|
+
| `ja` | 日文 | 轻小说市场 |
|
|
41
|
+
|
|
42
|
+
### 翻译风格
|
|
43
|
+
|
|
44
|
+
| 风格 | 说明 | 适用场景 |
|
|
45
|
+
|------|------|---------|
|
|
46
|
+
| `literary`(默认) | 文学性翻译,保持意境和节奏 | 严肃文学、文青向网文 |
|
|
47
|
+
| `casual` | 口语化翻译,通俗易懂 | 爽文、轻小说 |
|
|
48
|
+
| `formal` | 正式翻译,庄重典雅 | 历史、武侠 |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## 功能详解
|
|
53
|
+
|
|
54
|
+
### 1. 智能分段翻译
|
|
55
|
+
|
|
56
|
+
将长文本按段落分组,每组 ~2000 字,附带上下文:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
[前文上下文 200 字(已翻译版本)]
|
|
60
|
+
---
|
|
61
|
+
[待翻译段落组 ~2000 字]
|
|
62
|
+
---
|
|
63
|
+
[后文预览 200 字(原文)]
|
|
64
|
+
+ [术语表]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**优势:**
|
|
68
|
+
- 避免超长输入导致质量下降
|
|
69
|
+
- 保持上下文连贯
|
|
70
|
+
- 术语实时提醒
|
|
71
|
+
|
|
72
|
+
### 2. 术语自动应用
|
|
73
|
+
|
|
74
|
+
**翻译前:**
|
|
75
|
+
1. 读取 `.specify/translation/glossary.json`
|
|
76
|
+
2. 扫描原文,标记所有术语出现位置
|
|
77
|
+
3. 将术语替换为带标注的占位符
|
|
78
|
+
|
|
79
|
+
**翻译中:**
|
|
80
|
+
- AI 翻译时看到占位符和标准译名
|
|
81
|
+
- 确保译名一致
|
|
82
|
+
|
|
83
|
+
**翻译后:**
|
|
84
|
+
1. 验证所有术语已正确应用
|
|
85
|
+
2. 检测原文中未在术语表的专有名词
|
|
86
|
+
3. 提示添加新术语
|
|
87
|
+
|
|
88
|
+
### 3. 两遍翻译策略
|
|
89
|
+
|
|
90
|
+
**第一遍 - 直译(准确性优先):**
|
|
91
|
+
```
|
|
92
|
+
Focus: 确保信息完整传达
|
|
93
|
+
允许: 略显生硬的表达
|
|
94
|
+
目标: 不遗漏任何信息
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**第二遍 - 润色(流畅性优先):**
|
|
98
|
+
```
|
|
99
|
+
Focus: 让目标语母语者读起来自然
|
|
100
|
+
调整: 句式重组、词汇润色
|
|
101
|
+
目标: 流畅自然的文学翻译
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**对比检查:**
|
|
105
|
+
```
|
|
106
|
+
逐段对比初译和润色版:
|
|
107
|
+
- 关键信息是否保留?
|
|
108
|
+
- 情感基调是否一致?
|
|
109
|
+
- 角色语气是否匹配?
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 4. 文化适应处理
|
|
113
|
+
|
|
114
|
+
| 类型 | 原文 | 直译 | 文化适应 |
|
|
115
|
+
|------|------|------|---------|
|
|
116
|
+
| 成语 | 三十六计走为上计 | Thirty-six stratagems, fleeing is best | He chose discretion over valor |
|
|
117
|
+
| 典故 | 司马昭之心 | Sima Zhao's heart | An open secret / obvious intentions |
|
|
118
|
+
| 称呼 | 师父 | Master (martial arts context) | 保留 "Shifu" 或用 "Master" |
|
|
119
|
+
| 度量 | 三尺 | Three chi | About three feet |
|
|
120
|
+
| 诗词 | 举头望明月 | Raise head gaze bright moon | I lift my gaze to the bright moon |
|
|
121
|
+
|
|
122
|
+
**处理策略:**
|
|
123
|
+
- **成语/俗语:** 寻找目标语对等表达,无对等则意译
|
|
124
|
+
- **称呼:** 保留拼音(如 Shifu)+ 首次出现时注释
|
|
125
|
+
- **度量单位:** 转换为目标文化单位
|
|
126
|
+
- **诗词:** 保留韵律感的意译,或直译 + 注释
|
|
127
|
+
- **专有名词(如功法名):** 意译为主,首次出现附带拼音
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## 输出格式
|
|
132
|
+
|
|
133
|
+
### 目录结构
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
stories/[story-name]/translations/
|
|
137
|
+
├── en/
|
|
138
|
+
│ ├── content/
|
|
139
|
+
│ │ ├── chapter-01.md # 翻译后的章节
|
|
140
|
+
│ │ ├── chapter-02.md
|
|
141
|
+
│ │ └── ...
|
|
142
|
+
│ ├── glossary-used.json # 本次使用的术语快照
|
|
143
|
+
│ └── translation-report.md # 翻译报告
|
|
144
|
+
└── ja/
|
|
145
|
+
└── ...
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### 翻译报告
|
|
149
|
+
|
|
150
|
+
```markdown
|
|
151
|
+
# 翻译报告
|
|
152
|
+
|
|
153
|
+
- 源语言:中文
|
|
154
|
+
- 目标语言:英文
|
|
155
|
+
- 翻译风格:literary
|
|
156
|
+
- 翻译日期:2025-02-09
|
|
157
|
+
|
|
158
|
+
## 统计
|
|
159
|
+
|
|
160
|
+
| 指标 | 值 |
|
|
161
|
+
|------|---|
|
|
162
|
+
| 翻译章节数 | 30 |
|
|
163
|
+
| 原文总字数 | 256,000 字 |
|
|
164
|
+
| 译文总词数 | 312,000 词 |
|
|
165
|
+
| 应用术语数 | 85 个 |
|
|
166
|
+
| 新发现术语 | 12 个(待确认) |
|
|
167
|
+
|
|
168
|
+
## 术语应用情况
|
|
169
|
+
|
|
170
|
+
| 术语 | 译名 | 出现次数 |
|
|
171
|
+
|------|------|---------|
|
|
172
|
+
| 李明 | Li Ming | 1,245 |
|
|
173
|
+
| 青云宗 | Azure Cloud Sect | 389 |
|
|
174
|
+
| ... | ... | ... |
|
|
175
|
+
|
|
176
|
+
## 注意事项
|
|
177
|
+
|
|
178
|
+
- 第 5 章有 2 处文化典故需人工确认
|
|
179
|
+
- 第 12 章诗词翻译建议人工审阅
|
|
180
|
+
- 发现 12 个新专有名词,建议添加到术语表
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## 与其他命令集成
|
|
186
|
+
|
|
187
|
+
### 与 /write 集成
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
/write 完成第 5 章 →
|
|
191
|
+
提示:"第 5 章已完成,是否翻译为英文?"
|
|
192
|
+
用户确认 → 自动调用 /translate --to en chapter-05.md
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### 与 /export 集成
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
/export --format epub --lang en
|
|
199
|
+
→ 先检查英文版是否存在
|
|
200
|
+
→ 不存在则提示先翻译
|
|
201
|
+
→ 存在则直接导出英文版 EPUB
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### 与 /analyze 集成
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
/analyze --translation en
|
|
208
|
+
→ 检查翻译质量
|
|
209
|
+
→ 术语一致性报告
|
|
210
|
+
→ 疑似翻译错误标记
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## 翻译质量保证
|
|
216
|
+
|
|
217
|
+
### 自动检查项
|
|
218
|
+
|
|
219
|
+
| 检查项 | 说明 | 处理 |
|
|
220
|
+
|--------|------|------|
|
|
221
|
+
| 术语一致性 | glossary 中的术语是否 100% 统一 | 错误 → 自动修正 |
|
|
222
|
+
| 段落对应 | 原文和译文段落数是否一致 | 警告 → 人工检查 |
|
|
223
|
+
| 长度合理性 | 中→英 +20-50%,中→日 -10-20% | 警告 → 可能过度翻译或遗漏 |
|
|
224
|
+
| 特殊符号 | 引号、书名号是否正确转换 | 自动修正 |
|
|
225
|
+
| 未定义术语 | 是否有专有名词不在 glossary 中 | 提示 → 建议添加 |
|
|
226
|
+
|
|
227
|
+
### 警告示例
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
✅ 翻译完成!
|
|
231
|
+
|
|
232
|
+
术语应用:85/85(100%)
|
|
233
|
+
|
|
234
|
+
⚠️ 警告:
|
|
235
|
+
第 3 章第 12 段:检测到未定义术语"天灵根"(出现 5 次)
|
|
236
|
+
建议:/glossary add "天灵根|Heavenly Spirit Root|天霊根"
|
|
237
|
+
|
|
238
|
+
第 7 章:译文长度异常(原文 3200 字,译文 6100 词,+90%)
|
|
239
|
+
可能原因:过度解释
|
|
240
|
+
建议:人工检查润色
|
|
241
|
+
|
|
242
|
+
第 15 章第 8 段:检测到诗词内容
|
|
243
|
+
已使用意译策略,建议人工审阅
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## 常见陷阱
|
|
249
|
+
|
|
250
|
+
### 1. 未初始化术语表就翻译
|
|
251
|
+
|
|
252
|
+
**症状:** 同一角色名出现多种译法
|
|
253
|
+
|
|
254
|
+
**解决:** 翻译前先 `/glossary init`,至少添加主要角色和地名
|
|
255
|
+
|
|
256
|
+
### 2. 过度直译
|
|
257
|
+
|
|
258
|
+
**症状:** 读起来像机器翻译
|
|
259
|
+
|
|
260
|
+
**解决:** 使用 `literary` 风格,AI 会自动调整
|
|
261
|
+
|
|
262
|
+
### 3. 文化误译
|
|
263
|
+
|
|
264
|
+
**症状:** "三长两短" → "three long two short"
|
|
265
|
+
|
|
266
|
+
**解决:** AI 会自动识别 idiom 并本地化,复杂情况会标记待人工确认
|
|
267
|
+
|
|
268
|
+
### 4. 一次翻译太多
|
|
269
|
+
|
|
270
|
+
**症状:** 翻译质量随文本长度下降
|
|
271
|
+
|
|
272
|
+
**解决:** 系统自动分段,每段 ~2000 字
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## 检查清单
|
|
277
|
+
|
|
278
|
+
### 翻译前
|
|
279
|
+
|
|
280
|
+
- [ ] 已初始化术语表?(/glossary init)
|
|
281
|
+
- [ ] 已添加主要角色名/地名?(/glossary add)
|
|
282
|
+
- [ ] 已选择合适的翻译风格?
|
|
283
|
+
- [ ] 已用 /translate-preview 预览效果?
|
|
284
|
+
|
|
285
|
+
### 翻译后
|
|
286
|
+
|
|
287
|
+
- [ ] 术语一致性 100%?
|
|
288
|
+
- [ ] 翻译报告中无严重警告?
|
|
289
|
+
- [ ] 关键章节已人工抽查?
|
|
290
|
+
- [ ] 新发现术语已添加到 glossary?
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## 执行流程
|
|
295
|
+
|
|
296
|
+
当用户调用 `/translate` 命令时,你应该:
|
|
297
|
+
|
|
298
|
+
### Step 1: 验证参数
|
|
299
|
+
|
|
300
|
+
1. 检查 `--to` 参数是否提供(必需)
|
|
301
|
+
2. 验证语言代码是否支持(zh/en/ja)
|
|
302
|
+
3. 确定翻译范围(单章/多章/全书)
|
|
303
|
+
4. 确认翻译风格(默认 literary)
|
|
304
|
+
|
|
305
|
+
### Step 2: 加载术语表
|
|
306
|
+
|
|
307
|
+
1. 读取 `.specify/translation/glossary.json`
|
|
308
|
+
2. 如果不存在,提示用户先运行 `/glossary init`
|
|
309
|
+
3. 解析术语表,构建术语映射
|
|
310
|
+
|
|
311
|
+
### Step 3: 读取源文件
|
|
312
|
+
|
|
313
|
+
1. 根据参数确定要翻译的文件列表
|
|
314
|
+
2. 读取每个文件的内容
|
|
315
|
+
3. 检测源语言(如果未指定 `--from`)
|
|
316
|
+
|
|
317
|
+
### Step 4: 预处理文本
|
|
318
|
+
|
|
319
|
+
1. 扫描文本,标记所有术语出现位置
|
|
320
|
+
2. 将术语替换为占位符(如 `{{CHAR_001}}`)
|
|
321
|
+
3. 记录占位符与术语的映射关系
|
|
322
|
+
|
|
323
|
+
### Step 5: 分段翻译
|
|
324
|
+
|
|
325
|
+
对每个章节:
|
|
326
|
+
|
|
327
|
+
1. **分段:** 按段落分组,每组 ~2000 字
|
|
328
|
+
2. **附加上下文:**
|
|
329
|
+
- 前 200 字(已翻译部分)
|
|
330
|
+
- 后 200 字(原文预览)
|
|
331
|
+
- 术语表
|
|
332
|
+
3. **第一遍翻译(直译):**
|
|
333
|
+
```
|
|
334
|
+
你是文学翻译专家。请将以下中文文本翻译为英文。
|
|
335
|
+
|
|
336
|
+
翻译要求:
|
|
337
|
+
- 准确传达原文信息,不遗漏任何内容
|
|
338
|
+
- 保持原文的叙述风格和节奏
|
|
339
|
+
- 严格使用术语表中的译名
|
|
340
|
+
- 占位符 {{CHAR_001}} 对应 "李明" → "Li Ming"
|
|
341
|
+
- 占位符 {{PLACE_001}} 对应 "青云宗" → "Azure Cloud Sect"
|
|
342
|
+
|
|
343
|
+
上下文(已翻译部分):
|
|
344
|
+
[前 200 字英文]
|
|
345
|
+
|
|
346
|
+
待翻译文本:
|
|
347
|
+
[当前段落组 ~2000 字]
|
|
348
|
+
|
|
349
|
+
后文预览(原文):
|
|
350
|
+
[后 200 字中文]
|
|
351
|
+
|
|
352
|
+
请提供准确的直译版本。
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
4. **第二遍翻译(润色):**
|
|
356
|
+
```
|
|
357
|
+
你是文学翻译专家。请润色以下英文翻译,使其更流畅自然。
|
|
358
|
+
|
|
359
|
+
原文(中文):
|
|
360
|
+
[原文]
|
|
361
|
+
|
|
362
|
+
初译(英文):
|
|
363
|
+
[第一遍翻译结果]
|
|
364
|
+
|
|
365
|
+
润色要求:
|
|
366
|
+
- 保持原文信息完整
|
|
367
|
+
- 让英语母语者读起来自然
|
|
368
|
+
- 调整句式,优化词汇
|
|
369
|
+
- 保持文学性和意境
|
|
370
|
+
- 不改变术语译名
|
|
371
|
+
|
|
372
|
+
请提供润色后的版本。
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
5. **还原术语:** 将占位符替换为标准译名
|
|
376
|
+
|
|
377
|
+
### Step 6: 质量检查
|
|
378
|
+
|
|
379
|
+
1. **术语一致性检查:**
|
|
380
|
+
- 验证所有术语是否正确应用
|
|
381
|
+
- 检测是否有术语被错误翻译
|
|
382
|
+
|
|
383
|
+
2. **段落对应检查:**
|
|
384
|
+
- 原文段落数 vs 译文段落数
|
|
385
|
+
- 如果不一致,标记警告
|
|
386
|
+
|
|
387
|
+
3. **长度合理性检查:**
|
|
388
|
+
- 计算译文长度增减比例
|
|
389
|
+
- 中→英:+20-50% 正常
|
|
390
|
+
- 中→日:-10-20% 正常
|
|
391
|
+
- 超出范围标记警告
|
|
392
|
+
|
|
393
|
+
4. **未定义术语检测:**
|
|
394
|
+
- 扫描译文,查找可能的专有名词
|
|
395
|
+
- 检查是否在术语表中
|
|
396
|
+
- 未定义的提示用户添加
|
|
397
|
+
|
|
398
|
+
### Step 7: 输出结果
|
|
399
|
+
|
|
400
|
+
1. **保存翻译文件:**
|
|
401
|
+
- 创建 `stories/[story-name]/translations/[lang]/content/`
|
|
402
|
+
- 保存每个章节的翻译
|
|
403
|
+
|
|
404
|
+
2. **保存术语快照:**
|
|
405
|
+
- 复制当前使用的 glossary.json
|
|
406
|
+
- 保存为 `glossary-used.json`
|
|
407
|
+
|
|
408
|
+
3. **生成翻译报告:**
|
|
409
|
+
- 统计信息(章节数、字数、术语数)
|
|
410
|
+
- 术语应用情况
|
|
411
|
+
- 警告和注意事项
|
|
412
|
+
- 保存为 `translation-report.md`
|
|
413
|
+
|
|
414
|
+
4. **显示结果:**
|
|
415
|
+
```
|
|
416
|
+
✅ 翻译完成!
|
|
417
|
+
|
|
418
|
+
翻译章节:30 章
|
|
419
|
+
原文字数:256,000 字
|
|
420
|
+
译文词数:312,000 词
|
|
421
|
+
术语应用:85/85(100%)
|
|
422
|
+
|
|
423
|
+
输出目录:stories/my-novel/translations/en/
|
|
424
|
+
|
|
425
|
+
⚠️ 注意事项:
|
|
426
|
+
- 发现 12 个新专有名词,建议添加到术语表
|
|
427
|
+
- 第 5 章有 2 处文化典故需人工确认
|
|
428
|
+
|
|
429
|
+
详细报告:stories/my-novel/translations/en/translation-report.md
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
---
|
|
433
|
+
|
|
434
|
+
## 示例对话
|
|
435
|
+
|
|
436
|
+
### 示例 1:翻译单章
|
|
437
|
+
|
|
438
|
+
```
|
|
439
|
+
用户:/translate --to en chapter-01.md
|
|
440
|
+
|
|
441
|
+
助手:
|
|
442
|
+
正在翻译 chapter-01.md 为英文...
|
|
443
|
+
|
|
444
|
+
✅ 加载术语表:85 个术语
|
|
445
|
+
✅ 预处理文本:标记 23 个术语
|
|
446
|
+
✅ 分段翻译:5 个段落组
|
|
447
|
+
✅ 质量检查:通过
|
|
448
|
+
|
|
449
|
+
翻译完成!
|
|
450
|
+
|
|
451
|
+
原文:3,245 字
|
|
452
|
+
译文:4,012 词(+23.6%)
|
|
453
|
+
术语应用:23/23(100%)
|
|
454
|
+
|
|
455
|
+
输出:stories/my-novel/translations/en/content/chapter-01.md
|
|
456
|
+
|
|
457
|
+
⚠️ 发现 2 个新专有名词:
|
|
458
|
+
- "天灵根"(出现 3 次)
|
|
459
|
+
- "筑基期"(出现 5 次)
|
|
460
|
+
|
|
461
|
+
建议添加到术语表:
|
|
462
|
+
/glossary add "天灵根|Heavenly Spirit Root"
|
|
463
|
+
/glossary add "筑基期|Foundation Establishment"
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
### 示例 2:翻译全书
|
|
467
|
+
|
|
468
|
+
```
|
|
469
|
+
用户:/translate --to en --all
|
|
470
|
+
|
|
471
|
+
助手:
|
|
472
|
+
正在翻译全书为英文...
|
|
473
|
+
|
|
474
|
+
✅ 加载术语表:85 个术语
|
|
475
|
+
✅ 扫描章节:30 章
|
|
476
|
+
|
|
477
|
+
翻译进度:
|
|
478
|
+
[████████████████████] 30/30 章(100%)
|
|
479
|
+
|
|
480
|
+
✅ 翻译完成!
|
|
481
|
+
|
|
482
|
+
翻译章节:30 章
|
|
483
|
+
原文字数:256,000 字
|
|
484
|
+
译文词数:312,000 词(+21.9%)
|
|
485
|
+
术语应用:85/85(100%)
|
|
486
|
+
|
|
487
|
+
输出目录:stories/my-novel/translations/en/
|
|
488
|
+
|
|
489
|
+
⚠️ 注意事项:
|
|
490
|
+
- 发现 12 个新专有名词,建议添加到术语表
|
|
491
|
+
- 第 5 章有 2 处文化典故需人工确认
|
|
492
|
+
- 第 12 章诗词翻译建议人工审阅
|
|
493
|
+
|
|
494
|
+
详细报告:stories/my-novel/translations/en/translation-report.md
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
### 示例 3:术语表未初始化
|
|
498
|
+
|
|
499
|
+
```
|
|
500
|
+
用户:/translate --to en chapter-01.md
|
|
501
|
+
|
|
502
|
+
助手:
|
|
503
|
+
❌ 错误:术语表未初始化
|
|
504
|
+
|
|
505
|
+
请先运行以下命令初始化术语表:
|
|
506
|
+
/glossary init
|
|
507
|
+
|
|
508
|
+
然后添加主要角色名和地名:
|
|
509
|
+
/glossary add "角色:李明|Li Ming"
|
|
510
|
+
/glossary add "地名:青云宗|Azure Cloud Sect"
|
|
511
|
+
|
|
512
|
+
初始化完成后再运行翻译命令。
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
---
|
|
516
|
+
|
|
517
|
+
## 技术实现细节
|
|
518
|
+
|
|
519
|
+
### 术语占位符格式
|
|
520
|
+
|
|
521
|
+
```
|
|
522
|
+
{{CATEGORY_ID}}
|
|
523
|
+
|
|
524
|
+
示例:
|
|
525
|
+
{{CHAR_001}} - 角色 ID 001
|
|
526
|
+
{{PLACE_001}} - 地名 ID 001
|
|
527
|
+
{{SKILL_001}} - 功法 ID 001
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
### 上下文窗口
|
|
531
|
+
|
|
532
|
+
```
|
|
533
|
+
前文上下文:200 字(已翻译版本)
|
|
534
|
+
当前段落:~2000 字
|
|
535
|
+
后文预览:200 字(原文)
|
|
536
|
+
|
|
537
|
+
总计:~2400 字 + 术语表
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
### 翻译提示词模板
|
|
541
|
+
|
|
542
|
+
**第一遍(直译):**
|
|
543
|
+
```
|
|
544
|
+
你是专业的文学翻译专家,精通{source_lang}到{target_lang}的翻译。
|
|
545
|
+
|
|
546
|
+
任务:将以下文本从{source_lang}翻译为{target_lang}。
|
|
547
|
+
|
|
548
|
+
翻译要求:
|
|
549
|
+
1. 准确传达原文信息,不遗漏任何内容
|
|
550
|
+
2. 保持原文的叙述风格和节奏
|
|
551
|
+
3. 严格使用以下术语表中的译名
|
|
552
|
+
4. 保持段落结构不变
|
|
553
|
+
|
|
554
|
+
术语表:
|
|
555
|
+
{glossary_list}
|
|
556
|
+
|
|
557
|
+
上下文(已翻译部分):
|
|
558
|
+
{previous_context}
|
|
559
|
+
|
|
560
|
+
待翻译文本:
|
|
561
|
+
{current_text}
|
|
562
|
+
|
|
563
|
+
后文预览(原文):
|
|
564
|
+
{next_preview}
|
|
565
|
+
|
|
566
|
+
请提供准确的翻译。
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
**第二遍(润色):**
|
|
570
|
+
```
|
|
571
|
+
你是专业的文学翻译专家。请润色以下{target_lang}翻译,使其更流畅自然。
|
|
572
|
+
|
|
573
|
+
原文({source_lang}):
|
|
574
|
+
{original_text}
|
|
575
|
+
|
|
576
|
+
初译({target_lang}):
|
|
577
|
+
{first_translation}
|
|
578
|
+
|
|
579
|
+
润色要求:
|
|
580
|
+
1. 保持原文信息完整,不增删内容
|
|
581
|
+
2. 让{target_lang}母语者读起来自然流畅
|
|
582
|
+
3. 调整句式,优化词汇选择
|
|
583
|
+
4. 保持文学性和意境
|
|
584
|
+
5. 不改变术语译名
|
|
585
|
+
6. 翻译风格:{style}(literary/casual/formal)
|
|
586
|
+
|
|
587
|
+
请提供润色后的版本。
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
---
|
|
591
|
+
|
|
592
|
+
## 性能优化
|
|
593
|
+
|
|
594
|
+
### 批量翻译优化
|
|
595
|
+
|
|
596
|
+
- 并行处理多个章节(最多 3 个同时)
|
|
597
|
+
- 缓存术语表,避免重复读取
|
|
598
|
+
- 复用上下文,减少重复计算
|
|
599
|
+
|
|
600
|
+
### 增量翻译
|
|
601
|
+
|
|
602
|
+
- 使用 `--skip-existing` 跳过已翻译章节
|
|
603
|
+
- 检测文件修改时间,只翻译更新的章节
|
|
604
|
+
- 保存翻译历史,支持回滚
|
|
605
|
+
|
|
606
|
+
---
|
|
607
|
+
|
|
608
|
+
## 错误处理
|
|
609
|
+
|
|
610
|
+
### 常见错误
|
|
611
|
+
|
|
612
|
+
| 错误 | 原因 | 解决方案 |
|
|
613
|
+
|------|------|---------|
|
|
614
|
+
| 术语表未初始化 | glossary.json 不存在 | 运行 /glossary init |
|
|
615
|
+
| 文件不存在 | 指定的章节文件找不到 | 检查文件路径 |
|
|
616
|
+
| 语言不支持 | 使用了不支持的语言代码 | 使用 zh/en/ja |
|
|
617
|
+
| 翻译超时 | 文本过长或网络问题 | 重试或分段翻译 |
|
|
618
|
+
|
|
619
|
+
---
|
|
620
|
+
|
|
621
|
+
## 最佳实践
|
|
622
|
+
|
|
623
|
+
1. **翻译前准备:**
|
|
624
|
+
- 初始化术语表
|
|
625
|
+
- 添加所有主要角色名、地名
|
|
626
|
+
- 用 /translate-preview 预览风格
|
|
627
|
+
|
|
628
|
+
2. **分批翻译:**
|
|
629
|
+
- 先翻译 1-2 章测试效果
|
|
630
|
+
- 确认满意后再翻译全书
|
|
631
|
+
|
|
632
|
+
3. **人工审阅:**
|
|
633
|
+
- 重点章节人工抽查
|
|
634
|
+
- 文化典故、诗词部分重点审阅
|
|
635
|
+
- 对话部分检查角色声音
|
|
636
|
+
|
|
637
|
+
4. **持续优化:**
|
|
638
|
+
- 发现新术语及时添加
|
|
639
|
+
- 根据反馈调整翻译风格
|
|
640
|
+
- 定期更新术语表
|
|
641
|
+
|
|
642
|
+
---
|
|
643
|
+
|
|
644
|
+
## 相关命令
|
|
645
|
+
|
|
646
|
+
- `/glossary` - 管理术语表
|
|
647
|
+
- `/translate-preview` - 预览翻译效果
|
|
648
|
+
- `/export` - 导出翻译版本
|
|
649
|
+
- `/analyze` - 分析翻译质量
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: translate
|
|
2
|
+
version: 1.0.0
|
|
3
|
+
description: 小说翻译插件 - 支持中英日翻译,保持文学性与术语一致性
|
|
4
|
+
type: feature
|
|
5
|
+
author: Novel Writer Community
|
|
6
|
+
|
|
7
|
+
commands:
|
|
8
|
+
- id: translate
|
|
9
|
+
file: commands/translate.md
|
|
10
|
+
description: 翻译章节或全书(中→英/日,英→中)
|
|
11
|
+
- id: glossary
|
|
12
|
+
file: commands/glossary.md
|
|
13
|
+
description: 管理翻译术语表(角色名、地名、专有名词)
|
|
14
|
+
- id: translate-preview
|
|
15
|
+
file: commands/translate-preview.md
|
|
16
|
+
description: 预览翻译效果(试译前 500 字,对比多种风格)
|
|
17
|
+
|
|
18
|
+
experts:
|
|
19
|
+
- id: literary-translator
|
|
20
|
+
file: experts/literary-translator.md
|
|
21
|
+
title: 文学翻译专家
|
|
22
|
+
description: 精通中英日文学翻译,保持文学性与风格一致性
|
|
23
|
+
|
|
24
|
+
dependencies:
|
|
25
|
+
core: ">=1.0.0"
|
|
26
|
+
|
|
27
|
+
installation:
|
|
28
|
+
message: |
|
|
29
|
+
translate 翻译插件安装成功!
|
|
30
|
+
|
|
31
|
+
支持语言对:
|
|
32
|
+
- 中文 → 英文(网文出海首选)
|
|
33
|
+
- 中文 → 日文(轻小说市场)
|
|
34
|
+
- 英文 → 中文(引进翻译)
|
|
35
|
+
|
|
36
|
+
快速开始:
|
|
37
|
+
1. /glossary init 初始化术语表
|
|
38
|
+
2. /glossary add "角色:李明|Li Ming" 添加术语
|
|
39
|
+
3. /translate-preview --to en 预览翻译风格
|
|
40
|
+
4. /translate --to en chapter-01.md 翻译单章
|
|
41
|
+
5. /translate --to en --all 翻译全书
|
|
42
|
+
|
|
43
|
+
建议:先用 /translate-preview 预览翻译风格,确认满意后再翻译全书
|