How it works

The translation pipeline

TolkBot translates each key with a language model, checks the result, and sends what fails to a stronger model.


Translation pipeline

When TolkBot translates a key, it follows this pipeline:

  1. Parse — read the source file and extract keys, values, and structure
  2. Build context — assemble the prompt with your tone, the glossary terms the string uses, your learnings and any context note on the key
  3. Translate — the base model translates the key
  4. Check — compare placeholders and plurals with the source, check glossary terms and length, and ask the verifier whether the result is in the right language and says what the source says
  5. Escalate — translate again with the stronger model any key a check flagged, with the finding in front of it
  6. Review — read each finished file as a whole and fix or report inconsistencies
  7. Commit — write the results to the language's pull request, or into your files when the CLI ran the job

AI models

TolkBot picks the models; you can't choose one.

StepModel
TranslationGemini 3.5 Flash-Lite
EscalationClaude Sonnet 5.5
Review passGemini 3.5 Flash-Lite
VerifierJev, an evaluation model from TypeSafe, with Gemini 3.1 Flash-Lite as a second opinion

Most keys never leave the base model. Credits follow what each call cost, so a key that needed the stronger model costs more than one the base model handled. See Billing and credits.


Prompt

Each translation request tells the model:

  • Tone, from the project's tone preset: formal (default), casual, marketing, technical or custom, with the preset's instructions or your own. See Project settings.
  • Glossary entries that appear in the string, with their approved translations and do-not-translate markers
  • Learnings, corrections from past feedback in this project
  • Key context, a note on the key that you added or accepted from a suggestion

The prompt instructs the model to:

  • Translate accurately without inventing content
  • Prefer concise phrasing over literal translation
  • Keep every placeholder exactly as it appears

Checks, escalation and review

Every translation is checked before it is written: placeholders and plurals against the source, glossary terms, length, and an independent check of its language and meaning. A key that fails goes to the stronger model with the finding in front of it, and the review pass reads each finished file as a whole. See Checks and the review pass and Placeholders and plurals.


Caching

Before step 3, TolkBot looks the request up in translation memory. An identical request, with the same source text, language, model, tone, glossary terms and learnings, is served from memory and costs nothing. A translation from memory goes through the same checks as a new one.

Previous
Billing and credits