Conversation
Reorganize docs from suffix-based (.pt.md) to folder-based structure:
- docs/en/ contains all English source content
- docs/{lang}/ contains translations with inheritance from English
- Language configs use INHERIT: ../en/mkdocs.yml for DRY setup
Add translation tooling:
- _scripts/translate.py: Claude-powered translation CLI
- _scripts/docs.py: Parallel multi-language build CLI
- _scripts/translation_fixer.py: Post-translation cleanup
- _scripts/mkdocs_hooks.py: Warning banner for untranslated content
Add CI workflows:
- translate.yml: Manual workflow to trigger translations
- Updated docs-dev.yml and docs-release.yml for multi-language builds
Add language picker JavaScript for mike versioning compatibility.
Add TRANSLATING.md contributor guide.
… comments - Update MODEL to use 'claude-sonnet-4-5' alias for auto-updates - Add check_api_key() with helpful error message and setup instructions - Add multi-line /* */ comment support for Groovy/Nextflow/Java - Replace hardcoded SUPPORTED_LANGS with get_supported_langs() reading from language_names.yml as single source of truth
Update references to mkdocs.yml and docs/ paths in: - CONTRIBUTING.md - CLAUDE.md - preview_release.py - .claude/ skills and commands
- Remove requirements.txt and _scripts/pyproject.toml - Add MkDocs dependencies to docs.py inline script - Update netlify.toml to use uv run - Update CONTRIBUTING.md with uv instructions
- Fix Netlify uv PATH (use export instead of source env) - Update mkdocs.Dockerfile to install plugins directly (no requirements.txt) - Remove requirements.txt trigger from docker-mkdocs workflow - Add -w /docs/docs/en to all Docker commands in docs - Update preview commands to use uv
- Remove pillow, cairosvg, mkdocs-static-i18n from docs.py (not used) - Remove CARDS=false references from docs (social cards plugin not configured) - Fix image paths in LICENSE.md and README.md for new docs structure - Add better error capture for parallel builds - Update pip install instruction to use uv in CONTRIBUTING.md
- Add resolve_en_path() to handle paths relative to CWD, repo root, or EN_DOCS_PATH - Add --include/-i option to add_missing for filtering by pattern (e.g., 'hello_nextflow')
…ules - Add note that terms like channel/process/workflow may be translated in prose - Clarify that language-specific llm-prompt.md takes precedence for prose - Code blocks always use English for executable code
✅ Deploy Preview for nextflow-training ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Nextflow linting complete! ❌ 1 files had 1 errors 💡 Tip: Click filename locations to go directly to that code. View all 1 issues
View formatting changes
|
… files - Added Translation Context Rules section explaining code vs prose distinction - Code blocks: keep ALL Nextflow syntax in English (must be executable) - Prose text: follow language-specific glossary for translations - Added language-specific examples for each
TRANSLATING.md: - Added clear workflow diagrams for automatic updates - Documented how to review and approve translation PRs - Added guide for fixing existing translations - Added guide for adding missing courses - Added guide for adding new languages - Improved script reference documentation .github/workflows/translate-auto.yml: - New workflow that triggers on push to master when docs/en/docs/*.md changes - Detects which languages have outdated translations - Updates translations in parallel (max 2 to limit API load) - Creates PRs automatically for review
TRANSLATING.md: - Explicitly discourage manual translations (will be overwritten) - Add detailed review guidelines with Mermaid flow diagram - Clarify that prompt updates are the ONLY way to fix translations - Remove all manual translation instructions - Add clear workflow for reporting issues CONTRIBUTING.md: - Expand translation section with rationale for AI-only approach - Add instructions for readers finding errors - Add instructions for contributors improving prompts _scripts/general-llm-prompt.md: - Massively expand from ~80 to ~300 lines - Add detailed code block examples for Groovy, Bash, config files - Add console output rules (never translate) - Add comprehensive admonition documentation - Add heading anchor preservation rules - Add link translation rules with examples - Add tab block documentation - Add frontmatter rules - Add special elements (kbd, icons, placeholders, snippets) - Add formatting preservation guidelines - Add common mistakes to avoid section - Add quality checklist
- Use GitHub [!WARNING] and [!CAUTION] admonition syntax - Move CLI reference to bottom (requires API key most don't have) - Clarify that prompt updates trigger regeneration in same PR - Promote GitHub Actions workflow as primary method - Add [!NOTE] for CLI section explaining API key requirement - Update CONTRIBUTING.md to match (warning admonition, GH Actions first)
- Update language list to include pl, tr - Add note that translations are AI-generated - Add TRANSLATING.md to resources section
.github/workflows/translate-auto.yml
Outdated
| id: check | ||
| working-directory: _scripts | ||
| run: | | ||
| # Check each language for outdated translations |
vdauwera
left a comment
There was a problem hiding this comment.
Based on the feedback so far I think this is good enough for an initial release since this already massively improves the situation compared to the current status quo. We'll fix any issues as they are reported.
|
Has the preview recently been recalculated? The Polish translation still has the same issues it had before I edited the prompt (and sounds generally awkward) |
I made some changes to the French translation (and that would have updated the preview) but it shouldn't have affected any other translations |
|
Okay, how do I re-run the Polish version? I want to check if the prompt changes have any effect |
I'm not sure tbh, I made the changes directly with Claude, which I now realize is not the recommended way to do it. Reading the https://github.com/nextflow-io/training/blob/lang/TRANSLATING.md instructions now... |
|
The instruction says I should trigger the translation action, but apparently it's not available as it's added in this PR |
Yeah that's what I'm trying to figure out too. Asking the team internally... stay tuned |
|
For now, I've just been opening claude manually and saying "apply the prompt". We'll figure out the automation side of things once we're on @itrujnara I manually applied your prompt changes in 83528f9 - what was wrong with that? Incomplete, or completely missed parts? |
|
ohh wait hang on, maybe I didn't tell it to actually apply the changes. Will do so now. |
|
No, wait - I did try to apply the prompt changes! They're here: 281f89c#diff-0ff56a98928a1db949c1d7847840d9c3265d7d3403f1e48456deac89cfa3d9a9 But apparently it did a fairly poor job of it, as I just ran it again and it made a tonne of changes. It's possible that some stuff happened out of order, or that I just wasn't insistent enough that it kept going until it was done. |
- Switch to informal tone (Ty/Wy instead of Pan/Pani) - Capitalize second-person pronouns (Twój, Swój, Ciebie, Ci) - Use apostrophe declension for English terms (workflow'u, pipeline'u) - Translate core terms: channel→kanał, process→proces - Replace 'przepływ pracy' with 'workflow' throughout - Replace 'potok' with 'pipeline' throughout Updates translations to match guidelines from commit 83528f9.
|
@itrujnara - many more changes done in a719e6f - hopefully that looks better? |
- Add 'fix-translations' CLI command that uses LLM to review and fix existing translations to comply with updated prompt guidelines - Support multi-pass verification loop (default 8 iterations) until no more changes are needed - Add --files option for targeted fixes on specific files - Add --verify flag to update-outdated and add-missing commands - Update translate-auto.yml to detect prompt file changes and automatically trigger fix-translations when prompts are updated - Integrate translation_fixer.py post-processing into fix command This ensures translations stay consistent when prompt guidelines change, without requiring full re-translation of all content.
- Add fix-translations CLI reference to TRANSLATING.md - Document --verify flag for update-outdated command - Update workflow diagram to show prompt change detection - Add note about automatic fix-translations in CONTRIBUTING.md
itrujnara
left a comment
There was a problem hiding this comment.
It's definitely going in the right direction, but it's still not ideal. I've left more suggestions, but I have only looked at a handful of files. I might have more ideas once I have the time to give the tutorials a proper look.
Co-authored-by: Igor Trujnara <53370556+itrujnara@users.noreply.github.com>
- Fix terminology: równoleglić→paralelizować, domena→dziedzina, podróż→droga - Reduce word repetition within sentences and consecutive sentences - Split sentences with more than 3 verbs for clarity - Applied across all Polish training modules (51 files)
|
Thanks @itrujnara - prompt updates included, and rework of the translation accordingly in aaaf302 |
|
Thanks for the help all! This PR is a monster and I was worried about it lagging behind other changes, so we have merged. Keep the suggestions coming though! Either as issues, or better still as PRs to the language prompt files. Then we can test out the new automation 🙏🏻 😅 |
Summary
Adds infrastructure to support AI-generated translations of Nextflow training materials.
How It Works
docs/en/docs/)docs/<lang>/llm-prompt.md)Supported Languages
en(source),de,es,fr,hi,it,ko,pl,pt,trDocumentation
See TRANSLATING.md for full details on: