typebot.io icon indicating copy to clipboard operation
typebot.io copied to clipboard

Automate i18n Sync with Tolgee workflow

Open baptisteArno opened this issue 5 months ago • 0 comments

🎯 Goal

Automate the synchronization of English source strings and translated locales between the Typebot codebase and the Tolgee platform to reduce manual work and ensure up-to-date translations.


🧱 Context

  • Source strings location: JSON files located in the codebase (e.g., locales/en.json), extracted from TypeScript source code under ./apps/builder/src/**/*.ts?(x)
  • Translation platform: Tolgee (project name: Builder)
  • Secrets involved: TOLGEE_API_KEY stored in GitHub Actions secrets
  • CI platform: GitHub Actions

🔄 Sync Workflow

1. Push to Main → Upload English Keys

  • Trigger: Each push or merge to the main branch
  • Operation: Upload English source strings to Tolgee
  • Characteristics:
    • Should run in CI
    • Non-blocking (best-effort): failures should not prevent other CI steps from completing
    • Visible in GitHub Actions logs for traceability

2. Weekly Pull of Translations

  • Trigger: Scheduled GitHub Actions job (weekly)
  • Operation: Pull latest translations from Tolgee
  • Output:
    • Automatically formats and prepares updated locale files
    • Creates a new branch with the updates
    • Opens a pull request to main
  • Commit message/PR title:
    Sync latest translations from Tolgee

✅ Requirements Summary

  • Automate source string sync on push to main
  • Automate translation pull daily via scheduled CI
  • Create PRs from pulls rather than pushing directly to main
  • Use .env to manage environment variables when executing Tolgee CLI
  • CI job should be silent on failure but visible to maintainers

baptisteArno avatar May 12 '25 08:05 baptisteArno