Skip to content

feat(i18n): Add automated translation workflow#41

Merged
01programs merged 1 commit intomainfrom
feat/i18n-auto-translation
Mar 17, 2026
Merged

feat(i18n): Add automated translation workflow#41
01programs merged 1 commit intomainfrom
feat/i18n-auto-translation

Conversation

@01programs
Copy link
Copy Markdown
Collaborator

Summary

  • Adds GitHub Actions workflow to automatically translate documentation to 6 languages on push to main
  • Languages: Spanish, Dutch, French, Chinese, Italian, Japanese
  • Translations are deployed to the prod branch for Mintlify

How it works

  1. Phase 1 (Catch-up): Finds all English .mdx files missing translations and translates them
  2. Phase 2 (Incremental): Re-translates only files changed in the current commit
  3. Updates docs.json with the languages configuration for Mintlify's language switcher
  4. Force-pushes to prod branch → Mintlify auto-deploys

Files added

File Purpose
.github/workflows/translate-and-deploy.yml Main workflow
scripts/translate-docs.ts Translation logic with OpenAI
scripts/update-docs-config.ts Updates docs.json with languages
scripts/glossary.json Technical terms to keep in English
package.json Dependencies (openai, ts-node, typescript)
tsconfig.json TypeScript config

Requirements

Add this GitHub secret before merging:

  • OPENAI_API_KEY — Your OpenAI API key

Test plan

  • Add OPENAI_API_KEY secret to repo
  • Merge PR → workflow triggers automatically
  • Verify translations appear in prod branch
  • Check Mintlify shows language switcher

- Add GitHub Actions workflow for auto-translating docs on push to main
- Translate to 6 languages: Spanish, Dutch, French, Chinese, Italian, Japanese
- Two-phase translation: catch-up (missing) + incremental (changed)
- Deploy translations to prod branch for Mintlify
- Zero-tolerance error policy with retry logic for transient failures
- Validate OpenAI API key before starting translations
@01programs 01programs merged commit e722f36 into main Mar 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant