preen-docs-internationalization
Preen Docs Internationalization
Proactively translate and sync all English documentation to supported languages.
When to Run
Run this skill when English docs have been updated, or during slack time to ensure translation coverage.
Target Languages
Translate to all supported languages:
es- Spanishua- Ukrainianpt- Portuguese
Discovery Phase
Check current translation coverage:
# Count docs per language
echo "English (source): $(ls docs/en/*.md 2>/dev/null | wc -l | tr -d ' ')"
echo "Spanish: $(ls docs/es/*.md 2>/dev/null | wc -l | tr -d ' ')"
echo "Ukrainian: $(ls docs/ua/*.md 2>/dev/null | wc -l | tr -d ' ')"
echo "Portuguese: $(ls docs/pt/*.md 2>/dev/null | wc -l | tr -d ' ')"
# Find missing translations
for lang in es ua pt; do
for file in docs/en/*.md; do
target="docs/$lang/$(basename "$file")"
[ -f "$target" ] || echo "Missing: $target"
done
done
# Find orphaned translations (files in target that don't exist in English)
for lang in es ua pt; do
for file in docs/$lang/*.md; do
[ -e "$file" ] || continue
source="docs/en/$(basename "$file")"
[ -f "$source" ] || echo "Orphaned: $file"
done
done
Translation Workflow
1. List all English docs (source of truth)
ls docs/en/*.md
2. For each target language, translate all docs
For each document in docs/en/:
- Read the English source
- Translate prose content to natural, professional language
- Preserve all markdown formatting, headings, code blocks, and links
- Keep technical terms, code snippets, file paths, and command examples unchanged
- Maintain the same file name in the target folder
3. Translation guidelines
General:
- Use formal language for instructions
- Keep product names and technical terms in English where appropriate
- Translate headings and section titles
- Preserve any frontmatter or metadata exactly as-is
Spanish (es):
- Use formal Spanish (usted form) for instructions
- "Getting Started" -> "Primeros Pasos"
- "Settings" -> "Configuración"
- "Privacy Policy" -> "Política de Privacidad"
- "Terms of Service" -> "Términos de Servicio"
Ukrainian (ua):
- Use formal Ukrainian for instructions
- "Getting Started" -> "Початок Роботи"
- "Settings" -> "Налаштування"
- "Privacy Policy" -> "Політика Конфіденційності"
- "Terms of Service" -> "Умови Використання"
Portuguese (pt):
- Use formal Portuguese (Brazil) for instructions
- "Getting Started" -> "Primeiros Passos"
- "Settings" -> "Configurações"
- "Privacy Policy" -> "Política de Privacidade"
- "Terms of Service" -> "Termos de Serviço"
4. Write translated files
# Write each translated file to docs/<lang>/<filename>.md
5. Cleanup orphaned docs
Delete files in target folders that no longer exist in English:
for lang in es ua pt; do
for file in docs/$lang/*.md; do
[ -e "$file" ] || continue
source_file="docs/en/$(basename "$file")"
if [ ! -f "$source_file" ]; then
echo "Deleting orphaned file: $file"
rm "$file"
fi
done
done
6. Verify coverage
echo "Translation coverage:"
for lang in es ua pt; do
total=$(ls docs/en/*.md | wc -l | tr -d ' ')
translated=$(ls docs/$lang/*.md 2>/dev/null | wc -l | tr -d ' ')
echo " $lang: $translated/$total"
done
Quality Bar
- All English docs have translations in all target languages
- No orphaned translation files
- Markdown formatting preserved
- Code blocks and technical content unchanged
- Formal language used throughout
Commit and Merge
After translating, use the standard preen workflow:
git add docs/
git commit -S -m "docs(i18n): sync translations with English source" >/dev/null
git push >/dev/null
Commit and push the changes, then enter the merge queue to complete the PR workflow.
Token Efficiency
Process one language at a time to manage context:
- Translate all docs to Spanish
- Translate all docs to Ukrainian
- Translate all docs to Portuguese
Suppress git operations:
git commit -S -m "message" >/dev/null
git push >/dev/null
More from a2f0/tearleads
commit-and-push
Commit staged changes and push to the remote using conventional commits with GPG signing. Use when you need to commit and push work, create a PR if missing, and wait for Gemini review before addressing feedback.
33rebase
Rebase the current branch onto the latest main branch, resolving conflicts by preferring upstream changes.
2preen
Stateful preening across all preen skills. Lands focused improvements, opens a PR, and enters merge queue.
1issue-slice-autopilot
Run a long-lived, multi-PR issue completion loop for complex issues by selecting the largest non-overlapping sane slice, implementing it, and then invoking $commit-and-push followed by $enter-merge-queue for each slice until the issue is complete.
1serena-bootstrap
Serena Bootstrap
1preen-knip
Proactively reduce knip findings by removing unused dependencies, exports, and files in coherent, low-risk slices. Use when maintaining code quality or during slack time.
1