Automating translations in CI
Every push to main triggers a CI job that detects stale translations and opens a pull request with fresh ones. Here's how to set it up and what we're planning next.
Glossia translates your content with LLMs, keeps everything in-repo, validates output locally, and generates drafts your team can review without the round-trip of external platforms.
We tried Crowdin and Weblate. The indirection of exporting and importing content slowed us down, and we could not run our own validation in the loop. We wanted the same workflow we use for code: change, test, review, ship.
Now translations are generated in place, checked by your tooling, and reviewed by humans only when it matters.
Add L10N.md context files alongside your content. Glossia tracks their dependency so when context or content changes, only the affected translations get regenerated.
Pick one model to coordinate the agentic session and another to translate accurately. Use any OpenAI-compatible endpoint, Vertex AI, or your own hosted model.
Agents have access to built-in syntax checks and custom commands you define. They run validation after each translation and retry on errors, so output is correct before you review.
Agents use tools to automate verification after every translation.
Parse output to ensure it is valid before it is saved.
Guarantee critical tokens survive translation.
Bring your own validators with check_cmd and check_cmds.
Tool failures trigger retries until the output is valid.
Define translation sources, targets, and output patterns in TOML frontmatter.
+++
[[translate]]
source = "site/src/_data/home.json"
targets = ["es", "de", "ko", "ja", "zh-Hans", "zh-Hant"]
output = "site/src/_data/i18n/{lang}/{basename}.{ext}"
+++
# Context for the translating agent...
Translate, validate, and track what needs updating.
Use --force to re-translate everything.
Translations update when source content or ancestor L10N.md context changes.
JSON, YAML, and PO syntax checks plus optional external lint commands.
Separate coordinator and translator models with retry on validation errors.
Generate drafts fast, review when needed, and keep everything in Git.
Translations don't have to be perfect on day one. Like code, they improve through iteration.
First drafts from LLMs are structurally correct but may miss nuance, tone, or domain-specific phrasing. That is by design. Each review cycle -- a pull request comment, an updated context file, a glossary tweak -- feeds back into the next translation run. Quality converges over successive passes, not in a single shot.
LLM generates a structurally valid first pass based on your context files.
Your team flags issues through pull requests, just like code review.
Updated context and glossary corrections feed into the next run, closing the gap.
Each cycle narrows the distance to production quality. The system learns your product's voice.
This follows the same principle behind Kaizen in manufacturing, post-editing in professional translation (PEMT), and successive approximation in engineering: start with a good-enough baseline and systematically improve it with human judgment in the loop.
Traditional tools rely on translation memories, static databases of past translations that are matched by similarity. Glossia replaces that with LLM context as memory: context files that agents read, learn from, and that your team can iterate over time. Instead of looking up a fuzzy match, agents understand your product's tone, terminology, and conventions. And just like developers validate code changes by compiling or linting, agents validate their translations using the same tools in your environment. Run it in CI or locally, and agents will use your linters, compilers, and validators to correct their own output.
Yes. Glossia is a CLI tool, not a hosted service. You point it at any OpenAI-compatible endpoint, Vertex AI, or your own model. You control the cost, the data, and the quality.
Today, reviewers check translated content through pull requests and diffs, and can update context files to force re-translation when needed. In the future, we expect them to become part of the loop by running Glossia locally, the same way developers already work with coding agents like Codex.
Every push to main triggers a CI job that detects stale translations and opens a pull request with fresh ones. Here's how to set it up and what we're planning next.
Traditional localization tools add overhead, break CI, and lock you into vendor ecosystems. We replaced all of that with coding agents that translate where development happens.