Skip to content

Commit 77620b7

Browse files
committed
Clean up translate.py: remove unused code, fix bugs, simplify
- Remove post-process command (runs automatically after translation) - Fix json in comment langs (JSON has no comments) - Extract _extract_comment() helper to eliminate duplication - Cache git repo, create console per-command (not global) - Simplify iter_en_docs(), build_translation_prompt() - Rename regex patterns for consistency (*_RE suffix)
1 parent 320333b commit 77620b7

File tree

2 files changed

+207
-284
lines changed

2 files changed

+207
-284
lines changed

TRANSLATING.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -419,25 +419,6 @@ uv run translate.py sync <lang> --include hello_nextflow
419419
uv run translate.py translate <path> --lang <lang>
420420
```
421421

422-
### Post-Processing Commands
423-
424-
Post-processing fixes common LLM mistakes (links, anchors, code blocks) without re-translating:
425-
426-
```bash
427-
# Fix all translations for a language
428-
uv run translate.py post-process <lang>
429-
430-
# Fix specific files
431-
uv run translate.py post-process <lang> --file docs/pt/docs/index.md
432-
```
433-
434-
The `post-process` command:
435-
436-
- Preserves URLs and link attributes from English source
437-
- Preserves header anchors (permalinks)
438-
- Preserves code syntax while keeping translated comments
439-
- Runs automatically after each translation
440-
441422
### Preview Commands (No API key required)
442423

443424
```bash

0 commit comments

Comments
 (0)