references/workflow-mechanics.md
837 B查看排版效果| 1 | # Workflow Mechanics |
| 2 | |
| 3 | Details for source materialization, output directory creation, and conflict resolution. |
| 4 | |
| 5 | ## Materialize Source |
| 6 | |
| 7 | | Input Type | Action | |
| 8 | |------------|--------| |
| 9 | | File | Use as-is (no copy needed) | |
| 10 | | Inline text | Save to `translate/{slug}.md` | |
| 11 | | URL | Fetch content, save to `translate/{slug}.md` | |
| 12 | |
| 13 | `{slug}`: 2-4 word kebab-case slug derived from content topic. |
| 14 | |
| 15 | ## Create Output Directory |
| 16 | |
| 17 | Create a subdirectory next to the source file: `{source-dir}/{source-basename}-{target-lang}/` |
| 18 | |
| 19 | Examples: |
| 20 | - `posts/article.md` → `posts/article-zh/` |
| 21 | - `translate/ai-future.md` → `translate/ai-future-zh/` |
| 22 | |
| 23 | ## Conflict Resolution |
| 24 | |
| 25 | If the output directory already exists, rename the existing one to `{name}.backup-YYYYMMDD-HHMMSS/` before creating the new one. Never overwrite existing results. |
文件内容是平台检查时读出的文本,只供查看。平台不会运行包里的任何脚本或程序。

