# TolkBot docs --- > TolkBot translates the i18n files in a GitHub repository: a GitHub App that opens translation pull requests, a dashboard, and a CLI for people and coding agents. --- # Getting started Source: https://docs.tolkbot.ai/ TolkBot translates the keys in your locale files and opens a pull request for each target language. Set it up with the GitHub App, or translate from your terminal with the CLI. - [Quick start](https://docs.tolkbot.ai/docs/quick-start): Get your first translation pull request in minutes with the GitHub App. - [CLI installation](https://docs.tolkbot.ai/docs/cli-installation): Install the CLI and translate files directly from your terminal. - [The translation pipeline](https://docs.tolkbot.ai/docs/translation-pipeline): What happens to a key between your push and the pull request, and which checks it passes. - [Supported frameworks](https://docs.tolkbot.ai/docs/supported-frameworks): next-intl, react-i18next, vue-i18n, Expo with i18n-js, and more. --- ## Two ways to translate ### GitHub App (automated) Install the TolkBot GitHub App on your repository. When a push changes your base language's files, TolkBot translates the new and changed keys and opens a pull request for each target language. - Translations are committed to a persistent `tolkbot/{project}-i18n-{lang}` branch - Each pull request stays open and is updated as you push more changes - Correct a translation by mentioning `@tolkbot` in a comment on the pull request [Connect GitHub](https://docs.tolkbot.ai/docs/connect-github) ### CLI (local) Use the `tolkbot` CLI to translate files directly from your terminal. You decide when it runs and which files it writes. ```shell npx tolkbot translate --dst fr ``` One command translates what is missing or changed and writes the results into your locale files. `--dry-run` shows what it would do first, and `tolkbot jobs` lists and inspects the jobs it ran. [Install the CLI](https://docs.tolkbot.ai/docs/cli-installation) --- ## How the docs are organized - **Start**: set up a project and get your first pull request. - **Pull requests**: what TolkBot puts in its pull requests, how to correct a translation from a comment, and what happens when you remove or rename a key. - **Dashboard**: one page per screen, from the [Overview](https://docs.tolkbot.ai/docs/overview) where work waits for you to [Translations](https://docs.tolkbot.ai/docs/translations), where you edit, lock and retranslate. - **How it works**: the [pipeline](https://docs.tolkbot.ai/docs/translation-pipeline), the [checks and the review pass](https://docs.tolkbot.ai/docs/checks-and-review-pass), the [health scan](https://docs.tolkbot.ai/docs/health-scan) of what is already in your repository, [translation memory](https://docs.tolkbot.ai/docs/translation-memory), and [placeholders and plurals](https://docs.tolkbot.ai/docs/placeholders-and-plurals). - **CLI and agents**: translating and validating from a terminal or in CI. - **Reference**: [formats](https://docs.tolkbot.ai/docs/supported-formats), [frameworks](https://docs.tolkbot.ai/docs/supported-frameworks), [languages](https://docs.tolkbot.ai/docs/supported-languages), and [notifications and emails](https://docs.tolkbot.ai/docs/notifications-and-emails). --- ## Next steps If you want automated translations on every push, start with the [Quick start](https://docs.tolkbot.ai/docs/quick-start) guide. If you prefer translating locally, jump to the [CLI installation](https://docs.tolkbot.ai/docs/cli-installation) guide. --- # Quick start Source: https://docs.tolkbot.ai/docs/quick-start Get your first translation pull request using the TolkBot GitHub App. This guide walks you through the fastest path from zero to a translation PR on your repository. --- ## Prerequisites - A GitHub repository with a source locale file in JSON, TypeScript or JavaScript (e.g., `messages/en.json` or `locales/en.json`) - A TolkBot account at [tolkbot.ai](https://tolkbot.ai) with a subscription or a trial --- ## Step 1: Connect GitHub 1. Sign in to the TolkBot dashboard at [tolkbot.ai](https://tolkbot.ai) 2. Open the organization's **Settings → Connections** and click **Connect GitHub**. The **New Project** page offers the same button until GitHub is connected. 3. Install the TolkBot app on your GitHub account or organization 4. Select which repositories TolkBot should have access to > **Permissions** > > TolkBot asks for read and write access to repository contents, pull requests and issues, which is where GitHub keeps a pull request's conversation comments and labels. It reads your locale files, the list of file paths, and while setting up a project the files that say which i18n library you use. [Trust and data](https://docs.tolkbot.ai/docs/trust) lists every permission and what it is for. --- ## Step 2: Create a project 1. In the dashboard, open **Projects** and click **New Project** 2. Click **Import** next to the repository you just connected 3. Give the project a name. In a monorepo, pick the **root directory** of the app whose strings you want translated. 4. TolkBot reads the repository and finds your framework, your base language and the pattern your locale files follow (e.g., `messages/{locale}.json`). If it can't, the project asks you for the source pattern before it goes on. --- ## Step 3: Set up your languages A new project translates nothing until it has a target language that is set up. You land on the project's **Translations** page: - If your repository already has locale files for other languages, the **Add a language** dialog opens with them. Choose whether to keep the translations already there, or keep them and mark them for review. - To add a language the repository doesn't have yet, click **Add language** and pick it. See [Adding a language](https://docs.tolkbot.ai/docs/adding-a-language) for what each choice does. Automatic pull requests are on for a new project: once a language is set up, a push to your default branch opens a pull request for it, and the translations use credits. To turn this off, use the **Open pull requests automatically** switch in the setup dialog, or **Auto-create PRs** under **Settings → Workflow**. See [Automated pull requests](https://docs.tolkbot.ai/docs/automated-pull-requests). --- ## Step 4: Push a change Add a key to your source locale file and push to your default branch: ```json { "welcome": "Welcome to our application", "dashboard": { "title": "Dashboard", "greeting": "Hello, {name}" } } ``` ```shell git add messages/en.json git commit -m "Add welcome message" git push origin main ``` A project translates only the keys a push adds or changes, unless you change its [translation scope](https://docs.tolkbot.ai/docs/workflow-settings#translation-scope). To translate the keys your target files were already missing, use **Translate missing** on the project's [Translations](https://docs.tolkbot.ai/docs/translations#translate-missing) page. --- ## Step 5: Review the PR Within a minute or two, for each language you set up, TolkBot will: 1. Detect the new or changed keys in your source file 2. Translate them and check the result 3. Open a pull request with the translations on a `tolkbot/{project}-i18n-{lang}` branch Open the PR on GitHub to review the translations. If you spot something that needs correcting, mention `@tolkbot` in a comment with your feedback. --- ## What's next - [Configure workflow settings](https://docs.tolkbot.ai/docs/workflow-settings) like draft PRs, labels, and branch patterns - [Set up a glossary](https://docs.tolkbot.ai/docs/context#glossary) to enforce consistent terminology - [Give feedback in a pull request](https://docs.tolkbot.ai/docs/pull-request-feedback) to correct translations directly from GitHub - [Install the CLI](https://docs.tolkbot.ai/docs/cli-installation) for local translation workflows --- # Connect GitHub Source: https://docs.tolkbot.ai/docs/connect-github Install the TolkBot GitHub App to get automated translation PRs on your repositories. --- ## Install the GitHub App 1. Sign in to the TolkBot dashboard at [tolkbot.ai](https://tolkbot.ai) 2. Open the organization's **Settings → Connections** 3. Click **Connect GitHub**. The **New Project** page offers the same button until GitHub is connected. 4. Install the TolkBot app on your GitHub account or organization 5. Select which repositories TolkBot should have access to > **Permissions** > > TolkBot asks for read and write access to repository contents, pull requests and issues, which is where GitHub keeps a pull request's conversation comments and labels. It reads your locale files, the list of file paths, and while setting up a project the files that say which i18n library you use. [Trust and data](https://docs.tolkbot.ai/docs/trust) lists every permission and what it is for. --- ## Connect a repository After installing the GitHub App: 1. In the TolkBot dashboard, open **Projects** and click **New Project** 2. Click **Import** next to the repository 3. If your repository is a monorepo, pick the **root directory** (e.g., `apps/web`) to scope TolkBot to that app --- ## Configure translation patterns TolkBot auto-detects your framework and locale file structure. After creating a project, review the detected settings under **Settings → Languages**: - **Base language** — the source locale you author content in (usually `en`) - **Target languages** — languages to translate to - **Source pattern** — file path pattern (e.g., `messages/{locale}.json`) - **Output pattern** — where translated files are written (usually the same as source) ### Auto-detection TolkBot scans common directories for locale files: - `locales/`, `locale/`, `messages/`, `i18n/`, `translations/`, `lang/`, `languages/`, wherever they sit in the repository (`src/locales/`, `public/locales/` and so on) Supported file formats: `.json`, `.ts`, `.js` --- ## Monorepo support For monorepos, pick a **root directory** when you create the project to scope TolkBot to that directory. Only file changes within it trigger translation PRs. Create one project per app; each tracks its own files. For example, if your translations live in `apps/web/messages/`, set the root directory to `apps/web`. --- ## Several organizations, one GitHub account GitHub lets an account install the app once. To use the same installation in another TolkBot organization, open **Settings → Connections** in that organization and choose **Connect GitHub** again. A part of a repository can be managed by one organization at a time. See [Organization and members](https://docs.tolkbot.ai/docs/organization-and-members#several-organizations-on-one-git-hub-account). --- ## Disconnecting **Settings → Connections** has no disconnect button. To disconnect, uninstall the TolkBot app on GitHub, or remove a repository from the app's access there. Projects on a repository TolkBot can no longer reach are archived and come back when the access does; see [archived projects](https://docs.tolkbot.ai/docs/organization-and-members#archived-projects). --- ## What's next - [Learn how automated PRs work](https://docs.tolkbot.ai/docs/automated-pull-requests) - [Configure workflow settings](https://docs.tolkbot.ai/docs/workflow-settings) --- # Automated pull requests Source: https://docs.tolkbot.ai/docs/automated-pull-requests TolkBot creates and maintains translation pull requests automatically when you push changes to your base branch. --- ## On by default A new project opens pull requests on its own. Once you set up a language in the dashboard, every push to your default branch updates that language's pull request, with no click in between. Languages you haven't set up get no pull request. Translations in a pull request use credits, the same as translations you start from the dashboard. To turn it off, switch off **Open pull requests automatically** in the dialog where you set up languages, or **Auto-create PRs** under **Settings → Workflow**. With it off, you start translations from the **Translations** page and nothing happens on a push. Projects created before automatic pull requests became the default keep the setting they had: off, unless someone switched it on. --- ## How it works When you push a commit that modifies your source locale files, TolkBot: 1. **Detects work** — compares source and target files to find keys the target lacks, and checks every existing translation against the source text it was written for to find keys whose source changed 2. **Translates** — sends new keys and eligible changed keys through the AI translation pipeline 3. **Commits** — writes translations to the PR branch with the commit message `chore(i18n): update {locale} translations`, e.g. `chore(i18n): update de translations` 4. **Opens or updates a PR** — creates a new PR or updates an existing one --- ## Changed source text Editing the text of an existing key — changing `cta` from "Start trial" to "Start free trial", say — updates its translations in the living PR, even though every target file already contains `cta`. TolkBot knows which source text each translation was written for, so it does not need to compare languages to notice the change. Only translations TolkBot wrote itself, and nobody touched since, are replaced automatically. A changed key is left alone, and shown as needing attention in the dashboard, when: - a person wrote or edited the translation in the dashboard - the translation was edited directly in the repository after TolkBot generated it - the key is locked - a draft for the key is in progress - TolkBot has no record of who wrote the translation (for example, it existed before the project was connected) For these keys the dashboard shows the old and new source text side by side. You can approve the existing translation as still valid, edit it, or re-translate it from there. The PR description lists how many translations were updated for changed source text and how many were kept for review. A cosmetic edit to the source, such as a fixed typo, changed whitespace or straight quotes made curly, keeps its translations. TolkBot decides this per key and treats anything it is unsure of as a real change. Pushing the same commit again, or a commit that changes nothing in the locale files, creates no new work. A source edit that lands while TolkBot is writing is withheld from that write and picked up by the next run. --- ## Removed and renamed keys A push that removes a key from the base language file removes its translations, and a push that renames one moves the translation to the new name. A translation a person owns is kept, and a push that removes a large part of a file removes nothing. See [Removed and renamed keys](https://docs.tolkbot.ai/docs/removed-and-renamed-keys). --- ## Living PRs TolkBot uses a **living PR** pattern — one persistent PR per target language. Instead of creating a new PR for every push, TolkBot updates the same PR branch with new translations as you add content. This means: - The PR accumulates translations over time - You can review all pending translations in one place - Merging the PR applies all translations at once - After merging, TolkBot creates a new PR for future translations TolkBot never merges your base branch into its PR branch and never force-pushes it. It only commits to the branch when it has translations to write. Its commits touch only the target language's files, so the PR usually merges cleanly. If someone edits the same target file on the base branch while the PR is open, resolve the conflict on GitHub as you would for any pull request. --- ## Branch naming By default, TolkBot creates branches with the pattern: ```text tolkbot/{project}-i18n-{lang} ``` `{project}` is the project's slug. For a project called `web`: `tolkbot/web-i18n-de`, `tolkbot/web-i18n-fr`, `tolkbot/web-i18n-es`. You can customize this pattern in [workflow settings](https://docs.tolkbot.ai/docs/workflow-settings). --- ## PR details ### Title ```text chore(i18n): Add German translations (15 keys) ``` The count covers every run on the pull request. A pull request that only removed keys or moved translations to renamed keys says that instead, and one made of edits from the dashboard is titled `chore(i18n): German translation edits (3 keys)`. ### Description The description is rewritten on every run from what the runs on the pull request did: - **Summary**: keys added, translations updated for changed source text, keys removed, translations carried to renamed keys, and translations kept for review because a person owns them - **Checks**: how many keys were translated or failed, what was written to the branch and what was withheld (with the reason, such as a locked key or a value that would have been empty), and what the review pass found - **File checks**, a line in the Checks section when the written files need a look: a plural missing a form the language needs, a value not in the language's script, a sentence left as the source, a repeated source string translated two ways, or a file formatted differently from the base file. TolkBot writes these values and reports them; it doesn't hold them back. The Checks section ends with what needs attention, or says that nothing does. ### Labels TolkBot adds no labels by default. Set **PR labels** in [workflow settings](https://docs.tolkbot.ai/docs/workflow-settings) to have them added when a PR is opened. ### Draft PRs You can configure TolkBot to create PRs in draft state, giving you time to review before they show up as ready for merge. Enable this with the `createAsDraft` setting. --- ## Trigger conditions A push triggers translation only when all of these conditions are met: 1. The push is to a monitored branch (configured via `baseBranches`) 2. The push modifies files within the project's subpath (for monorepos) 3. `autoCreatePR` is enabled in the project's workflow settings (on for a new project) 4. The pusher is not in the `ignoreUsers` list A push that meets them updates one pull request per language that is set up. --- ## What's next - [Give feedback on translations in PRs](https://docs.tolkbot.ai/docs/pull-request-feedback) - [Configure workflow settings](https://docs.tolkbot.ai/docs/workflow-settings) --- # Feedback in a pull request Source: https://docs.tolkbot.ai/docs/pull-request-feedback Mention `@tolkbot` in a pull request comment to correct translations, trigger retranslation, and teach the system for future accuracy. --- ## How it works When you mention `@tolkbot` in a PR comment, TolkBot: 1. Acknowledges your feedback with a reaction 2. Parses your comment using AI to understand the correction 3. Takes action based on the type of feedback 4. Replies with a confirmation Feedback works in both **conversation comments** (on the PR's main thread) and **review comments** (inline on specific lines in the diff). Feedback works only on a translation pull request TolkBot opened, while it is open. On any other pull request TolkBot doesn't respond. On a TolkBot pull request that has been merged or closed, nothing is retranslated. --- ## Providing corrections ### Full correction (recommended) Provide the source text and your suggested translation. This creates a **learning** that TolkBot remembers for future translations. ``` @tolkbot "Submit" should be "Envoyer" not "Soumettre" ``` TolkBot will: - Create a learning record for this correction - Retranslate the affected key using the feedback - Commit the updated translation to the PR ### Flagging an incorrect translation Name the translation that is wrong without providing an alternative. TolkBot will retranslate the key. ``` @tolkbot "Sasonbaserte" is not Norwegian ``` TolkBot will: - Retranslate the key (the AI decides the new translation) - Commit the result to the PR ### Asking for a retranslation Say in plain words what is wrong, without naming a word or giving a replacement. Leave this one as a review comment on the lines you mean, so TolkBot knows which strings to redo. ``` @tolkbot this sounds robotic, can you make it more natural? ``` TolkBot retranslates the commented string with your note in front of the model and commits the result. "These aren't translated" retranslates every string in the file that was left as the source. In a conversation comment, which points at no line, TolkBot asks you to comment on the lines instead. --- ## Feedback in review comments When you leave feedback as an inline review comment on a specific line in the diff, TolkBot has additional context from the diff hunk. This helps it identify the exact key to retranslate, even without you specifying the source text. --- ## Learnings When you provide a full correction (with source text and suggested translation), TolkBot creates a **learning** record. Learnings are: - Used in later translations into the same language - Kept with the project the pull request belongs to, on its **Context → Learnings** page - Listed on the organization's **Context → Learnings** tab, alongside the learnings of other projects A learning from one project is not used when translating another. Read more about [learnings](https://docs.tolkbot.ai/docs/context#learnings). --- ## Help message If TolkBot can't understand your feedback, it replies with a help message showing the expected feedback format. --- ## Examples ### Conversation comment ``` @tolkbot "Dashboard" should be translated as "Tableau de bord" in French, not "Panneau de controle" ``` ### Review comment (inline on diff) ``` @tolkbot this should be "Einstellungen" not "Optionen" ``` ### Retranslation request (inline on diff) ``` @tolkbot redo this one, it's too formal ``` --- # Removed and renamed keys Source: https://docs.tolkbot.ai/docs/removed-and-renamed-keys When a push removes a key from your base language file, TolkBot removes its translations in each language's pull request. When a push renames a key, the translation moves to the new name. --- ## A key removed from the source TolkBot compares the base language file before and after each push to your default branch. Every key the file lost has its translation removed in that language's pull request, and the pull request counts it under **Keys removed**. A plural goes as a group. With i18next suffix plurals, removing `items_other` from the English file also removes `items_few` and `items_many` from the Polish file, since those forms were translated from it. See [Placeholders and plurals](https://docs.tolkbot.ai/docs/placeholders-and-plurals). Only a push triggers this. A translation whose key was already missing from the base file before you connected the project, or that never was in the base file while TolkBot watched it, is in no push, so TolkBot leaves it alone. The [Translations](https://docs.tolkbot.ai/docs/translations) screen shows those keys, and you can remove them there with **Remove**. ### Translations a person owns are kept A translation a person wrote can be meant for that language only, so TolkBot doesn't remove it. It is kept when someone: - wrote or edited it in the dashboard, or edited it in the repository after TolkBot wrote it - locked the key - has a draft for the key that isn't submitted yet The pull request lists these under **Source removed, translation kept**, with the keys. Remove them by hand if they aren't needed. Setting up a language that keeps the translations already in the repository marks every one of them as written by a person, so none of those is ever removed this way. Translations TolkBot writes afterwards are its own. See [Adding a language](https://docs.tolkbot.ai/docs/adding-a-language). ### The guard for large removals Some pushes look like removals but aren't. TolkBot removes nothing from a file when the push: - removed at least 10 keys and more than 40% of the file, which usually means keys moved to another file or were renamed in bulk - deleted the base language file - left the base language file empty, or in a state TolkBot couldn't read The pull request lists these under **Translations not removed**, with the file and a sample of the keys. Their translations stay until a person removes them. --- ## A renamed key When a push removes one key and adds another with exactly the same text, in the same file, TolkBot treats it as a rename. The translation moves to the new key instead of being translated again, so it costs no credits, and the pull request counts it under **Carried to renamed keys**, naming the old and new key. What belonged to the old key moves with it: a translation a person wrote stays theirs, and a locked key stays locked. A rename is recognized only when the text pairs exactly one removed key with one added key. If two removed keys and one added key all say "Cancel", nothing is carried and the new key is translated like any other. A key moved to another file is a removal in one file and a new key in the other. --- ## Keys TolkBot added itself A key can exist only because TolkBot's open pull request added it: you added `promo.banner` to the base file, TolkBot translated it, and then you removed `promo.banner` again before merging. Left alone, the pull request would merge a translation with no source into your repository. So the next run takes it back out of the pull request. It counts under **Keys removed** like any other removal. If a person edited the key on the pull request's branch, locked it or is drafting it, it stays, and the pull request lists it under **Kept although the source no longer has it**. --- ## Turning it off **Remove translations when a key is removed from the source**, under the project's **Settings → Workflow**, is on by default. With it off, the translations of removed keys stay in your files until you remove them, and a renamed key keeps its old translation as well as getting a copy at the new name. Keys TolkBot added to its own pull request are removed either way. See [Workflow settings](https://docs.tolkbot.ai/docs/workflow-settings). --- # Workflow settings Source: https://docs.tolkbot.ai/docs/workflow-settings Configure how TolkBot creates and manages translation pull requests. These settings are under **Settings → Workflow** in the project's sidebar. Each project has its own; they are not inherited from the organization. Each heading below is the label the dashboard uses, followed by the setting's name. --- ## Pull request target `prTargetBranch`. The branch translation PRs are opened against. **Default:** the repository's default branch. Use this when you want translations to target a specific branch (e.g., `develop`) even though detection happens on a different branch. --- ## Remove translations when a key is removed from the source When a push removes a key from the base language file, TolkBot removes that key's translations in the language's pull request. **Default:** on. A translation a person wrote, edited, locked or is drafting is kept, and the pull request names it. A push that removes at least 10 keys and more than 40% of a file usually means keys moved or were renamed, so TolkBot removes nothing from that file and lists the keys in the pull request instead. See [Removed and renamed keys](https://docs.tolkbot.ai/docs/removed-and-renamed-keys). With the switch off, the translations of removed keys stay in your files until you remove them. --- ## Auto-create PRs `autoCreatePR`. Enable or disable automatic PR creation. **Default:** `true` for a new project. A project created before this became the default keeps the value it had, which is `false` unless someone changed it. | Value | Behavior | | ------- | ------------------------------------------------------------------------------- | | `true` | TolkBot creates/updates a translation PR per set-up language on push | | `false` | No automatic PRs (start translations from the dashboard or use the CLI instead) | --- ## Translation scope `translationScope`. Control which keys get translated on each push. **Default:** `new-keys-only`. | Value | Dashboard label | Behavior | | --------------- | ---------------- | --------------------------------------------------------------- | | `new-keys-only` | New keys only | Translate the keys the triggering commit added or changed | | `all-missing` | All missing keys | Translate every key missing from the target locale on each push | With `new-keys-only`, a commit that touched no key needing translation falls back to every missing key, so a push never leaves work behind because the commit diff said nothing useful. To fill in keys that were missing before you connected the project, either switch to `all-missing` or use **Translate missing** on the project's [Translations](https://docs.tolkbot.ai/docs/translations#translate-missing) page. Either way, a key whose source text changed is translated again when TolkBot wrote the current translation and nobody has touched it since. --- ## Branch pattern `branchPattern`. Customize the branch name for translation PRs. **Default:** `tolkbot/{{projectName}}-i18n-{{lng}}` ### Available placeholders | Placeholder | Description | | ------------------ | --------------------------------------- | | `{{lng}}` | Target language code (e.g., `de`, `fr`) | | `{{projectName}}` | Project slug | | `{{baseLanguage}}` | Source language code | ### Example ``` tolkbot/i18n-{{baseLanguage}}-{{lng}} ``` Creates branches like `tolkbot/i18n-en-de`. A pattern that doesn't start with `tolkbot/` gets it added. Changing the pattern, or renaming the project, doesn't move an open translation PR. TolkBot keeps committing to that PR's branch, and the new name applies to the next PR. --- ## Base branches filter `baseBranches`. Filter which branches trigger translation PRs. A regular expression that must match the whole branch name. **Default:** the repository's default branch only. ### Examples | Pattern | Matches | | --------------- | ----------------------------------- | | `main` | Only the `main` branch | | `main\|develop` | `main` or `develop` | | `release/.*` | Any branch starting with `release/` | --- ## Ignore users `ignoreUsers`. Skip translation for pushes made by specific GitHub accounts. **Default:** none. ### Example ```json ["dependabot[bot]", "renovate[bot]", "release-bot"] ``` TolkBot compares each entry with the login of the account that pushed, exactly as GitHub reports it. Bots and GitHub Apps push as `name[bot]`, so `dependabot` on its own matches nothing. A pull request merged on GitHub is pushed by the person who merged it, not by its author, so ignoring a bot skips only the pushes the bot makes itself. --- ## Minimum keys threshold `minKeysThreshold`. Minimum number of keys a push must need translated before TolkBot translates and updates the PR. **Default:** 1. Set this to avoid updating PRs for single-key changes. A push below the threshold translates nothing. With `all-missing` the skipped keys are counted again on the next push; with `new-keys-only` the next push counts only its own keys, so use **Translate missing** to pick up what was skipped. --- ## Create as draft `createAsDraft`. Create translation PRs in draft state. | Value | Behavior | | ------- | --------------------------------------------- | | `true` | PRs are created as drafts | | `false` | PRs are created as ready for review (default) | --- ## PR labels `prLabels`. Labels to add to translation PRs. TolkBot adds them when it opens a PR, not when it updates one. **Default:** none. ### Example ```json ["translations", "automated", "needs-review"] ``` --- # Overview Source: https://docs.tolkbot.ai/docs/overview The TolkBot dashboard is where you set up projects, see what is waiting on you, and look back at what TolkBot did. A project's **Overview** page is where it starts. --- ## Finding your way The bar at the top says where you are: `Organization / Project / Page` inside a project, `Organization / Page` outside one. The sidebar lists only what is in that place. - Click the organization's name to go to its **Projects**. The arrow beside it switches to another organization or creates one. - Click the project's name to go to its **Overview**. The arrow beside it finds a project, lists **All projects** or starts a **New project**. The bottom of the sidebar shows your credit balance and, during a trial, how many days are left. It links to **Billing**. Your account menu below it has **Account** and **Notifications**. Signing in opens your project if the organization has one, and **Projects** if it has several or none. ### An organization's pages - **Projects**, the projects in the organization - **Context**, the organization's **Glossary** and **Learnings**. See [Context](https://docs.tolkbot.ai/docs/context) - **Activity**, translation jobs and pull requests across all projects - **Settings**: **Translation defaults**, **Connections**, **Members** and **Billing**. See [Organization and members](https://docs.tolkbot.ai/docs/organization-and-members) and [Billing and credits](https://docs.tolkbot.ai/docs/billing-and-credits) ### A project's pages A project is one set of locale files in one repository, usually one app or package. In a monorepo you can create several projects from the same repository, each with its own root directory. - **Overview**, described below - **Translations**, every key in every language, where you edit, lock and retranslate. See [Translations](https://docs.tolkbot.ai/docs/translations) - **Context**, the glossary, learnings and suggested context the translator is given. See [Context](https://docs.tolkbot.ai/docs/context) - **Activity**, what happened, newest first. See [Activity](https://docs.tolkbot.ai/docs/activity) - **Settings**: **General**, **Languages**, **Translation** and **Workflow**. See [Project settings](https://docs.tolkbot.ai/docs/project-settings) --- ## The Overview page ![A project's Overview page with the Needs you list and the Languages table](https://docs.tolkbot.ai/screenshots/overview.png) A project's Overview: one language not set up yet, and two kinds of decision waiting under Needs you. The line under the project's name says how many languages and keys it has. **Add language** opens the [Add a language](https://docs.tolkbot.ai/docs/adding-a-language) dialog, and **Translate missing** opens the [Translations](https://docs.tolkbot.ai/docs/translations) page. A project without a language says **No languages yet**, with **Add a language**, which opens the same dialog. If the repository has locale files for languages you haven't set up, a one-line banner says how many aren't set up, with **Set up all**. See [Adding a language](https://docs.tolkbot.ai/docs/adding-a-language). ### Needs you **Needs you** collects what TolkBot left for a person to decide, and says how many decisions there are. Everything else was handled without you. Each row says how many keys it covers and in which languages, and **Review** opens those keys on the Translations page. | Row | What it means | What you can do from here | | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | | **Changes not in the pull request** | The last update of a pull request left some of your changes out, or failed. The row says why. The changes are still waiting | **Retry**, **Review** | | **Looks wrong** | A translation already in the repository that the [health scan](https://docs.tolkbot.ai/docs/health-scan) found wrong: in another language, left untranslated, or not saying what the source says | **Review** | | **Source changed** | The source text changed after the translation was written, and a person owns the translation, so TolkBot didn't replace it | **Keep translations**, **Retranslate**, **Review** | | **Reviewer suggests a change** | The [review pass](https://docs.tolkbot.ai/docs/checks-and-review-pass#review-pass) proposed a fix it didn't apply on its own | **Apply suggestions**, **Review** | | **Needs wording** | The review pass found a problem but had no fix to offer, such as a glossary term it couldn't place | **Review** | | **Suggested context** | Notes TolkBot proposes for source strings that were too short or ambiguous to translate confidently | **Accept all** | | **Not in source** | Translations whose key the base language file no longer has | **Remove**, **Review** | **Keep translations** tells TolkBot the current translations still fit the new source text, so they are not retranslated for this change. **Retranslate** and **Apply suggestions** save new values as drafts, and **Remove** stages the removals; nothing reaches your repository until you open a pull request with them. ### Changes ready When drafts are waiting, a bar says how many changes are ready in how many languages, how many of them remove a key, and which branch they go into. It is the same bar as on the Translations page. **Review and open pull request** opens the review dialog; see [Sending your changes](https://docs.tolkbot.ai/docs/translations#sending-your-changes). ### Languages One row per language: - **Translated**, a bar of what is done and what needs you - **Done**, as a percentage of the base file's keys - **Needs you** and **Missing**, as counts - **Delivery**: **Not set up**, **Translating** while TolkBot works on it, the open pull request, or the drafts waiting to ship Languages at 100% are folded away behind **Show more languages at 100%**. The counts come from the last audit of each file, and the footer says when that was. **Refresh** audits every set-up language again. ### Recent The last five translation jobs. The [Activity](https://docs.tolkbot.ai/docs/activity) page has the rest. --- ## Archived projects An archived project keeps its Overview, Context and Activity pages, read-only, under a banner that says why it was archived. Its Translations and Settings pages are hidden. See [Organization and members](https://docs.tolkbot.ai/docs/organization-and-members#archived-projects). --- # Translations Source: https://docs.tolkbot.ai/docs/translations The **Translations** page lists every key of one language with its translation and its state. You edit a value here, lock a key, retranslate, translate what is missing, and ship your changes as a pull request. ![The Translations page with the key list on the left and the key inspector on the right](https://docs.tolkbot.ai/screenshots/translations.png) The Needs you filter, with a key the health scan found in the wrong language open in the inspector. --- ## Picking a language The language picker at the top lists the project's languages with where each stands: **Not set up**, **Setting up**, **Failed to set up**, how many need attention, or **Set up**. **Add a language…** at the bottom of it opens the [Add a language](https://docs.tolkbot.ai/docs/adding-a-language) dialog. The page opens the first language that is set up. Opening one that isn't set up shows why in place of the keys and opens the [Add a language](https://docs.tolkbot.ai/docs/adding-a-language) dialog for it. The line under the picker sums up the language: how many keys are translated, how many need you, and the open pull request. TolkBot reads the language's files from your repository each time the page loads, so it shows what is on your default branch now. The refresh button beside the search box checks the files against the repository again and runs a [health scan](https://docs.tolkbot.ai/docs/health-scan) on what is in them. --- ## Finding keys Search matches the key, the source text, the translation and your draft. The filters below it narrow the list to one state: | Filter | Keys shown | | ------------------- | ----------------------------------------------------------- | | **All** | Every key | | **Needs you** | Keys TolkBot left for a person to decide, in groups (below) | | **Missing** | Keys the base file has and this language doesn't | | **Drafts** | Keys with a change you saved and haven't shipped | | **In pull request** | Keys whose change is on the language's open pull request | | **Not in source** | Keys this language has and the base file doesn't | **Written by a person** shows only values a person wrote, and **Locked** only locked keys. They combine with the filters above. The dot beside a key says the same at a glance: red for missing, amber for needs you, blue for a draft or a change in a pull request, violet for not in source. A key with none is done. ### What needs you **Needs you** groups its keys by why, and each group can be settled at once from its header: | Group | Why it is here | Settle the group | | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | | **Looks wrong** | Already in the repository, and the [health scan](https://docs.tolkbot.ai/docs/health-scan) found it in another language, left as the source, or not saying what the source says | **Retranslate all** | | **Reviewer suggests a change** | The [review pass](https://docs.tolkbot.ai/docs/checks-and-review-pass#review-pass) proposed a better wording it didn't apply on its own | **Apply all** | | **Needs wording** | The review pass found a problem but couldn't propose a fix | Write the translation, or add context and regenerate | | **Source changed** | The source text changed after the translation was written | **Keep translations**, **Retranslate** | | **No record of who wrote this** | The translation was there before TolkBot tracked the language, and you chose to review those | **Looks right** or regenerate each | A group action leaves out locked keys, keys with a draft and values a person wrote, and says what it left out. Retranslating and applying save drafts; nothing reaches your repository until you ship them. **Not in source** works the same way: **Remove** stages the removals, and the keys leave the file when the drafts ship. TolkBot never removes these on its own, except when a push removes the key from the base file. See [Removed and renamed keys](https://docs.tolkbot.ai/docs/removed-and-renamed-keys). --- ## The key inspector Click a key to open it in the inspector beside the list. The top says what the key is: its name and file, who wrote the value (**translated by TolkBot**, **written by a person**, **no record of who wrote this**, **translated by TolkBot, corrected by the review pass**), and whether it is locked, in a draft or in a pull request. Below that, the inspector shows what TolkBot knows about the key: - **The source changed.** The old and new source text side by side, with **Keep translation** if the translation still fits. Keeping it tells TolkBot not to retranslate it for this change. - **The source was edited without changing what it says**, such as a typo fix. The translation was kept on purpose, and the inspector shows the old source. - **A health finding**: **Wrong language**, **Not translated**, **Doesn’t match the source** or **Placeholders differ from the source**, with **Retranslate** and **This is fine**. See [Health scan](https://docs.tolkbot.ai/docs/health-scan). - **A review finding**: with a suggestion, **Apply** saves it as a draft and **Keep mine** keeps your value and adds a learning so the reviewer doesn't raise it again. Without one, **Dismiss**. - **No record of who wrote this**: **Looks right** records the value as written by a person. - **Not in source**: **Remove** stages the removal. Then the strings themselves: the source, the key's **Context** note, and the translation. See [Context](https://docs.tolkbot.ai/docs/context#key-context) for the note. --- ## Editing a value Type in the translation field and choose **Save Draft** (Cmd+Enter), which also moves to the next key. **Revert** throws the draft away. A draft is yours: TolkBot's automatic runs leave a key with a draft alone until you ship or discard it. Switch on **Save as Learning** before saving to have the correction used in later translations into this language. You can add a reason. The learning is created when the draft reaches the pull request, not when you save it. See [Context](https://docs.tolkbot.ai/docs/context#learnings). ### Regenerate with AI **Regenerate with AI** asks the model for another translation of this key. Add a note to steer it ("shorter", "less formal"), then **Generate**. Each try is listed beside the **Original**, up to 10. Pick one to put it in the translation field, then save it as a draft like any edit. ### Sending your changes When drafts are waiting, a bar at the top of the page says how many changes are ready in how many languages. The Overview page shows the same bar. **Review and open pull request** opens a dialog that lists every change by language, marked as written by AI or a person and as edited, added or removed. - The bin beside a change discards that one change. - Untick a language to leave its changes for later. - **Discard all** throws away the changes in the ticked languages, after asking. - **Open pull request** sends the ticked changes. Each language has its own pull request: the button says **Update pull request #N** when the one language you send already has one open, and **Open N pull requests** when you send several. The dialog then follows each language until its pull request is updated, and links to it on GitHub and in **Activity**. If a change was left out, for example because it would have broken a placeholder, the dialog says why. The change stays waiting, and the Overview lists it under **Needs you**. You can close the dialog at any time; the pull request opens either way. --- ## Locking a key **Lock**, beside the line in the inspector that says what it does, keeps automatic translation off a key: translation jobs, **Translate missing**, retranslation and the pull requests a push opens all leave it alone, and so does the review pass. A pull request that would have changed it says so. Your own edits to a locked key still go through. Lock a key to keep a translation you're happy with exactly as it is, or to keep a key untranslated on purpose. **Unlock** lets automatic translation touch it again. --- ## Working on several keys Tick keys in the list, or select all the visible ones, and a bar appears: - **Re-translate**: shows what it will translate and what it leaves out, then saves new translations as drafts. It never opens a pull request. - **Lock** and **Unlock** - **Keep translations**: keep the translations of keys whose source changed - **Looks right**: record values with no history as written by a person - **Remove**: stage the removal of keys that aren't in the source --- ## Translate missing **Translate missing** at the top of the page translates every key this language lacks. It starts at once. Locked keys and keys with a draft are left out, and the page says how many. Where the result goes follows **Auto-create PRs** under **Settings → Workflow**: on, a pull request opens when the job is done; off, the translations land as drafts for you to review and ship. See [Workflow settings](https://docs.tolkbot.ai/docs/workflow-settings#auto-create-prs). **All languages** does the same for several languages at once. Pick the languages, choose whether to open pull requests, and **Detect Missing Keys** shows a preview first: per language, how many keys it will translate and how many it leaves out and why. **Start Translation** starts it. If the repository changed since the preview, it asks you to look again. Translations cost credits, which the job's page shows when it finishes. See [Billing and credits](https://docs.tolkbot.ai/docs/billing-and-credits). --- # Adding a language Source: https://docs.tolkbot.ai/docs/adding-a-language TolkBot translates, checks and syncs a language only once it is set up. Setting one up takes a minute, and the one decision is what to do with translations your repository already has. --- ## Add a language Every way to add a language opens the same **Add a language** dialog: **Add language** on the Overview page, **Add a language** when a project has none, **Add a language…** at the bottom of the language picker on the Translations page, and **Add language** under Settings → Languages. ![The Add a language dialog](https://docs.tolkbot.ai/screenshots/add-language.png) Adding a language the repository has no file for yet. Languages your repository has files for, but the project doesn't have yet, are listed first under **In your repository**, with **Add all**, which sets them all up in one step (see below). Otherwise, search for the language. The list is every language TolkBot supports; see [Supported languages](https://docs.tolkbot.ai/docs/supported-languages). TolkBot then checks your repository for a file in that language and says what it found. A language is set up when the dialog closes; there is no step to come back to. - **It finds translations**: choose what happens to them. - **Keep them** (recommended). Every existing translation is recorded as written by a person. TolkBot doesn't translate any of them again unless you ask, and treats them as yours: a push that changes their source text shows them under **Needs you** instead of replacing them, and a push that removes their key keeps them. - **Keep them and mark them for review.** The translations stay in the file, and each one is flagged **No record of who wrote this** on the [Translations](https://docs.tolkbot.ai/docs/translations#what-needs-you) page for you to confirm or regenerate. The dialog says how many keys still need translating. Use **Translate missing** on the Translations page for those. - **It finds none**: choose **Add and translate** to see what a run of every key would do, or **Add only**. **Add and translate** opens the same preview as every other translate button: the keys, an estimate, and whether the results land as drafts or in a pull request. Nothing runs until you start it there. Either way, setup starts a [health scan](https://docs.tolkbot.ai/docs/health-scan) of the language's translations. What it finds shows under **Looks wrong** on the Overview page, whichever choice you made. --- ## Languages that aren't set up A language can be on a project without being set up: languages added before the Add a language dialog existed, and the locale files TolkBot found when it created the project. TolkBot doesn't sync or check them, the language picker and the Overview say **Not set up**, and a one-line banner on the Overview and Translations pages says how many there are, with **Set up all**. The first time you open the Translations page of a project with none set up, the dialog opens on its own. ![The Add a language dialog setting up several languages with two choices for existing translations](https://docs.tolkbot.ai/screenshots/set-up-languages.png) Setting up the languages a repository already has. **Set up all** opens the dialog with every language that isn't set up. Tick the languages, choose **Keep them** or **Keep them and mark them for review** for all of them, and set them up. Setup runs on TolkBot's side, so you can close the dialog; it shows each language's progress until then, and **Retry** for one that failed. A language whose file is empty is set up the first way whichever you pick, since there is nothing to keep. Opening a language that isn't set up on the Translations page opens the dialog for that language alone, and Settings → Languages has **Not set up** next to it, which does the same. ### From the terminal `tolkbot languages add nb` adds and sets up a language the same way, keeping existing translations unless you pass `--existing review`. See [CLI project setup](https://docs.tolkbot.ai/docs/cli-project-setup#languages). --- ## Open pull requests automatically The dialog has the **Open pull requests automatically** switch. It is the project's **Auto-create PRs** setting, and changing it here changes it there. On, every push to your default branch opens a pull request for each language that is set up, with the translations the push needs. Pull requests use credits. Off, a push opens nothing and you start translations from the Translations page. A new project has it on. See [Automated pull requests](https://docs.tolkbot.ai/docs/automated-pull-requests). --- ## When the first pull request arrives Setting up a language opens no pull request on its own. The first one arrives: - **Right away**, if you chose **Add and translate** and started the run with **Open a pull request**. It opens when the translation job finishes, usually within a few minutes. - **On your next push** that changes the base language file, with automatic pull requests on. By default a push translates only the keys it added or changed, so the keys the language was already missing stay missing. Use **Translate missing** on the Translations page for those, or change the [translation scope](https://docs.tolkbot.ai/docs/workflow-settings#translation-scope). - **When you send your changes**, with automatic pull requests off: **Review and open pull request** on the Overview or the Translations page, then **Open pull request**. --- # Context Source: https://docs.tolkbot.ai/docs/context The **Context** page holds what the translator is told besides the string itself: the terms you always translate one way, the corrections it learned from you, and notes on keys whose source is too short to say what it means. --- ## The Context page ![A project's Context page on the Glossary tab](https://docs.tolkbot.ai/screenshots/context.png) A project's Context page, on the Glossary tab. A project's **Context** page has three tabs: - **Glossary**, the project's terms, and the organization's terms it uses - **Learnings**, corrections made in this project - **Suggested context**, notes TolkBot proposes for ambiguous strings The organization's **Context** page, which you reach by clicking the organization's name in the top bar and then **Context**, has **Glossary** and **Learnings**. Its glossary applies to every project, and its Learnings tab lists the learnings of every project. --- ## Glossary A glossary is a list of source terms with their approved translations. When a string uses a term, TolkBot tells the model which translation to use and checks afterwards that it did. ### Example | Source (en) | Target (fr) | Context | | ----------- | ----------------- | ------------------------- | | Dashboard | Tableau de bord | Main navigation item | | Submit | Envoyer | Form button, max 15 chars | | Workspace | Espace de travail | — | --- ## Organization and project glossaries A term can belong to the organization or to one project: ### Organization-wide Organization glossaries apply to all projects in the organization. Use these for company-wide terminology that should be consistent everywhere. Create and manage the organization glossary on the organization's **Context** page, under **Glossary**. From a project, click the organization's name in the top bar, then **Context**. ### Project-specific Project glossaries apply only to a single project. Use these for project-specific terminology that may differ from the organization standard. Create and manage a project's glossary on the project's **Context** page, under **Glossary**. > **Inheritance** > > Projects use the organization glossary as well as their own by default. Turn this off with **Inherit organization glossaries** on the project's **Context → Glossary** tab. When both have the same term, the project's translation wins. --- ## Do-not-translate terms Mark terms that should never be translated: | Term | Do not translate | | ------- | ---------------- | | TolkBot | Yes | | GitHub | Yes | | API | Yes | When a term is marked as do-not-translate, TolkBot preserves it exactly as-is in all translations. --- ## Notes on a term Add a note to help the model understand how a term should be translated: - "Dashboard menu item, max 15 characters" - "Legal term, use formal register" - "Brand name, always capitalize" Context helps the AI make better translation decisions without overriding its judgment. --- ## Translations per language An entry holds an approved translation per target locale. A translation for the target locale goes into the prompt as the word to use. The model still translates the whole string around it, so an entry is not a fixed translation of a key. --- ## Import a glossary from CSV If you already keep a terminology list, import it instead of adding terms one at a time. Open the organization's **Context → Glossary** tab or the project's **Context → Glossary** tab and choose **Import CSV**. The dialog has a **Download example CSV** button with a file you can start from. ### File format A UTF-8, comma-separated file with a header row. Column order doesn't matter, and header names are case-insensitive. | Column | Required | Meaning | | ------------------ | -------- | -------------------------------------------------------------------------- | | `source_locale` | Yes | Locale of the source term, e.g. `en` | | `target_locale` | Yes\* | Locale of the translation, e.g. `nb` or `pt-BR` | | `source_term` | Yes | The term as it appears in your source strings | | `target_term` | Yes\* | The approved translation | | `notes` | No | AI context for the term | | `do_not_translate` | No | `true` to keep the term as-is in every locale (`true`/`false`, `yes`/`no`) | \* The columns must be present, but the values can be empty on a do-not-translate row or a notes-only row. ```csv source_locale,target_locale,source_term,target_term,notes,do_not_translate en,nb,Dashboard,Oversikt,"Navigation item, keep it short", en,de,Dashboard,Übersicht,, en,pt-BR,Workspace,Espaço de trabalho,, en,,TolkBot,,Product name,true ``` Each row is one term in one target locale, so a term with five translations takes five rows. They're combined into a single glossary entry. Wrap a value in double quotes if it contains a comma, a quote or a line break, and write a quote inside a quoted value as `""`. Locales can be written as `pt-BR`, `pt_BR` or `ptBR`; they are stored the way TolkBot's settings spell them (`pt-br`). The dialog shows locales TolkBot doesn't support as invalid rows. ### Preview and conflicts Nothing is written until you confirm. First, choose whether the terms go into the organization glossary or into one project's glossary. The preview then sorts every row into one of these: - **New**: a new term, or a translation or notes added to an existing term. - **Duplicate**: the glossary already says exactly this. The row is skipped. - **Conflict**: the glossary already has a different translation, different notes or a different do-not-translate setting for this term. The row is skipped unless you tick **Replace** on it, or **Replace all conflicts**. - **Invalid**: the row can't be imported, and the preview says why. The row is skipped. This includes a row that disagrees with an earlier row in the same file. When the import finishes, you see how many terms were created, how many were updated and how many rows were skipped. Imported terms work like terms you added by hand: project terms take priority over organization terms, and inheritance and relevance filtering apply as usual. ### Limits - Files up to **1 MB** and **5,000 rows**. Split larger lists into several files. - Terms up to 500 characters, notes up to 2,000 characters. - Rows are sent in batches of 100. If an import stops partway, the rows already imported are kept. **Retry** continues from where it stopped, and importing the same file again adds nothing twice. --- ## How glossaries affect translation TolkBot puts into the prompt only the entries whose source term appears in the string being translated. The model is told that a term in the source must appear in the translation as the approved translation, and that do-not-translate terms stay as they are. After translation, TolkBot checks the output for each term. A term may be inflected the way the sentence needs it: plurals, case endings and definite forms count, and so does a verb built on the term with a short prefix, such as Polish _zafakturowany_ ("invoiced") from _faktura_ ("invoice"). A missing term flags the key `glossary_violation` and sends it to the stronger model, with the missed term named. The review pass at the end of the job checks the terms again on what was finally written, including translations served from memory. A term it can't place shows up under **Needs you** on the project's Overview page. --- ## Glossary locales An entry's source and target locales are matched by language, then region: - An entry for exactly the job's locale always applies. - An entry for the base language applies to its regions: an `en` term applies to an `en-us` project, and a `pt` translation to a `pt-br` target. - Never the other way round, and never across regions: an `en-gb` term applies to neither `en` nor `en-us`. - `no` and `nb` are the same language. `nn` (Nynorsk) is its own. When several entries apply, the most specific wins: the project's exact locale, then the project's base language, then the organization's exact locale, then the organization's base language. --- ## Learnings A learning is a correction TolkBot remembers: the source text, the translation you want instead, and why. It is used in later translations of the same project into the same language, so the model doesn't repeat the mistake. ### Where learnings come from - **A comment on a pull request.** Mention `@tolkbot` with a correction such as `"Submit" should be "Envoyer" not "Soumettre"`, and TolkBot fixes the key and keeps the correction as a learning. See [Feedback in a pull request](https://docs.tolkbot.ai/docs/pull-request-feedback). - **An edit in the dashboard.** On the [Translations](https://docs.tolkbot.ai/docs/translations#editing-a-value) page, switch on **Save as Learning** before saving your edit, and add a reason if you like. The learning is created when the edit reaches the pull request. - **Keeping your value over the reviewer's.** **Keep mine** on a review suggestion adds a learning, so the same value isn't flagged again. - **A translation job's page.** Open a key in the job and choose **Add Learning**. - **The CLI.** [`tolkbot learnings add`](https://docs.tolkbot.ai/docs/cli-commands#learnings-add) writes one from scratch, and `tolkbot set --learn` saves one with a value you set. The dashboard has no form for writing a learning from scratch; there, a learning starts from a translation someone corrected. A learning from the CLI can also be a note on its own, such as "address the reader as du", which is used for every string translated into its language. Each learning has a type, which says what kind of correction it is: | Type | Description | | -------------------- | ------------------------------------------------ | | `incorrect-term` | A term was translated with the wrong word | | `wrong-tone` | The tone or formality doesn't match expectations | | `cultural-context` | The translation isn't culturally appropriate | | `technical-accuracy` | A technical term was incorrectly translated | | `other` | Other correction | ### Where learnings apply A learning belongs to the project it was made in. It is used when that project translates into the same language, and no other project sees it. **Inherit organization learnings** on the project's Learnings tab, on by default, also uses the learnings that belong to the organization rather than to one project. ### Removing a learning To stop a learning from influencing translations, delete it from the project's **Learnings** tab or the organization's. Deleting can't be undone, and the dashboard has no way to edit a learning's text. To set one aside without deleting it, use [`tolkbot learnings archive`](https://docs.tolkbot.ai/docs/cli-commands#learnings-archive) in the CLI. --- ## Key context Some source strings don't say enough to translate them well. "Close" can be a verb or an adjective, "Post" a noun or a button, and the right word in the target language depends on which. A context note on the key tells the translator. Open the key on the [Translations](https://docs.tolkbot.ai/docs/translations) page and edit **Context** in the inspector, for example "button label, max 10 chars". The note goes into the prompt every time the key is translated or regenerated. A key with a note shows an icon in the key list. If your code already carries a description for the key, TolkBot reads it from there, and that replaces a note written in the dashboard. --- ## Suggested context At the end of a job, TolkBot looks at the keys the translator said were ambiguous and proposes a context note for each, up to 50 per job. Keys that already have a note are skipped. The suggestions wait on the **Suggested context** tab, each with the key, the proposed note and why. **Accept** saves it as the key's note, **Dismiss** drops it, and **Accept all** takes every one. The Overview page's **Needs you** list counts them too, and the key inspector shows a key's suggestion where you edit its note. An accepted note is used from the next translation on. To use it on a value already written, regenerate the key. --- # Activity Source: https://docs.tolkbot.ai/docs/activity A project's **Activity** page says what happened in it, newest first: pushes TolkBot read, jobs it ran, pull requests it opened and what came of them. ![The Activity page's timeline](https://docs.tolkbot.ai/screenshots/activity.png) The timeline of a project with one language set up. --- ## Timeline The **Timeline** tab is a list of events grouped by day. Each says what happened in a line, with a button to where it happened. The icon's colour says how it went: blue for a job still running, red for a failure, amber for something that needs you, green for a merged pull request. | Event | What it says | Button | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- | | A push | Which branch, how many keys it changed, which languages TolkBot checked, and why a language got nothing | **View commit** | | A push TolkBot didn't act on | That it changed your translation files and why nothing was translated: automatic pull requests off, the pusher ignored, or no language set up | **Workflow settings** | | A translation job | Running, finished, finished with some keys failed, failed or cancelled, with how many keys came from memory and how many from the model, and the credits used | **View job** | | The review pass | How many fixes it applied and how many keys it flagged for you | **View job** | | A pull request | Opened, updated, edited from the dashboard, merged or closed | **View on GitHub** | | A failed pull request update | That the update didn't go through, and what to do | **Translate missing keys** | | Translations removed | That a push removed keys, and their translations went with them | **View on GitHub** | | A language set up | Which language | **View translations** | | A reviewer's comment | That a comment on a pull request became a learning | **View learnings** | Some events have **Show technical details**, with what TolkBot recorded about them: the commit of a push, or the error behind a failed job or pull request update. A push that translated nothing in a language says why under it, for example **Nothing new to translate in German**. See [Troubleshooting](https://docs.tolkbot.ai/docs/troubleshooting#no-pull-request-after-a-push). --- ## Jobs The **Jobs** tab lists the project's last 50 translation jobs: their status, what started them, how many keys they changed in which language, how long they took and the credits they used (**Cost**). A second badge says whether a job **Needs you** or is **All clear**. | Status | Meaning | | ----------- | ----------------------------------------- | | `pending` | Waiting to start | | `running` | Translating | | `succeeded` | Every key was translated | | `partial` | Some keys were translated and some failed | | `failed` | Nothing was translated | | `cancelled` | Someone cancelled it | A job's menu has **View Details**, **View Failed Keys** and **Cancel Job**. ### A job's page A job's page says who or what started it, and its details: the languages, how many keys, **Credits used**, and the repository, branch and commit it read. **Cancel job** stops it while it is pending or running. The **Keys** tab lists every key with its translation and what the [checks](https://docs.tolkbot.ai/docs/checks-and-review-pass) found: the flags it got, whether it went to the stronger model, and whether the review pass corrected it. A **Checks** summary above it counts the same for the whole job. Open a key to see what the model was told, or to choose **Add Learning**. The **Activity** tab is the job's own timeline. --- ## Pull requests The **Pull requests** tab lists each language's translation pull requests, with their status (**Open**, **Merged**, **Closed**, **Failed** or **Pending**), branch, how many keys they carry and when they were last updated. A pull request whose latest update failed says **Last update failed**. Filter by status at the top. --- ## The organization's Activity page The organization's **Activity** page has **Jobs** and **Pull requests** across all of its projects, with the project in each row. It has no timeline. --- # Project settings Source: https://docs.tolkbot.ai/docs/project-settings Configure your project's translation behavior under **Settings** in the project's sidebar. Every setting on this page belongs to the project. The one thing a project can take from its organization is its tone, through the **Use organization defaults** switch described below. --- ## General Under **Settings → General**: the project's name, and **Delete project**. Renaming changes the project's address in the dashboard, and links to the old address keep working. Deleting removes the project with its jobs, glossary and learnings, and leaves your repository alone. See [Organization and members](https://docs.tolkbot.ai/docs/organization-and-members#deleting-a-project). --- ## Languages Under **Settings → Languages**. ### Base language The source locale that you author content in. Usually `en` (English). ### Target languages The languages you want to translate to. A language is translated only once it is set up: add one with **Add language** on the project's Overview or Translations page, and TolkBot asks whether to keep or review any translations the repository already has for it. See [Adding a language](https://docs.tolkbot.ai/docs/adding-a-language). ### Source pattern The path of your locale files, with `{locale}` where the language goes (e.g., `messages/{locale}.json`). TolkBot detects it when you create the project. Change it here if the detection was wrong; the page shows which files the pattern matches. The **Output pattern** is where translations are written, and is the same as the source pattern unless you set another. --- ## Translation Under **Settings → Translation**. ### Use organization defaults On: the project uses the tone set under the organization's **Settings → Translation defaults**. Off: the project uses its own tone, set below. ### Tone presets Control the tone of translations. The default is `formal`. | Preset | Description | | ----------- | ------------------------------- | | `formal` | Formal, professional language | | `casual` | Friendly, conversational tone | | `marketing` | Engaging, persuasive copy | | `technical` | Precise technical documentation | | `custom` | Use custom tone instructions | ### Custom tone instructions Each preset fills in instructions you can edit. With the `custom` preset, write your own. For example: > "Use informal language. Address the user with 'du' in German, 'tu' in French. Keep button labels under 20 characters." ### Validation The **Validation** tab lists the checks every job runs: the file still parses, placeholders match the source, and no key goes missing. They can't be turned off, so there is nothing to configure. --- ## Workflow Under **Settings → Workflow**. These settings control automated PR behavior. See [Workflow settings](https://docs.tolkbot.ai/docs/workflow-settings) for full details. | In the dashboard | Setting | Description | | ------------------------------------------------------------- | ------------------ | ------------------------------------------------------------------ | | **Pull request target** | `prTargetBranch` | The branch translation PRs are opened against | | **Remove translations when a key is removed from the source** | — | Remove a key's translations when a push removes it (on by default) | | **Auto-create PRs** | `autoCreatePR` | Enable/disable automatic translation PRs | | **Translation scope** | `translationScope` | `new-keys-only` (default) or `all-missing` | | **Branch pattern** | `branchPattern` | Custom branch naming pattern | | **Base branches filter** | `baseBranches` | Which branches trigger translation | | **Ignore users** | `ignoreUsers` | GitHub users whose pushes don't trigger translation | | **Minimum keys threshold** | `minKeysThreshold` | Fewest keys a push must need before TolkBot translates | | **Create as draft** | `createAsDraft` | Create PRs as drafts | | **PR labels** | `prLabels` | Labels to add to new PRs | --- ## Glossary and learnings These live on the project's **Context** page, not under Settings: - **Glossary**: the project's own terms. **Inherit organization glossaries** (on by default) adds the terms from the organization's **Context → Glossary** page. See [Context](https://docs.tolkbot.ai/docs/context#glossary). - **Learnings**: corrections made in this project. See [Context](https://docs.tolkbot.ai/docs/context#learnings). --- # Organization and members Source: https://docs.tolkbot.ai/docs/organization-and-members Everything in TolkBot belongs to an organization: its projects, glossary, learnings, credits and subscription, and the GitHub connection. You can be a member of several organizations and switch between them. --- ## Organizations The organization's name is the first part of the bar at the top of the dashboard. Click it to go to the organization's **Projects**. The arrow beside it lists your other **Organizations**, and **Create organization** at the bottom starts a new one. A new organization starts at onboarding, where an admin chooses a plan or starts a trial. Each organization has its own subscription and credits. Nothing is shared between organizations, translation memory included. --- ## Members **Settings → Members** lists who has access to the organization, and the invitations not yet accepted. ![The Members page with one admin](https://docs.tolkbot.ai/screenshots/members.png) Settings → Members. ### Roles A member is an **Admin** or a **Member**. Both work on every project the same way: they translate, edit, set up languages, change settings and open pull requests. An admin can also: - invite people, with **Invite member**, and choose their role - change someone's role, with **Make admin** or **Make member** - remove someone, with **Remove member**, and cancel an invitation - change the organization's billing email - start a subscription. A member who opens an organization without one is asked to find an admin, and the page lists them Nobody can change their own role or remove themselves from the Members page. Emails meant to bring an organization into use, such as a trial ending, go to admins only. See [Notifications and emails](https://docs.tolkbot.ai/docs/notifications-and-emails). --- ## Several organizations on one GitHub account GitHub lets an account install the TolkBot app once, but you can connect that installation to several TolkBot organizations. Open **Settings → Connections** in each organization and choose **Connect GitHub**. Each organization keeps its own projects, settings and pull requests for the repositories it uses. One part of a repository can be managed by one organization at a time. On the **New Project** page: - A repository whose root another organization manages says **Managed by** that organization, and **Import** is disabled. In a monorepo, you can still import a directory that organization doesn't manage. - A path one of your own projects already uses says **Imported as** with the project's name, and links to it. A path an archived project holds is free once you delete that project. Each organization's projects get their own pull requests. Two organizations can translate different apps in the same monorepo without seeing each other's work. --- ## Archived projects TolkBot archives a project when it loses its repository: - the repository was deleted on GitHub - the repository moved to an account TolkBot can't reach from this organization - the TolkBot app lost access to the repository An archived project leaves the **Projects** list. **Archived projects** at the bottom of that list shows them, each with why and since when. An archived project keeps its glossary, learnings and history, and you can read them: its **Overview**, **Context** and **Activity** pages are there under a banner that says it is archived and why. Nothing can be translated or changed while it is archived, and its Translations and Settings pages are hidden. ### Getting it back A project comes back on its own when its repository does: when the repository is restored, when you give the TolkBot app access to it again, or when you install the app on the account it moved to and connect that installation to this organization. The banner says which applies. If another organization manages the repository's path by the time it comes back, the project stays archived, and says so. ### Deleting a project **Delete project** on the archived project's banner, or in **Settings → General** for an active project, deletes the project and everything under it: its translation jobs, pull request history, glossary and learnings. It can't be undone. Type the project's name to confirm. Your repository and its files are not touched. Admins and members are told by email when a repository is deleted, moved or loses access, and again when it is connected again. --- ## Renaming a project **Settings → General** renames a project. Its address in the dashboard changes with the name, and links to the old address keep working. An open translation pull request keeps its branch after a rename. The new name applies to the next pull request; see [Workflow settings](https://docs.tolkbot.ai/docs/workflow-settings#branch-pattern). --- # Billing and credits Source: https://docs.tolkbot.ai/docs/billing-and-credits TolkBot is sold as two plans, Starter and Pro, paid monthly or yearly. Each includes credits every month, and you spend credits when an AI model translates a string. --- ## Plans | | Starter | Pro | | --- | --- | --- | | Price, before VAT | $9 a month, or $90 a year | $29 a month, or $290 a year | | Included credits | 150,000 a month, about 1,500 translated keys at an average 100 credits a key | 500,000 a month, about 5,000 translated keys at an average 100 credits a key | | Active projects | One | Unlimited | | Free trial | 14 days on the monthly plan, with 150,000 credits | 14 days on the monthly plan, with 500,000 credits | | Overage | $0.10 per 1,000 credits, before VAT | $0.10 per 1,000 credits, before VAT | | Spending limit | $20 of overage a month; an admin can set $1 to $1,000, or switch overage off | $20 of overage a month; an admin can set $1 to $1,000, or switch overage off | Prices are before VAT. Polar, our billing provider, adds VAT at checkout. Every feature, language and member is in both plans; they differ in price, included credits and how many projects can be active at once. The [pricing page](https://tolkbot.ai/pricing) has the same figures. A yearly plan includes the same credits every month as the monthly one, and its overage and spending limit count per month too. ### The trial Monthly plans start with a free trial on the plan's own credits. A trial has no overage: when its credits are used, translation pauses until the paid plan starts. **Start paying now** on the **Billing** page ends the trial early and starts the plan with a fresh month of credits. Yearly plans have no trial and are charged at checkout. ### Changing plans An admin changes the plan on **Settings → Billing**: Starter to Pro and back, and monthly to yearly (**Switch to yearly**). The dialog says when the change takes effect. Most changes apply at once; a move from a yearly plan to a smaller one waits for the end of the year, and a move to yearly during a trial waits for the trial to end. Starter has one active project. Moving to it asks which project stays active, and archives the others. Archived projects are kept, not deleted, and become active again when you move back to Pro. Cancelling and updating the card are in Polar's billing portal, through **Manage plan and payment**. --- ## Overage and the spending limit Past the included credits, a paid plan keeps translating, and the extra credits are billed as overage with the next renewal. Overage stops at the organization's **spending limit**: the overage it may run up in a month. The plans table above has the rate and the default limit. On **Settings → Billing**, an admin can: - change the spending limit, within the range in the plans table - switch overage off, so translation pauses when the included credits are used, until they renew Members see both settings and what has been spent, without the controls. When a job reaches the limit it stops between batches, keeps what it translated, and the keys it did not reach show as failed with the reason. TolkBot emails the admins at 80% of the included credits, when overage starts, at 80% of the limit and when it is reached; see [Notifications and emails](https://docs.tolkbot.ai/docs/notifications-and-emails). The run preview on a project says when a run would go past the included credits. --- ## How credits work Each translation consumes credits in proportion to what the model call cost: the tokens the model read and wrote, at that model's price, with a markup that covers infrastructure, storage, and platform features. Most keys are translated by Gemini 3.5 Flash-Lite. A key that fails a check is translated again by Claude Sonnet 5.5, and that call costs more credits, so a key that needed the stronger model costs more than one that didn't. A long paragraph costs more than a button label for the same reason. TolkBot chooses the models; see [The translation pipeline](https://docs.tolkbot.ai/docs/translation-pipeline#ai-models). Some calls are not charged: the verifier's check of each translation, a translation TolkBot refused because its placeholders didn't match, and the scan of translations already in your repository. ### Cached translations Translations that are served from cache cost **0 credits**. This means: - Re-translating identical strings is free - Projects in the same organization can reuse identical translations - You only pay for new or changed content Translation memory is never shared between organizations. Entries expire 365 days after their last use. --- ## Credit calculation Credits are calculated from the token cost of each translation: 1. The AI model processes your translation (input + output tokens) 2. The raw model cost is calculated based on the provider's per-token pricing 3. A platform markup is applied 4. The result is converted to credits > **Credits per key** > > The translated keys in the [plans table](#plans) are an average. A long paragraph costs more than a button label, a key that needed the stronger model costs more than one that didn't, and a translation memory hit costs nothing. The dashboard shows the exact figure for every job. --- ## Usage tracking **Settings → Billing** shows the organization's plan, the included credits used and left this month and when they renew, the overage spent against the spending limit, and the credits each project used this month. Each translation job shows the credits it used, in the **Cost** column of the project's **Activity → Jobs** tab and on the job's own page. --- ## Billing email Invoices and payment notices go to the organization's **Billing email**, on the **Billing** page. Each organization needs its own address: one already used by another organization is refused. Only an admin can change it. --- ## When a payment fails The dashboard shows a banner, and the sidebar says **Payment failed**. Translations keep running while the payment is retried, and stop when the credits run out if it keeps failing. **Update payment method** on the banner or the **Billing** page fixes it. Every member is told by email; see [Notifications and emails](https://docs.tolkbot.ai/docs/notifications-and-emails). --- ## Managing costs Tips for optimizing your credit usage: - **Leverage caching** — identical strings are translated once and cached - **Keep the translation scope at `new-keys-only`** (the default) to translate only the keys each push adds or changes, instead of every missing key - **Set a minimum keys threshold** to skip pushes that need only a key or two translated - **Turn off Auto-create PRs** if you'd rather start translations yourself from the dashboard --- # The translation pipeline Source: https://docs.tolkbot.ai/docs/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](https://docs.tolkbot.ai/docs/cli-translating) ran the job --- ## AI models TolkBot picks the models; you can't choose one. | Step | Model | | ----------- | -------------------------------------------------------------------------------------- | | Translation | Gemini 3.5 Flash-Lite | | Escalation | Claude Sonnet 5.5 | | Review pass | Gemini 3.5 Flash-Lite | | Verifier | Jev, 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](https://docs.tolkbot.ai/docs/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](https://docs.tolkbot.ai/docs/project-settings#tone-presets). - **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](https://docs.tolkbot.ai/docs/checks-and-review-pass) and [Placeholders and plurals](https://docs.tolkbot.ai/docs/placeholders-and-plurals). --- ## Caching Before step 3, TolkBot looks the request up in [translation memory](https://docs.tolkbot.ai/docs/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. --- # Checks and the review pass Source: https://docs.tolkbot.ai/docs/checks-and-review-pass Every translation is checked before it is written, by code and by a model that didn't write it. A key that fails goes to a stronger model, and when a job is done the review pass reads each file as a whole. --- ## What is checked per key Each translated key goes through these checks, including a translation served from [translation memory](https://docs.tolkbot.ai/docs/translation-memory): | Check | What it looks at | Flag | | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | | Placeholders | Every placeholder in the source is in the translation, with the same braces. See [Placeholders and plurals](https://docs.tolkbot.ai/docs/placeholders-and-plurals) | — | | Plurals | A plural has every form the target language needs | `plural_incomplete` | | Glossary | Each glossary term in the source appears as its approved translation, in whatever form the sentence needs | `glossary_violation` | | Length | The translation is over 1.6 times as long as the source and at least 15 characters longer | `len_ratio` | | Language | The verifier finds the translation is in another language | `wrong_language` | | Meaning | The verifier finds the translation adds, drops or changes something the source says | `meaning_changed` | | Ambiguous source | The model says the source could mean more than one thing | `low_confidence` | Placeholders are settled before anything else: TolkBot repairs a changed brace count, and refuses a translation that drops or invents a placeholder. A refused translation is tried again with the problem described to the model, then once more with the stronger model, and fails only if all three attempts are refused. A refused attempt costs no credits. The flags show on the key in the job's page in the dashboard. ### The verifier The language and meaning checks are made by a model that didn't write the translation. Jev, an evaluation model from TypeSafe, is asked which language the text is in and whether it says the same as the source. Its answer is a reason to ask again, not a finding. A word like "Profil" is correct in several languages, and a correct translation can read as a change, so when Jev names another language or a changed meaning, a language model is asked whether the translation is right. The flag stands only when that second answer agrees. The verifier's calls cost no credits. If it can't be reached, the other checks still run and the job carries on. --- ## Escalation When the first pass is done, every flagged key is translated again by the stronger model, Claude Sonnet 5.5, with the reason it was flagged in front of it, so it doesn't make the same mistake: the term it missed, the language it slipped into, the part of the meaning it lost. When more than 40% of a batch of 10 or more keys is flagged, TolkBot doesn't escalate that batch. That many flags points to a problem with the source or the setup, such as a glossary term that doesn't fit, rather than with single keys. A key that needed the stronger model costs more credits than one that didn't. See [Billing and credits](https://docs.tolkbot.ai/docs/billing-and-credits). --- ## Review pass When a job finishes, the review pass reads each translated file as a whole, the way a person reviewing the pull request would. It looks for what a key-by-key check can't see: a term translated two ways, a glossary term that is still missing, wording that doesn't fit next to the strings around it, a value in the wrong language. For each problem it reports, it decides one of three things. ### It applies the fix A fix the reviewer is confident of is applied on its own when all of these hold: - nobody holds the key: it isn't locked, has no draft, and wasn't written by a person - the fix keeps the placeholders and plural forms of the source - the fix uses the glossary's terms The key inspector then says **translated by TolkBot, corrected by the review pass**, and the job's page counts the key as auto-corrected. The Activity timeline says how many fixes the review pass applied. To undo a fix, edit the value on the [Translations](https://docs.tolkbot.ai/docs/translations#editing-a-value) page and ship the draft. ### It suggests the fix When the key is held, the fix fails a check, or the reviewer isn't sure, the fix waits for a person under **Reviewer suggests a change** on the Overview and Translations pages. In the key inspector, **Apply** saves the suggestion as a draft, and **Keep mine** keeps your value and adds a learning, so the same value isn't flagged again. ### It reports the problem A finding with no corrected value is shown only when the problem is one a person can act on without one: a wrong language, or a glossary term the reviewer couldn't place. It shows under **Needs wording**. Write the translation yourself, or add context to the key and regenerate. **Dismiss** stops it being flagged again for that value. Every other finding without a fix is dropped, since a reason with no suggestion is not something a person can act on. --- ## In the pull request The **Checks** section of each pull request sums up what these checks did: how many keys were translated or failed, what was withheld from the commit and why, and what the review pass corrected and flagged. See [Automated pull requests](https://docs.tolkbot.ai/docs/automated-pull-requests#description). --- # Health scan Source: https://docs.tolkbot.ai/docs/health-scan Every other check runs on a translation TolkBot is writing. The health scan reads what is already in your locale files, whoever wrote it, and tells you what looks wrong. It costs no credits. --- ## When it runs - **When you set up a language**, on everything already in its files - **When a push to your default branch changes a locale file** the project covers. This happens whether or not the project opens pull requests automatically, and includes the push that merges TolkBot's own pull request - **Every day**, for a language whose last full scan is more than a week old - **When you ask**, with the refresh button beside the search box on the [Translations](https://docs.tolkbot.ai/docs/translations) page A scan looks only at values it hasn't judged before. TolkBot remembers its verdict on each pair of source text and translation, so a file that didn't change is free to scan again. A language with more than 1,500 values is scanned in several runs. --- ## What it checks | Finding | When | | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Wrong language** | The value is in another language, such as Swedish in a Norwegian file, or has no character of the script the language is written in, such as Latin letters in a Korean file | | **Not translated** | The value is the source text, word for word. Short strings and words that are the same in both languages, like "OK" or "Status", are left alone | | **Doesn’t match the source** | The value adds, drops or changes something the source says | | **Placeholders differ from the source** | The value's placeholders are not the source's, so your app may show a literal `{name}` or drop a value | The script, untranslated and placeholder checks need no model. Language and meaning are asked of the same [verifier](https://docs.tolkbot.ai/docs/checks-and-review-pass#the-verifier) that checks new translations. If the verifier can't answer, the value is checked again on the next scan rather than called healthy. --- ## Where findings show up ![A health finding in the key inspector, with Retranslate and This is fine](https://docs.tolkbot.ai/screenshots/translations.png) A Norwegian value the health scan found in English, open in the key inspector. On the project's **Overview** page, findings are counted under **Needs you** as **Looks wrong**. **Review** opens them on the Translations page, where they are a group of their own with **Retranslate all**. In the key inspector, a finding says what is wrong and who wrote the value: - **Written by TolkBot**, with the date: a value TolkBot wrote and nobody changed since - **Written by a person in TolkBot**: a value someone wrote in the dashboard - **Not written by TolkBot**: the value was in the repository already, or was changed there Two buttons go with it: - **Retranslate** translates the key fresh from the source and saves the result as a draft for you to check and ship. A locked key can't be retranslated. - **This is fine** tells TolkBot the value is right. A wrong value that TolkBot wrote itself is also reported to the TolkBot team as a bug. --- ## This is fine **This is fine** dismisses the finding for that value. It is remembered for the exact source text and translation it was made on: as long as neither changes, TolkBot doesn't flag it again. When either one changes, the new pair is checked like any other. When TolkBot changes what the scan checks, it may judge the same strings again. A value you marked as fine stays dismissed through that. --- # Translation memory Source: https://docs.tolkbot.ai/docs/translation-memory TolkBot keeps every translation it writes, and serves an identical request from memory for free. --- ## Reusing translations TolkBot stores successful translations so an identical request can skip the AI call. The translation hash includes the source text, target locale, model, tone, relevant glossary terms, and learnings. A changed input produces a new hash. Translation memory is isolated by organization. Projects in the same organization can reuse an entry, but another organization cannot access it. A stored translation goes through the same [checks](https://docs.tolkbot.ai/docs/checks-and-review-pass) as a new one before it is used: placeholders, glossary terms, and the verifier's check of its language and meaning. An entry written before a check existed can't spread a mistake that way. Entries expire 365 days after their last use. Reusing an entry restarts that period. Deleting the organization removes all of its entries immediately. This is separate from translation job and task history, which is retained for 90 days. --- ## Learnings Translation memory reuses what TolkBot wrote. Learnings are how it uses what you corrected: a correction from a pull request comment or the dashboard is put in front of the model in later translations of the same project into the same language. They are listed on the project's **Context** page. See [Context](https://docs.tolkbot.ai/docs/context#learnings). A learning changes the request, so a key with a new relevant learning is a new entry in translation memory, not a hit on the old one. --- # Placeholders and plurals Source: https://docs.tolkbot.ai/docs/placeholders-and-plurals A placeholder the translation drops or changes breaks your app at runtime, and a plural short of a form shows the wrong word for some numbers. TolkBot checks both on every key it writes. --- ## Placeholders TolkBot reads the placeholders off each source string. There is no setting for the style, and it recognizes all of these: | Style | Example | | -------- | ----------------------------------------------- | | ICU | `{count, plural, one {1 item} other {# items}}` | | Mustache | `Hello {{name}}` | | Simple | `{variable}` | The model is told which placeholders the string has and that each must come back as it is. After translation, TolkBot compares the result with the source token by token: - **A changed brace count is repaired.** `{{name}}` that came back as `{name}` is put back as `{{name}}`. - **A dropped or invented placeholder is refused.** The key is translated again with the problem described to the model, and then by the stronger model. If all three attempts are refused, the key fails and nothing is written for it. ### Why the braces count The number of braces is part of a placeholder, not decoration. Under i18next, `{{name}}` is replaced with the value and `{name}` is printed as it is, so a translation that says `Hallo {name}` greets your user with the literal text `{name}`. TolkBot compares `{{name}}` and `{name}` as different placeholders for that reason. ### Translations from other places The same comparison runs on every value TolkBot writes, not only fresh translations: one served from [translation memory](https://docs.tolkbot.ai/docs/translation-memory), a fix from the [review pass](https://docs.tolkbot.ai/docs/checks-and-review-pass#review-pass), and a correction from [feedback in a pull request](https://docs.tolkbot.ai/docs/pull-request-feedback). When you edit a value in the dashboard, the key inspector warns when a placeholder is missing. For translations already in your repository, the [health scan](https://docs.tolkbot.ai/docs/health-scan) reports **Placeholders differ from the source**. To check in your own CI, run [`tolkbot validate`](https://docs.tolkbot.ai/docs/cli-validating), which uses the same comparison. --- ## ICU plurals An ICU plural takes the forms the target language needs, not the ones the source has. English needs `one` and `other`. Other languages need more, or fewer: | Language | Forms | | ----------------------- | -------------------------------------------- | | English, German, French | `one`, `other` | | Polish, Russian | `one`, `few`, `many`, `other` | | Arabic | `zero`, `one`, `two`, `few`, `many`, `other` | | Japanese, Korean | `other` | So from ```json { "files": "{count, plural, one {# file} other {# files}}" } ``` a Polish translation has four branches: ```json { "files": "{count, plural, one {# plik} few {# pliki} many {# plików} other {# pliku}}" } ``` TolkBot uses the plural rules your users' browsers use (Unicode CLDR) to decide which forms a language needs. A form a language uses only for fractions or for numbers of a million and up, like French `many`, is not required. A branch for a single number may say the number in words: Arabic `two {ملفان}` ("two files") without `#` is correct. The argument, `count` here, must stay the same, and so must the type, `plural` or `selectordinal`. ### A plural stays a plural Sometimes the target language doesn't need different words for one and many. Norwegian says "er" for both "isn't" and "aren't". The plural still stays, with the same word in each branch: ```json { "status": "{count, plural, one {Det er # feil} other {Det er # feil}}" } ``` TolkBot keeps it rather than folding it into the sentence, because it can't tell this case from a language that does need the forms. Polish needs `nie jest` and `nie są` in the same place. ### A plural short of a form A translation missing a form the language needs is flagged `plural_incomplete` and sent to the stronger model. If the value written still lacks a form, the pull request's **File checks** line says so. It is written anyway, since your library falls back to `other` rather than failing. --- ## i18next suffix plurals i18next can also keep a plural as one key per form, with the form as a suffix: ```json { "items_one": "{{count}} item", "items_other": "{{count}} items" } ``` It picks the key with the same plural rules as above, so the target file needs the target language's forms. TolkBot works that out from the base file: - A Polish file gets `items_one`, `items_few`, `items_many` and `items_other` from an English `items_one` and `items_other`. - A Japanese file gets `items_other` alone, and a missing `items_one` is not reported as missing. - `items_zero` is added when the base file has it. A form the base file has is translated from that form. A form only the target language has, such as `items_few`, is translated from `items_other`. When the source `items_other` changes, every form translated from it is updated too. These keys move as a group. Removing `items_other` from the base file removes all of the target's forms; see [Removed and renamed keys](https://docs.tolkbot.ai/docs/removed-and-renamed-keys). --- ## Locale codes Locale codes are matched however your files spell them: `pt-BR`, `pt_BR` and `ptBR` are the same language. A new file follows the spelling your other files use. In a TypeScript or JavaScript locale file, a code that isn't a valid name, like `pt-pt`, is exported as `ptPT`. See [Supported languages](https://docs.tolkbot.ai/docs/supported-languages). --- # For agents Source: https://docs.tolkbot.ai/docs/for-agents One page to point a coding agent at: when to run the TolkBot CLI, the commands it runs, the rules it follows, and what every output and exit code means. For what the CLI gives an agent, in short, see [TolkBot for coding agents](https://tolkbot.ai/for-agents). --- ## When to run it, and when not to With [automated pull requests](https://docs.tolkbot.ai/docs/automated-pull-requests) on, an agent has nothing to do. It adds strings to the base locale file and pushes, and TolkBot opens a pull request with the translations. Run the CLI when: - **The translations belong in the same pull request as the feature.** Translate before committing, and the feature ships in every language at once. - **You want to check what an agent wrote.** `tolkbot validate` catches a dropped placeholder or a broken file, offline, before the commit. --- ## The loop After adding or changing strings in the base locale file, run these in the directory that holds `tolkbot.json`: ```shell # What each language needs npx tolkbot status # Translate what is missing or changed, and write it into the locale files npx tolkbot translate --all # Check the files npx tolkbot validate ``` Then commit the locale files with the rest of the change. None of the commands prompts without a terminal, and each prints JSON there, so an agent reads the result instead of parsing text. `translate` waits for each language and writes it into its file before starting the next. It exits `0` when every language succeeded or was already up to date. `validate` exits `0` when it found no errors; its warnings, such as a language that is still missing keys, are in the report. See [Commands](https://docs.tolkbot.ai/docs/cli-commands) for every option. --- ## The rules - **Never write a translation by hand when `translate` can.** `translate` applies the project's glossary, its learnings and its translation memory, and records each value so the next run knows it is up to date. A hand-written value has none of that. - **Correct a translation with `tolkbot set`.** It writes the value, checks its placeholders against the source, and records it as written by a person, so TolkBot keeps it until the source text changes. `--learn` saves a learning, so later translations follow it: ```shell npx tolkbot set common.save --locale nb --value "Lagre" --learn "Lagre, not Spare: it stores a file" ``` - **Never change a key a person holds.** A key someone locked, or has an unsubmitted draft for in the dashboard, is theirs. `translate` leaves it out on its own; `tolkbot status --keys` lists them under `heldByPerson`, and an agent leaves those alone too. --- ## Instructions for your agent Paste this into `AGENTS.md` or `CLAUDE.md`: ```markdown ## Translations TolkBot translates this project. Run its commands in the directory that holds `tolkbot.json`. - Add new strings to the base locale file only. Never write the other locale files by hand. - After changing strings, run `npx tolkbot status` and `npx tolkbot translate --all`, then `npx tolkbot validate` before committing. - To correct a translation, run `npx tolkbot set --locale --value "" --learn ""`. TolkBot keeps the value and learns from the note. - Leave every key alone that `npx tolkbot status --keys` lists as held by a person. - More: https://docs.tolkbot.ai/docs/for-agents ``` `tolkbot init` offers to write it for you at the end of setup. Without a terminal it writes it only when asked: ```shell npx tolkbot init --agents-file ``` It goes into the nearest `AGENTS.md`, or `CLAUDE.md` where there is no `AGENTS.md`, or a new `AGENTS.md` at the repository root; pass a path to choose the file. The block sits between `` and ``, so running `init` again replaces it instead of adding a second copy. --- ## Logging in `validate`, `telemetry` and `--help` need no login and no network. Every other command talks to TolkBot and needs a token. On your own machine, run `tolkbot auth login` once and every agent session there uses the token it stores. An agent can also start the login itself: without a terminal, `tolkbot auth login` prints the URL and a verification code as plain lines for the agent to pass to you. In CI or a sandbox, set `TOLKBOT_TOKEN` to the contents of `~/.tolkbot/token` from a machine where you logged in. That token is a session for you, not for a project: it lasts 30 days, and anything holding it can act as you in every organization you belong to. In its last 3 days every command prints a warning on stderr. If it leaks, `tolkbot auth logout --all` signs out every CLI session at once. See [Installation and login](https://docs.tolkbot.ai/docs/cli-installation#your-token). --- ## Output contract When stdin or stdout is not a terminal, nothing prompts and nothing waits for input. Each command takes its defaults (`init` behaves as if `--yes` was given), and every command that has `--json` prints JSON without being asked; `--no-json` prints text instead. The JSON each command prints is on [Commands](https://docs.tolkbot.ai/docs/cli-commands). Under JSON, stdout holds the result and nothing else. Warnings, and anything a child process prints, go to stderr. A failure goes to stderr in one shape: ```json { "error": { "code": "not_authenticated", "message": "Not logged in.", "hint": "Run 'tolkbot auth login', or set $TOLKBOT_TOKEN for CI." } } ``` `code` is a stable string to branch on; codes are added, never renamed. `hint` says what to do, and is `null` when there is nothing to suggest. The exit code says which kind of failure it was: | Exit | Meaning | Codes | | ---- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `0` | Success | | | `1` | The command ran and the result is a failure | `failed`, `internal`, `no_config`, `project_not_found`, `repository_not_connected`, `no_translation_files`, `no_target_languages`, `not_found`, `job_not_found`, `job_not_finished`, `job_failed`, `job_cancelled`, `job_timed_out`, `nothing_to_apply`, `validation_failed`, `login_failed`, `repository_path_claimed`, `repository_path_in_use`, `key_not_found`, `placeholder_mismatch` | | `2` | Usage: an unknown or missing flag, or a choice to make that has no safe default | `usage`, `unsupported_locale`, `ambiguous_project`, `ambiguous_term` | | `3` | Not logged in, or not allowed | `not_authenticated`, `token_expired`, `token_rejected`, `signed_out`, `project_archived`, `admin_required` | | `4` | Billing | `no_subscription`, `out_of_credits`, `payment_failed`, `project_limit_reached` | | `5` | Could not reach TolkBot | `network` | Some commands report a result and a failure together. `validate` prints its report on stdout and exits `1` when it found an error; `translate` prints every language on stdout, then the failure on stderr, when a job failed. `status --exit-code` exits `1` when a language needs translating. --- ## For the agent's tools The whole documentation is also served as plain Markdown, for an agent that reads the web: - [`/llms.txt`](https://docs.tolkbot.ai/llms.txt) lists every page. - [`/llms-full.txt`](https://docs.tolkbot.ai/llms-full.txt) is every page in one file. --- # Installation and login Source: https://docs.tolkbot.ai/docs/cli-installation Install the TolkBot CLI to translate files directly from your terminal. --- ## Install Install TolkBot globally with your package manager: ```shell npm install -g tolkbot ``` Or run it directly with `npx` without installing: ```shell npx tolkbot --help ``` > **Requirements** > > TolkBot requires Node.js 22.22.0 or later. --- ## Authenticate Log in to connect the CLI to your TolkBot account: ```shell tolkbot auth login ``` This opens your browser for authentication. After confirming, a token is saved locally at `~/.tolkbot/token`, readable only by your user. ### Your token The token is a session for you, not for a project or a machine. It lasts 30 days, and anything holding it can act as you in every organization you belong to: start translation runs that spend credits, and change or delete projects. Treat it like a password. If it leaks, or a machine that holds it is gone, sign out every CLI session: ```shell tolkbot auth logout --all ``` Or, from a browser, use **Sign out all CLI sessions** on your [profile page](https://tolkbot.ai/profile). Either way, every CLI token issued until then is refused on its next call, on every machine and in every CI secret. Your dashboard session keeps working, and a new `tolkbot auth login` gets a token that works. Removing someone from your organization also cuts their token off from it. ### On a machine with no browser If TolkBot can't launch a browser (a container, or a remote host over SSH), print the URL instead: ```shell tolkbot auth login --no-browser ``` The browser you open it in must be able to reach the CLI's machine on `localhost`, so forward the callback port when working remotely. Without a terminal, for example when an agent runs the command, TolkBot prints the URL and the verification code as plain lines as soon as it has them, so the agent can pass them to you. ### Verify your session ```shell tolkbot auth whoami ``` This displays your logged-in email, where the token came from, and how many days it has left. With `--json`, `expiresAt` and `expiresInSeconds` say the same. ### Log out ```shell tolkbot auth logout ``` Removes the token stored on this machine. The token itself stays valid until it expires, so a copy elsewhere, such as a CI secret, keeps working. To end every copy, use `tolkbot auth logout --all` ([Your token](#your-token)). > **TOLKBOT_TOKEN wins over the stored token** > > If `TOLKBOT_TOKEN` is set in your environment, logging out does not deauthenticate the CLI — the environment variable still takes precedence. Unset it as well. --- ## CI and headless environments `tolkbot validate` runs offline and needs no token, so a CI step that only checks your translation files needs no setup: ```yaml # .github/workflows/translations.yml - name: Validate translations run: npx tolkbot validate ``` Commands that talk to TolkBot, such as `translate`, `glossary` and `learnings`, need a token. Interactive login needs a browser, so CI reads it from the environment instead: ```yaml - name: Check what needs translating env: TOLKBOT_TOKEN: ${{ secrets.TOLKBOT_TOKEN }} run: npx tolkbot translate --dst fr --dry-run ``` Generate the token by running `tolkbot auth login` on your own machine, then copying the contents of `~/.tolkbot/token` into your CI secret store. It is your session and lasts 30 days ([Your token](#your-token)), so the secret needs refreshing about once a month. ### Token resolution order TolkBot uses the first token it finds: | Priority | Source | Typical use | | -------- | ------------------ | ---------------------- | | 1 | `--token ` | One-off runs, scripts | | 2 | `$TOLKBOT_TOKEN` | CI, agents, containers | | 3 | `~/.tolkbot/token` | Your local machine | The `--token` flag works with every command, before or after it: ```shell tolkbot --token "$MY_TOKEN" translate --dst fr ``` > **Tokens expire** > > A token lasts 30 days. In its last 3 days, every command prints a one-line warning on stderr; `--json` output on stdout is unchanged. When it runs out, TolkBot says so and tells you which source it came from, rather than failing with an opaque authentication error. Re-run `tolkbot auth login` and refresh your CI secret. --- ## Output for scripts and agents Without a terminal, as in CI or when a coding agent runs a command, nothing prompts and every command that has `--json` prints JSON. A failure prints one error shape on stderr, and the exit code says what kind of failure it was. The codes, and what an agent runs after adding a string, are on [For agents](https://docs.tolkbot.ai/docs/for-agents#output-contract). --- ## What's next - [Set up a project](https://docs.tolkbot.ai/docs/cli-project-setup) with `tolkbot init` - [Start translating](https://docs.tolkbot.ai/docs/cli-translating) with `tolkbot translate` - [Every command](https://docs.tolkbot.ai/docs/cli-commands), with its options and output --- ## Telemetry The CLI reports anonymous usage so we know which commands are used and which fail. Each run sends one event with the command name (for example `jobs apply`), whether it succeeded, how long it took, and the CLI, Node.js and operating system versions. It never sends arguments, file paths, file contents, translation strings or repository names. When you are logged in, the event is tied to your account so it lines up with what you do in the dashboard. Otherwise it uses a random identifier stored in `~/.tolkbot/anonymous-id`. Turn it off on a machine: ```shell tolkbot telemetry off ``` Or with an environment variable, which also works in CI and overrides the stored preference: ```shell TOLKBOT_TELEMETRY=0 tolkbot validate ``` The CLI also honours the [`DO_NOT_TRACK`](https://consoledonottrack.com) convention. `tolkbot telemetry status` shows the current state and which setting decided it. --- # Project setup Source: https://docs.tolkbot.ai/docs/cli-project-setup Set up TolkBot in your project with the `init` command: interactively at a terminal, and without prompts in CI and agent sandboxes. --- ## Initialize your project Run the init command in the directory your app lives in: the repository root for a single app, the app's own directory in a monorepo: ```shell tolkbot init ``` The wizard will: 1. Detect your project type (Next.js, React, Vue, Expo, etc.) 2. Detect your i18n framework (next-intl, react-i18next, vue-i18n, etc.) 3. Locate existing locale files and infer the directory structure 4. Determine your base language (defaults to `en` if found) 5. Link the TolkBot project for this directory, or create one, which reads the repository on GitHub to find the file pattern for your locale files 6. Create a `tolkbot.json` configuration file in the project's directory 7. Offer to add [instructions for coding agents](https://docs.tolkbot.ai/docs/for-agents#instructions-for-your-agent) to your `AGENTS.md` or `CLAUDE.md` Finding the file pattern takes a few seconds, and up to a minute or two in a large repository. `init` waits for it. If TolkBot finds no locale files, `init` exits `1` and prints a link to the project's settings, where you set the pattern by hand; then run `tolkbot init` again. ### Overwrite existing config If you already have a `tolkbot.json` and want to re-initialize: ```shell tolkbot init --force ``` Run beside an existing `tolkbot.json`, `--force` links the project that file names again and rewrites it in place, which is how you refresh its file pattern after changing it in the dashboard. --- ## In a monorepo A repository can hold one TolkBot project per app, each with its own directory (its subpath) and file pattern. `init` picks the project from the directory you run it in: - Inside an app's directory, or anywhere below it, it links the project whose directory holds yours. - With no project there, it creates one for the directory you are in. - Where several projects sit below you, such as at the root of a repository with `apps/web` and `apps/docs`, it asks which one at a terminal. Without a terminal, or with `--yes`, it exits `2` with the code `ambiguous_project` and lists them. `--project ` picks one by its slug instead, wherever you run it: ```shell tolkbot init --yes --project web ``` ```shell $ cd my-monorepo && tolkbot init --yes < /dev/null { "error": { "code": "ambiguous_project", "message": "This directory holds 2 TolkBot projects: docs (apps/docs), web (apps/web).", "hint": "Run 'tolkbot init' in the app's directory, or pass --project ." } } ``` A repository path belongs to one organization at a time. When another organization manages the directory, `init` exits `1` with `repository_path_claimed`; when an archived project of yours still holds it, with `repository_path_in_use` and a link to that project. --- ## Without prompts In CI, a container or an agent sandbox there is no terminal to ask questions in, so `init` accepts everything detection found and prints the result as JSON. At a terminal, `--yes` does the same without the wizard: ```shell tolkbot init --yes ``` Override any individual guess: ```shell tolkbot init --yes \ --base en \ --targets nb,es,pt-BR \ --framework next-intl ``` Every option is under [`init`](https://docs.tolkbot.ai/docs/cli-commands#init) on the Commands page. > **--install is opt-in** > > The interactive wizard offers to install an i18n library when it doesn't find > one. Non-interactively that would mutate your lockfile and scaffold source > files as a side effect of what reads like a config command, so it only happens > if you ask for it. `init` needs a TolkBot account. Without a login it exits `3` before it does anything, and says how to log in: ```shell $ tolkbot init < /dev/null { "error": { "code": "not_authenticated", "message": "tolkbot init needs a TolkBot account, and this machine is not logged in.", "hint": "Run 'tolkbot auth login', which opens tolkbot.ai in a browser to sign in with GitHub, or set $TOLKBOT_TOKEN in CI. ..." } } ``` ### Machine-readable output ```shell tolkbot init --json ``` ```json { "projectId": "k57a...", "project": "web", "repositoryId": "j93b...", "repository": "acme/app", "framework": "next-intl", "subpath": "apps/web", "sourcePattern": "messages/{locale}.json", "config": "/home/me/acme/app/apps/web/tolkbot.json", "baseLocale": "en", "targets": ["nb", "es"], "createdProject": true, "installed": false, "agentsFile": null } ``` `project` is the project's slug, the value `--project` takes, and `config` is the `tolkbot.json` init wrote. `createdProject` is `false` when init linked to a project that already existed for the repository. `agentsFile` says where the [agent instructions](https://docs.tolkbot.ai/docs/for-agents#instructions-for-your-agent) went, with `--agents-file`. `sourcePattern`, `baseLocale` and `targets` are the project's settings after detection, which may fill in what you left out. A failure prints the [error shape](https://docs.tolkbot.ai/docs/for-agents#output-contract) on stderr and exits with its code. ### Prerequisites Non-interactive or not, `init` needs two things it can't do for you: - A GitHub remote on the repository (`git remote get-url origin`) - The [TolkBot GitHub App](https://github.com/apps/tolkbot) installed with access to that repository Both failures name the missing step. --- ## Languages `init` takes the target languages it finds in the repository. A repository with only a base file has none, so add them from the terminal: ```shell tolkbot languages add nb de ``` Each language is added to the project and set up the same way as with **Add language** in the dashboard (see [Adding a language](https://docs.tolkbot.ai/docs/adding-a-language)). `--existing` says what happens to translations the repository already has for it: | Option | Description | | ------------------- | ---------------------------------------------------------------------------------------------------------- | | `--existing trust` | Keep them as written by a person, so TolkBot does not translate them again unless asked. The default | | `--existing review` | Keep them in the files and flag each one for you to confirm on the [Translations](https://docs.tolkbot.ai/docs/translations) page | | `--json` | Output the result as JSON (the default without a terminal) | `languages add` changes the project only. It prints the next step: `tolkbot translate --dst nb` fills the files now, and with [automated pull requests](https://docs.tolkbot.ai/docs/automated-pull-requests) on, the next push that changes the base file opens a pull request. Codes are the ones on [Supported languages](https://docs.tolkbot.ai/docs/supported-languages), in any spelling (`pt-BR`, `pt_BR`). A language already on the project changes nothing and exits `0`. An unsupported code exits `2` with the code `unsupported_locale` and names the closest supported codes. If setting up a language fails, the command prints what it did and exits `1`; running it again retries. ```json { "project": { "name": "Web", "slug": "web" }, "existing": "trust", "changed": true, "languages": [ { "locale": "nb", "outcome": "added" }, { "locale": "de", "outcome": "unchanged", "setup": "set-up" } ], "targetLanguages": ["de", "nb"], "next": { "translate": ["tolkbot translate --dst nb"], "pullRequestOnPush": true } } ``` `outcome` is `added`, `set_up` (it was on the project but not set up), `unchanged` or `failed` (with `error`). Removing a language is done in the dashboard's project settings. ### List them ```shell tolkbot languages list ``` Prints the base language and each target language, whether it is set up, and the files the project's pattern maps it to in this working tree, marked when the file does not exist yet. --- ## Configuration file `init` writes `tolkbot.json` in the project's directory: the repository root, or the app's directory in a monorepo. Every command looks for it in the directory it runs in and then in each parent, so commands run anywhere inside the app find it. ```json { "projectId": "your-project-id", "framework": "next-intl", "subpath": "apps/web", "sourcePattern": "messages/{locale}.json" } ``` ### Fields | Field | Description | | --------------- | --------------------------------------------------------------------------------- | | `projectId` | Your project ID from the TolkBot dashboard (required) | | `framework` | The i18n framework your project uses (required) | | `subpath` | The project's directory in the repository, `""` at the root | | `sourcePattern` | The project's file pattern, relative to `subpath`, as it was when `init` last ran | `subpath` and `sourcePattern` pin the files the project reads, so [`tolkbot validate`](https://docs.tolkbot.ai/docs/cli-validating) checks exactly those files, with no login and no network, and ignores fixtures, examples and other apps' files. The project's settings stay the source of truth: `translate` and the other commands that talk to TolkBot read the pattern from the project, and print one warning line when it differs from the file, naming `tolkbot init --force` to refresh it. A `tolkbot.json` from before these fields still works; `validate` then scans the directory for locale files, and says to run `tolkbot init --force` to pin the pattern. ### Supported framework values | Value | Framework | | --------------- | ------------------------ | | `next-intl` | Next.js with next-intl | | `react-i18next` | React with react-i18next | | `i18next` | i18next (vanilla) | | `expo` | Expo / React Native | | `vue-i18n` | Vue.js with vue-i18n | | `custom` | Custom setup | --- ## Auto-detection TolkBot automatically detects your project setup by examining: - **Package manager** — npm, yarn, or pnpm - **Framework dependencies** in `package.json` - **Existing i18n configuration** files - **Locale file locations** in common directories (`locales/`, `messages/`, `public/locales/`, `i18n/`) ### Detected locale patterns | Framework | Default pattern | | ------------- | ------------------------------------- | | next-intl | `messages/{locale}.json` | | react-i18next | `public/locales/{locale}/common.json` | | i18next | `locales/{locale}.json` | | expo | `locales/{locale}.json` | | vue-i18n | `locales/{locale}.json` | | custom | `locales/{locale}.json` | --- ## What's next - [Add a language](#languages) with `tolkbot languages add` - [Start translating](https://docs.tolkbot.ai/docs/cli-translating) with `tolkbot translate` - [Validate your setup](https://docs.tolkbot.ai/docs/cli-validating) with `tolkbot validate` --- # Translating Source: https://docs.tolkbot.ai/docs/cli-translating `tolkbot status` shows what each language needs. `tolkbot translate` translates what is missing or changed and writes the results into your locale files. `tolkbot jobs` is for the jobs it runs. --- ## Status See where every target language stands, in one call: ```shell tolkbot status ``` ``` Web (web) https://tolkbot.ai/projects/web Base language en, files messages/{locale}.json, auto-create pull requests on Credits left: 48210 • fr: 120 expected, 108 up to date, 9 missing, 2 changed since translated 1 held by a person (1 locked) Pull request: https://github.com/acme/web/pull/42 ✓ de: 120 expected, 120 up to date, 0 missing, 0 changed since translated ``` For each language it reports the keys the files should hold, how many are up to date, missing or changed since TolkBot translated them, the keys a person holds (locked, or with a pending draft), the changed keys a person wrote and TolkBot keeps, the untracked translations, and the open TolkBot pull request. It reads your working tree as it is now and decides with the same rules as `translate`, so its counts match `translate --dry-run`. It changes nothing. `status` needs a login. Without one, `tolkbot validate` checks your files on your machine. Options: [`status`](https://docs.tolkbot.ai/docs/cli-commands#status). Keys are listed by name only with `--keys`, and source strings never, so the output stays small. `status` exits `0` whenever it could read the status, whatever the status is; `--exit-code` is for scripts that should fail while a language needs translating. --- ## Translate Translate one language: ```shell tolkbot translate --dst fr ``` Or every target language in the project settings: ```shell tolkbot translate --all ``` For each language, `translate` works out what needs translating, starts a job, waits for it, and writes the results into the locale file. Each language is in its file before the next one starts. With a terminal it prints one line per language as it finishes: ``` ✓ fr: 12 translated, 12 written to 1 file(s) ✓ de: up to date ⚠ ja: 11 of 12 translated, 1 failed, 11 written to 1 file(s) ``` Without a terminal it prints one JSON object at the end, with the job ID, the counts, what was written and what was not applied for each language. See [Output contract](https://docs.tolkbot.ai/docs/for-agents#output-contract). ### Options Every option is under [`translate`](https://docs.tolkbot.ai/docs/cli-commands#translate) on the Commands page. > **Either --dst or --all** > > You must provide either `--dst` or `--all`, but not both. ### What counts as work `translate` reads the files your project settings describe (the source pattern and subpath from the dashboard), so the CLI, the GitHub App and the dashboard all look at the same files. A key needs translating when: - **It is missing** from the target file. - **Its source changed** since TolkBot translated it. TolkBot remembers the source text each translation was made from, and compares the file against that record, never against the translation itself. A translation TolkBot has no record of, such as one written by hand before the project was set up, is **untracked**. It is kept as it is and counted in the summary. To tell TolkBot those translations are good, run `tolkbot translate adopt`; to replace them, translate with `--retranslate-untracked`. Keys a person holds in the dashboard, locked or with a pending draft, are left out and listed separately. ### What is not written Before writing a result, `translate` checks it against the file as it is now. A result is not applied, and is listed with the reason, when its source text changed after the job started, or when the target key was edited in the meantime. Those results do not fail the run. Written values are recorded as TolkBot's, so the next run knows they are up to date. ### Exit codes `translate` exits `0` when every language succeeded, was up to date, or finished with some keys failed. It exits `1` when a job failed or was cancelled, from the dashboard or with `tolkbot jobs cancel`. A cancelled job also stops the run: the languages after it are not started. A failed job's translated keys are still written. When TolkBot refuses a job because the organization is out of credits or has no subscription, the run stops there and exits `4`. Languages already finished stay in their files. After an hour `translate` stops waiting for a job, prints its ID and exits `1`; the job keeps running, and `tolkbot jobs apply` picks it up when it finishes. --- ## Dry run See what a run would do without starting anything: ```shell tolkbot translate --all --dry-run ``` For each language this prints how many keys a run would translate, how many characters they hold, and what was left out and why. It reads your files and TolkBot, and changes neither. With `--json`, each language lists the keys by name with the reason each needs translating (`missing`, `changed` or `untracked`). Source strings are left out unless you pass `--verbose`. The dry run also prints your organization's credit balance. TolkBot does not estimate the credits a run will use yet; the key and character counts are what a run would send. --- ## Without waiting ```shell tolkbot translate --all --no-wait ``` Starts a job for each language that needs one, prints the job IDs, and returns. Nothing is written to your files until you apply the jobs: ```shell tolkbot jobs list tolkbot jobs apply ``` --- ## Adopt Record the translations TolkBot has no record of as reviewed: ```shell tolkbot translate adopt --dst fr ``` From then on they are kept until their source text changes, like any translation TolkBot wrote. A key that already has a record is left alone. Options: [`translate adopt`](https://docs.tolkbot.ai/docs/cli-commands#translate-adopt). --- ## Set a translation yourself When you know what a key should say, write it with `tolkbot set`: ```shell tolkbot set common.save --locale nb --value "Lagre endringer" ``` The key is named the way the dashboard names it: on a project with one file per namespace (`locales/nb/common.json`), the namespace comes first. `set` finds the file through the project's source pattern, like `translate` does, and writes JSON and TypeScript files in the formatting they already have. A locale file that does not exist yet is created. Before writing, `set` compares the value's placeholders with the source text's. A value that drops, adds or misspells one is refused, with the placeholder named; when only the braces drifted (`{name}` for `{{name}}`), the error suggests the repaired value. `--force` writes the value anyway. The value is recorded as yours, with the current source text as its baseline. `translate` and the GitHub App keep it until that source text changes, and the dashboard shows it as written by a person. To tell TolkBot why, and have later translations follow it, add a learning with `--learn`: ```shell tolkbot set nav.home --locale nb --value "Oversikt" \ --learn "Oversikt is the app's word for the start page, not Dashbord" ``` Options: [`set`](https://docs.tolkbot.ai/docs/cli-commands#set). --- ## Jobs Every language `translate` starts is a job with an ID. The `jobs` commands work on those. ### List ```shell tolkbot jobs list ``` The project's recent jobs, newest first, with their status and whether their results are in your working tree: `applied`, or `waiting to apply` with the number of keys. Jobs from the GitHub App and the dashboard are delivered through a pull request, so they say neither. `--limit ` lists more than the default 20. ### Show ```shell tolkbot jobs show ``` A job's status, its progress, the credits it used and whether it is applied. It exits `1` for a failed or cancelled job. ### Apply ```shell tolkbot jobs apply […] ``` Writes finished jobs' results into your locale files, with the same checks `translate` makes. Without an ID it takes the finished jobs whose results are not in your files yet, one per language, so `translate --all --no-wait` followed by `jobs apply` applies every language. When nothing is waiting, `jobs apply` exits `1` with `nothing_to_apply`. When one language has more than one job waiting, it does not choose: at a terminal it lets you pick, and without one it exits `2` and lists the jobs with their IDs. It never waits for input without a terminal. ### Cancel ```shell tolkbot jobs cancel ``` --- ## For an agent What a coding agent runs after adding keys to the base locale, the rules it follows and what each exit code means are on [For agents](https://docs.tolkbot.ai/docs/for-agents). --- # Commands Source: https://docs.tolkbot.ai/docs/cli-commands Every command the TolkBot CLI has, with its options, an example and what it prints with `--json`. This page is generated from the CLI's own command definitions, so it lists exactly what `tolkbot --help` does. Without a terminal every command that has `--json` prints JSON; a failure prints one error shape on stderr and exits with a code that says what kind of failure it was. Both are on [For agents](https://docs.tolkbot.ai/docs/for-agents#output-contract). --- ## auth Authenticate with TolkBot. ### auth login Log in to TolkBot. ```shell tolkbot auth login [options] ``` | Option | Description | | -------------- | --------------------------------------------------------------------- | | `--no-browser` | Print the login URL instead of opening a browser (for headless hosts) | Opens tolkbot.ai in a browser to sign in with GitHub, and stores a token in `~/.tolkbot/token`. Without a terminal it prints the URL and the verification code as plain lines, so an agent can pass them on. See [Installation and login](https://docs.tolkbot.ai/docs/cli-installation). Example: ```shell tolkbot auth login ``` ### auth logout Log out of TolkBot. ```shell tolkbot auth logout [options] ``` | Option | Description | | ----------- | ------------------------------------------------------------------------ | | `--all` | Sign out every CLI session on every machine, then remove the local token | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | Without `--all`, only the token on this machine is removed, and a copy elsewhere keeps working until it expires. `warning` is added when `$TOLKBOT_TOKEN` is still set. Example: ```shell tolkbot auth logout --all ``` With `--json`, the default without a terminal: ```json { "loggedOut": true, "hadStoredToken": true, "envTokenStillSet": false, "signedOutAllCliSessions": true, "signedOutAt": "2026-11-14T15:40:00.000Z" } ``` ### auth whoami Show the current authenticated user. ```shell tolkbot auth whoami [options] ``` | Option | Description | | ----------- | ---------------------------------------------- | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | `tokenSource` is `flag`, `env` or `file`. Example: ```shell tolkbot auth whoami ``` With `--json`, the default without a terminal: ```json { "authenticated": true, "email": "you@example.com", "tokenSource": "env", "tokenPath": "/home/you/.tolkbot/token", "expiresAt": "2026-12-14T15:38:34.000Z", "expiresInSeconds": 2591987 } ``` --- ## init Initialize TolkBot in the current repo. ```shell tolkbot init [options] ``` | Option | Description | | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--force` | Overwrite existing config | | `-y`, `--yes` | Skip all prompts, accepting detected settings (the default without a terminal) | | `--json` | Output the result as JSON (implies --yes), the default without a terminal | | `--base ` | Base locale (default: detected, else en) | | `--targets ` | Comma-separated target locales (default: detected) | | `--framework ` | next-intl\|react-i18next\|i18next\|expo\|vue-i18n\|custom (default: detected) | | `--install` | Also install i18n dependencies and scaffold files. Off by default when non-interactive. | | `--project ` | Link this project. Default: the project whose directory you are in, else a new project here. | | `--agents-file [path]` | Add TolkBot's instructions for coding agents to this file, by default the nearest AGENTS.md or CLAUDE.md. At a terminal init asks; otherwise it writes them only with this option | | `--no-json` | Output text, even without a terminal | Links the directory to a TolkBot project and writes `tolkbot.json`; see [Project setup](https://docs.tolkbot.ai/docs/cli-project-setup). `agentsFile` is `null` unless the [agent instructions](https://docs.tolkbot.ai/docs/for-agents#instructions-for-your-agent) were written; `change` is `created`, `added`, `updated` or `unchanged`. Example: ```shell tolkbot init --yes --agents-file ``` With `--json`, the default without a terminal: ```json { "projectId": "n978qkc0arw5z7vsenm4mea83x8j647t", "project": "web", "repositoryId": "nd798f2a21jd1qx352g9n7h6vn8j6m1b", "repository": "acme/app", "framework": "next-intl", "subpath": "apps/web", "sourcePattern": "messages/{locale}.json", "config": "/home/you/acme/app/apps/web/tolkbot.json", "baseLocale": "en", "targets": ["es", "nb"], "createdProject": false, "installed": false, "agentsFile": { "path": "/home/you/acme/app/AGENTS.md", "change": "added" } } ``` --- ## status Show what each language is missing, what waits for a person, the open pull requests and the credits left. ```shell tolkbot status [options] ``` | Option | Description | | ------------- | ---------------------------------------------------- | | `--keys` | List the keys by name under each language | | `--exit-code` | Exit 1 when any language has missing or changed keys | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | `keys` is there only with `--keys`, and lists key names, never source strings. `status` changes nothing, and its counts match `translate --dry-run`. Example: ```shell tolkbot status --keys ``` With `--json`, the default without a terminal: ```json { "project": { "name": "Web", "slug": "web", "url": "https://tolkbot.ai/projects/web", "baseLanguage": "en", "pattern": "messages/{locale}.json", "autoCreatePR": true }, "credits": { "balance": 48210 }, "languages": [ { "locale": "nb", "expected": 120, "upToDate": 108, "missing": 9, "changed": 2, "heldByPerson": { "total": 1, "byReason": { "locked": 1 } }, "keptForPerson": { "total": 0, "byReason": {} }, "untracked": 0, "pullRequest": { "number": 42, "url": "https://github.com/acme/app/pull/42" }, "keys": { "missing": ["settings.title", "settings.save"], "changed": ["nav.home", "nav.help"], "heldByPerson": [ { "key": "billing.title", "reason": "locked" } ], "keptForPerson": [], "untracked": [] } } ] } ``` --- ## translate Translate what is missing or changed, and write the results into your locale files. ```shell tolkbot translate [options] [command] ``` | Option | Description | | ------------------------- | ---------------------------------------------------------------------------------------------- | | `--src ` | Source locale (defaults to the project's base language) | | `--dst ` | Destination locale | | `--all` | Every target language | | `--dry-run` | Print what a run would translate, and start nothing | | `--no-wait` | Start the jobs and print their IDs without waiting; apply them later with 'tolkbot jobs apply' | | `--retranslate-untracked` | Also retranslate translations TolkBot has no record of (kept by default) | | `--verbose` | With --dry-run, include each key's source string | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | Pass `--dst` or `--all`. Each language's `status` is a job's (`succeeded`, `failed`, `cancelled`, …), or `up-to-date`, `started` (with `--no-wait`), `timed-out` or `not-started`. `notApplied` lists results the files had moved on from, with the reason. With `--dry-run` the output is the plan instead: `dryRun: true`, and per language the keys a run would send, each with `reason` `missing`, `changed` or `untracked`. See [Translating](https://docs.tolkbot.ai/docs/cli-translating) for what counts as work. Example: ```shell tolkbot translate --all ``` With `--json`, the default without a terminal: ```json { "srcLocale": "en", "languages": [ { "dstLocale": "nb", "status": "succeeded", "jobId": "p57adftz694cm970tjnmgqtykd8j77h9", "keys": 11, "completed": 11, "failed": 0, "written": { "files": 1, "keys": 11 }, "notApplied": [], "error": null, "plan": { "totalKeys": 120, "missing": 9, "changed": 2, "untracked": 0, "protected": {}, "held": 1, "upToDate": 108, "protectedKeys": [], "heldKeys": [ { "key": "billing.title", "reason": "locked" } ], "untrackedKeys": [] } } ] } ``` ### translate adopt Record existing translations TolkBot has no baseline for as reviewed, so they are kept until their source changes. ```shell tolkbot translate adopt [options] ``` | Option | Description | | ---------------- | ------------------------------------------------------- | | `--src ` | Source locale (defaults to the project's base language) | | `--dst ` | Destination locale | | `--all` | Every target language | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | Records the translations TolkBot has no record of as reviewed, so they are kept until their source text changes. Example: ```shell tolkbot translate adopt --dst nb ``` With `--json`, the default without a terminal: ```json { "adopted": [ { "dstLocale": "nb", "untracked": 762, "adopted": 762, "skipped": 0 } ] } ``` --- ## set Write a translation yourself; TolkBot keeps it until its source text changes. ```shell tolkbot set [options] ``` | Option | Description | | ------------------- | ---------------------------------------------------------------------------------------------- | | `--locale ` | Target locale (e.g. nb) **Required.** | | `--value ` | The translation **Required.** | | `--force` | Write the value even when its placeholders do not match the source | | `--learn ` | Also store a learning for the project, e.g. "use Oversikt, not Dashbord: it is the app's word" | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | The key is named as the dashboard names it: namespace first on a project with a file per namespace. A value whose placeholders do not match the source is refused with `placeholder_mismatch`, and the hint suggests the repaired value when only the braces drifted. The value is recorded as written by a person and kept until its source text changes. Example: ```shell tolkbot set common.save --locale nb --value "Lagre" --learn "Lagre, not Spare: it stores a file" ``` With `--json`, the default without a terminal: ```json { "key": "common.save", "locale": "nb", "file": "messages/nb.json", "value": "Lagre", "previous": "Spare", "source": "Save", "placeholderProblems": [], "incompletePlurals": [], "learningId": "k17bq2c4d6f8g0h2j4k6m8n0p2r4s6t8" } ``` --- ## validate Validate translation files and configuration. ```shell tolkbot validate [options] ``` | Option | Description | | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | | `--json` | Output the report as JSON, the default without a terminal | | `--strict` | Treat warnings (incomplete locales) as errors. Off by default, since a locale is normally behind the base while a translation job is in flight. | | `--no-json` | Output text, even without a terminal | Needs no login and no network. Exits `1` on an error, or on a warning under `--strict`; the report is on stdout either way. See [Validate in CI](https://docs.tolkbot.ai/docs/cli-validating) for the checks. Example: ```shell tolkbot validate --strict ``` With `--json`, the default without a terminal: ```json { "valid": false, "strict": false, "stats": { "filesChecked": 12, "totalKeys": 340, "format": "json", "baseLocale": "en", "locales": ["en", "es", "nb"], "pattern": "messages/{locale}.json" }, "counts": { "error": 1, "warning": 1, "info": 0 }, "issues": [ { "level": "error", "rule": "placeholder-mismatch", "message": "\"cart.total\" in \"nb\": \"{count}\" is missing from the translation (relative to \"en\").", "file": "messages/nb.json", "locale": "nb", "key": "cart.total" } ] } ``` --- ## languages List the project's languages and add target languages. ### languages list The base language and the target languages, with the files each one maps to and whether they exist. ```shell tolkbot languages list [options] ``` | Option | Description | | ----------- | ---------------------------------------------- | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | Example: ```shell tolkbot languages list ``` With `--json`, the default without a terminal: ```json { "project": { "name": "Web", "slug": "web" }, "pattern": "messages/{locale}.json", "base": { "locale": "en", "name": "English", "files": [ { "path": "messages/en.json", "exists": true } ] }, "targets": [ { "locale": "nb", "name": "Norwegian Bokmål", "setup": "set-up", "files": [ { "path": "messages/nb.json", "exists": true } ] } ] } ``` ### languages add Add target languages to the project and set them up, as the dashboard's Add language dialog does. Translating is 'tolkbot translate'. ```shell tolkbot languages add [options] ``` | Option | Description | | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | `--existing ` | What to do with translations the repository already has: keep them as written by a person (trust), or flag them for review (default: `trust`) | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | Codes are the ones on [Supported languages](https://docs.tolkbot.ai/docs/supported-languages), in any spelling (`pt-BR`, `pt_BR`). `outcome` is `added`, `set_up`, `unchanged` or `failed` (with `error`). An unsupported code exits `2` with `unsupported_locale`. Adding a language changes the project only; `translate` fills the files. Example: ```shell tolkbot languages add nb de ``` With `--json`, the default without a terminal: ```json { "project": { "name": "Web", "slug": "web" }, "existing": "trust", "changed": true, "languages": [ { "locale": "nb", "outcome": "added" }, { "locale": "de", "outcome": "unchanged", "setup": "set-up" } ], "targetLanguages": ["de", "nb"], "next": { "translate": ["tolkbot translate --dst nb"], "pullRequestOnPush": true } } ``` --- ## jobs List, inspect, apply and cancel translation jobs. ### jobs list Recent translation jobs for the project, with their status and whether their results are in this working tree. ```shell tolkbot jobs list [options] ``` | Option | Description | | ------------- | ---------------------------------------------- | | `--limit ` | How many jobs to list (default: `20`) | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | `applied` says whether a job's results are in this working tree: `applied`, `waiting` (with `pending` keys to write), `running`, or `none` for a cancelled job or one delivered through a pull request. Example: ```shell tolkbot jobs list --limit 5 ``` With `--json`, the default without a terminal: ```json { "jobs": [ { "jobId": "p57adftz694cm970tjnmgqtykd8j77h9", "srcLocale": "en", "dstLocale": "nb", "status": "succeeded", "source": "cli", "createdAt": "2026-11-14T15:39:28.371Z", "total": 11, "completed": 11, "failed": 0, "creditsUsed": 912, "applied": "applied", "pending": 0 } ] } ``` ### jobs show Show one translation job. ```shell tolkbot jobs show [options] ``` | Option | Description | | ----------- | ---------------------------------------------- | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | Exits `1` for a failed or cancelled job, after printing it. Example: ```shell tolkbot jobs show p57adftz694cm970tjnmgqtykd8j77h9 ``` With `--json`, the default without a terminal: ```json { "jobId": "p57adftz694cm970tjnmgqtykd8j77h9", "srcLocale": "en", "dstLocale": "nb", "status": "succeeded", "source": "cli", "createdAt": "2026-11-14T15:39:28.371Z", "total": 11, "completed": 11, "failed": 0, "creditsUsed": 912, "applied": "applied", "pending": 0 } ``` ### jobs apply Write finished jobs' results into the working tree. With no ID: the finished jobs not applied yet, one per language. ```shell tolkbot jobs apply [options] [ids...] ``` | Option | Description | | ----------- | ---------------------------------------------- | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | Without an ID it takes the finished jobs whose results are not in the files yet, one per language. With nothing waiting it exits `1` with `nothing_to_apply`; with two jobs waiting for one language it exits `2` and lists them. Example: ```shell tolkbot jobs apply ``` With `--json`, the default without a terminal: ```json { "applied": [ { "jobId": "p57adftz694cm970tjnmgqtykd8j77h9", "dstLocale": "nb", "files": 1, "keys": 11, "notApplied": [ { "key": "nav.home", "reason": "target_changed" } ] } ] } ``` ### jobs cancel Cancel a running translation job. ```shell tolkbot jobs cancel [options] ``` | Option | Description | | ----------- | ---------------------------------------------- | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | Example: ```shell tolkbot jobs cancel p57adftz694cm970tjnmgqtykd8j77h9 ``` With `--json`, the default without a terminal: ```json { "jobId": "p57adftz694cm970tjnmgqtykd8j77h9", "ok": true } ``` --- ## glossary Manage glossary terms. ### glossary list List glossary terms for the current project. ```shell tolkbot glossary list [options] ``` | Option | Description | | ------------------- | ---------------------------------------------- | | `--locale ` | Filter by source locale | | `--limit ` | Max number of results (default: `100`) | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | The terms translation uses for the project: its own, and the organization's it inherits. When a term is in both for the same source locale, the project's wins. With inheritance switched off, organization terms are left out and `notInherited` counts them. See [Context](https://docs.tolkbot.ai/docs/context#glossary) for how glossaries work. Example: ```shell tolkbot glossary list --locale en ``` With `--json`, the default without a terminal: ```json { "inheritOrgGlossaries": true, "notInherited": 0, "glossaries": [ { "id": "jd7a3k9w2x8h1q4m6n0p5r7s9t2v4y6z", "term": "Workspace", "locale": "en", "doNotTranslate": false, "translations": [ { "locale": "nb", "text": "Arbeidsområde" } ], "context": "Top-level container for projects", "scope": "project" } ] } ``` ### glossary show Show details of a glossary term. ```shell tolkbot glossary show [options] [term] ``` | Option | Description | | ------------------- | ---------------------------------------------- | | `--id ` | Glossary term ID, instead of the term | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | `show`, `update` and `remove` take the term, in any case, or its ID with `--id`. The term is looked up among the project's terms and the organization's. When it matches more than one, such as a project term and an organization term with the same spelling, the command lists each with its ID and exits `2`; run it again with `--id`. Example: ```shell tolkbot glossary show "Workspace" ``` With `--json`, the default without a terminal: ```json { "id": "jd7a3k9w2x8h1q4m6n0p5r7s9t2v4y6z", "term": "Workspace", "locale": "en", "doNotTranslate": false, "translations": [ { "locale": "nb", "text": "Arbeidsområde" } ], "context": "Top-level container for projects" } ``` ### glossary create Create a new glossary term. ```shell tolkbot glossary create [options] ``` | Option | Description | | -------------------------------- | ----------------------------------------------------------------------- | | `--term ` | Source term **Required.** | | `--locale ` | Source locale (e.g. en) **Required.** | | `--context ` | AI context for translation guidance | | `--do-not-translate` | Mark term as do-not-translate | | `--translation ` | Translations in locale:text format (e.g. --translation no:Hei de:Hallo) | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | The term belongs to the current project. Organization-wide terms are made in the [dashboard](https://docs.tolkbot.ai/docs/context#organization-and-project-glossaries). Use `--do-not-translate` for brand and product names. Example: ```shell tolkbot glossary create --term "Workspace" --locale en --context "Top-level container for projects" --translation nb:Arbeidsområde ``` With `--json`, the default without a terminal: ```json { "id": "jd7a3k9w2x8h1q4m6n0p5r7s9t2v4y6z", "term": "Workspace" } ``` ### glossary update Update an existing glossary term. ```shell tolkbot glossary update [options] [term] ``` | Option | Description | | -------------------------------- | -------------------------------------------------------------- | | `--id ` | Glossary term ID, instead of the term | | `--term ` | New source term | | `--locale ` | New source locale | | `--context ` | AI context for translation guidance | | `--do-not-translate` | Mark term as do-not-translate | | `--no-do-not-translate` | Unmark do-not-translate | | `--translation ` | Translations in locale:text format (replaces all translations) | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | `--translation` replaces every translation the term has, so pass all the ones to keep. Example: ```shell tolkbot glossary update "Workspace" --translation nb:Arbeidsområde ``` With `--json`, the default without a terminal: ```json { "id": "jd7a3k9w2x8h1q4m6n0p5r7s9t2v4y6z", "ok": true } ``` ### glossary remove Remove a glossary term. ```shell tolkbot glossary remove [options] [term] ``` | Option | Description | | ------------------- | ---------------------------------------------- | | `--id ` | Glossary term ID, instead of the term | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | Example: ```shell tolkbot glossary remove "Workspace" ``` With `--json`, the default without a terminal: ```json { "id": "jd7a3k9w2x8h1q4m6n0p5r7s9t2v4y6z", "ok": true } ``` --- ## learnings Add, view and manage translation learnings. ### learnings list List translation learnings for the current project. ```shell tolkbot learnings list [options] ``` | Option | Description | | ------------------- | ---------------------------------------------- | | `--status ` | Filter by status (active or archived) | | `--limit ` | Max number of results (default: `100`) | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | Learnings are corrections TolkBot remembers: from feedback on its pull requests, edits in the dashboard, `learnings add` and `set --learn`. See [Context](https://docs.tolkbot.ai/docs/context#learnings). Example: ```shell tolkbot learnings list --status active ``` With `--json`, the default without a terminal: ```json { "learnings": [ { "id": "k17bq2c4d6f8g0h2j4k6m8n0p2r4s6t8", "sourceText": "Dashboard", "suggestedTranslation": "Oversikt", "srcLocale": "en", "dstLocale": "nb", "feedbackType": "incorrect-term", "reasoning": "Oversikt is the app's word for the start page", "status": "active", "source": "cli" } ] } ``` ### learnings add Tell TolkBot how to translate for this project: a note, optionally about a source text. ```shell tolkbot learnings add [options] ``` | Option | Description | | ---------------------- | --------------------------------------------------------------------------- | | `--locale ` | Target locale the learning is for **Required.** | | `--note ` | What to do and why, e.g. "Address the reader as du, never De" **Required.** | | `--source ` | Source text the note is about; without it the note applies to every string | | `--translation ` | The translation to prefer for --source | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | A note on its own applies to every string translated into the language. With `--source` it applies to strings that contain that text, and `--translation` is the wording to prefer there. Example: ```shell tolkbot learnings add --locale nb --source "Dashboard" --translation "Oversikt" --note "Oversikt is the app's word for the start page" ``` With `--json`, the default without a terminal: ```json { "id": "k17bq2c4d6f8g0h2j4k6m8n0p2r4s6t8", "srcLocale": "en", "dstLocale": "nb", "sourceText": "Dashboard", "suggestedTranslation": "Oversikt", "note": "Oversikt is the app's word for the start page" } ``` ### learnings show Show details of a learning. ```shell tolkbot learnings show [options] ``` | Option | Description | | ------------------- | ---------------------------------------------- | | `--id ` | Learning ID **Required.** | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | Example: ```shell tolkbot learnings show --id k17bq2c4d6f8g0h2j4k6m8n0p2r4s6t8 ``` With `--json`, the default without a terminal: ```json { "id": "k17bq2c4d6f8g0h2j4k6m8n0p2r4s6t8", "sourceText": "Dashboard", "suggestedTranslation": "Oversikt", "srcLocale": "en", "dstLocale": "nb", "feedbackType": "incorrect-term", "reasoning": "Oversikt is the app's word for the start page", "status": "active", "source": "cli" } ``` ### learnings archive Archive a learning (keeps it but excludes from translations). ```shell tolkbot learnings archive [options] ``` | Option | Description | | ------------------- | ---------------------------------------------- | | `--id ` | Learning ID **Required.** | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | An archived learning is kept for reference and no longer used when translating. Example: ```shell tolkbot learnings archive --id k17bq2c4d6f8g0h2j4k6m8n0p2r4s6t8 ``` With `--json`, the default without a terminal: ```json { "id": "k17bq2c4d6f8g0h2j4k6m8n0p2r4s6t8", "ok": true } ``` ### learnings remove Permanently remove a learning. ```shell tolkbot learnings remove [options] ``` | Option | Description | | ------------------- | ---------------------------------------------- | | `--id ` | Learning ID **Required.** | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | Permanent. Use `archive` to keep it. Example: ```shell tolkbot learnings remove --id k17bq2c4d6f8g0h2j4k6m8n0p2r4s6t8 ``` With `--json`, the default without a terminal: ```json { "id": "k17bq2c4d6f8g0h2j4k6m8n0p2r4s6t8", "ok": true } ``` --- ## telemetry Control anonymous usage reporting. ### telemetry status Show whether telemetry is on and why. ```shell tolkbot telemetry status [options] ``` | Option | Description | | ----------- | ---------------------------------------------- | | `--json` | Output as JSON, the default without a terminal | | `--no-json` | Output text, even without a terminal | `reason` is `default`, `env` (`$TOLKBOT_TELEMETRY=0`), `do-not-track` (`$DO_NOT_TRACK=1`), `preference` or `no-key`. What is reported is on [Installation and login](https://docs.tolkbot.ai/docs/cli-installation#telemetry). Example: ```shell tolkbot telemetry status ``` With `--json`, the default without a terminal: ```json { "enabled": false, "reason": "env", "preferenceFile": "/home/you/.tolkbot/telemetry" } ``` ### telemetry off Stop reporting usage from this machine. ```shell tolkbot telemetry off [options] ``` Example: ```shell tolkbot telemetry off ``` ### telemetry on Resume reporting usage from this machine. ```shell tolkbot telemetry on [options] ``` Example: ```shell tolkbot telemetry on ``` --- ## Every command These work with any command. `--token` goes before or after it. | Option | Description | | ----------------- | ------------------------------------------------------------------------------------- | | `-v`, `--version` | Output the version number | | `--token ` | Auth token to use for this invocation (overrides $TOLKBOT_TOKEN and the stored token) | | `-h`, `--help` | Show help, for the program or the command before it | --- # Validate in CI Source: https://docs.tolkbot.ai/docs/cli-validating The `tolkbot validate` command checks your translation files for problems, and exits non-zero when it finds one — so it works as a build gate, not just a report. --- ## Usage Run validation from your project root: ```shell tolkbot validate ``` TolkBot reads your `tolkbot.json` configuration and validates every translation file it finds. No authentication is needed — validation is entirely local, so it runs anywhere, including sandboxes with no network. | Option | Description | | ----------- | -------------------------------------------------------------------------- | | `--json` | Emit the report as JSON instead of a table; the default without a terminal | | `--no-json` | Print the table even without a terminal | | `--strict` | Treat warnings as errors, failing the build | --- ## Exit codes | Code | Meaning | | ---- | --------------------------------------------------------------- | | `0` | No errors. Warnings may still be present without `--strict`. | | `1` | At least one error — or, under `--strict`, at least one warning | --- ## Checks performed Findings come at three levels, and the level decides whether your build fails. ### Errors — always fail | Check | Description | | ------------------------- | ------------------------------------------------------------------ | | **File parses** | Every locale file is syntactically valid | | **Placeholder integrity** | A translation keeps the interpolation tokens its source string has | | **Translations exist** | The project has locale files TolkBot can read | | **Base locale** | One locale can be identified as the source of truth | ### Warnings — fail only under `--strict` | Check | Description | | ------------------ | ------------------------------------------------------------------------------------ | | **Missing keys** | Keys present in the base locale but absent from a target | | **Empty file** | A locale file that contains no keys | | **Empty values** | A key whose value is blank where the base has text | | **Plural forms** | A plural without every form the target language needs, e.g. Polish `few` and `many` | | **Wrong script** | A value with no character of its language's script, e.g. Latin text in a Korean file | | **Left as source** | A sentence left exactly as the base locale has it | ### Info — never fail | Check | Description | | -------------- | --------------------------------------------------------- | | **Extra keys** | Keys in a target locale that the base locale doesn't have | | **Convention** | Layout hints for your framework | > **Why missing keys are only a warning** > > While TolkBot is translating, a target locale is _supposed_ to be behind the base — that's the normal state between a key landing in your base file and the translation PR merging. If that failed the build, every repo waiting on a TolkBot PR would sit red. Use `--strict` when you want completeness enforced anyway. --- ## Placeholder integrity A translation that drops an interpolation token is a runtime bug, not a style problem: `"Hei {name}"` rendered as `"Hei"` ships a broken string. Validation compares the tokens in each base string against its translation and fails when they diverge. ```shell error "cart.total" in "nb": "{count}" is missing from the translation (relative to "en"). placeholder-mismatch — messages/nb.json · cart.total ``` Reordering is fine — languages put arguments in different places, and only the set of tokens is compared. The number of braces is part of the token: under i18next `{{name}}` interpolates and `{name}` is literal text, so losing a brace is a dropped placeholder. The syntaxes recognized are `{name}`, `{{name}}`, `%{name}`, printf-style `%s` / `%d` / `%1$s` / `%@`, component tags such as `<0>…`, and i18next nesting `$t(key)`. ICU plurals follow the target language, not the source. A plural's messages are translated, and its branches are the ones the target language needs — English has `one` and `other`, Polish `one`, `few`, `many` and `other`, Japanese only `other` — so a translation may have more or fewer branches than the base. The argument name, every `=0`-style branch and the `#` that prints the number must survive; a branch that only ever means one number, like Arabic `two`, may say it in words. A plural that lacks a form its language needs is a warning, not an error: it still renders, using `other`. These are the same checks TolkBot runs on every translation it writes, so validation in your CI and TolkBot's own pipeline agree on what a broken string is. --- ## Example ```shell $ tolkbot validate ✗ Validation failed — 1 error(s), 1 warning(s) 12 json file(s), 340 keys Locales: en, es, nb (base: en) Pattern: messages/{locale}.json warning Locale "es" is missing 3 key(s) present in "en": settings.title, … missing-keys error "cart.total" in "nb": "{count}" is missing from the translation (relative to "en"). placeholder-mismatch — messages/nb.json · cart.total ``` --- ## In CI Validation needs no credentials, so a workflow step is just the command: ```yaml - name: Validate translations run: npx tolkbot validate ``` Machine-readable output for a step that post-processes findings: ```shell tolkbot validate --json ``` ```json { "valid": false, "strict": false, "stats": { "filesChecked": 12, "totalKeys": 340, "format": "json", "baseLocale": "en", "locales": ["en", "es", "nb"], "pattern": "messages/{locale}.json" }, "counts": { "error": 1, "warning": 1, "info": 0 }, "issues": [ { "level": "error", "rule": "placeholder-mismatch", "message": "\"cart.total\" in \"nb\": \"{count}\" is missing from the translation (relative to \"en\").", "file": "messages/nb.json", "locale": "nb", "key": "cart.total" } ] } ``` Each issue carries a stable `rule` identifier, so a consumer can filter on it without matching against the message text. --- ## When to validate Run validation after: - Translating with `tolkbot translate` - Manually editing translation files - Adding new keys to your base locale - Before committing translation changes — particularly when a coding agent wrote them --- # Supported formats Source: https://docs.tolkbot.ai/docs/supported-formats TolkBot supports common i18n file formats and preserves your file structure during translation. --- ## JSON The primary format for most i18n frameworks. TolkBot handles both flat and nested JSON structures. ### Flat JSON ```json { "welcome": "Welcome to our app", "login": "Log in", "signup": "Sign up" } ``` ### Nested JSON ```json { "common": { "welcome": "Welcome to our app", "actions": { "login": "Log in", "signup": "Sign up" } } } ``` ### Namespaced files Some frameworks split translations across multiple files by namespace: ``` public/locales/en/common.json public/locales/en/dashboard.json public/locales/en/settings.json ``` TolkBot handles this pattern and translates each namespace file independently. --- ## TypeScript / JavaScript TolkBot can parse TypeScript and JavaScript files that export translation objects: ```ts export default { welcome: "Welcome to our app", dashboard: { title: "Dashboard", }, }; ``` `export const en = {...}` and `module.exports = {...}` work too, as do `as const` and `satisfies` annotations. > **Where the CLI looks for them** > > Because any `.ts` file could hold an object literal, the CLI only looks for TypeScript translations inside the conventional locale directories — `messages/`, `locales/`, `i18n/`, `translations/`, `lang/`, and their `src/`, `app/` and `public/` variants. JSON translations are also searched for outside those directories. --- ## Style preservation When writing translations back to files, TolkBot preserves: - **Key ordering** — keys appear in the same order as the source file - **Nesting structure** — nested objects maintain their hierarchy - **Indentation** — follows the formatting of the original file - **Placeholder syntax** — ICU (`{var}`), Mustache (`{{var}}`), and simple placeholders are preserved exactly --- ## Placeholder styles TolkBot auto-detects the placeholder style used in your source strings: | Style | Syntax | Example | | -------- | -------------- | ----------------------------------------------- | | ICU | `{variable}` | `{count, plural, one {1 item} other {# items}}` | | Mustache | `{{variable}}` | `Hello {{name}}, welcome back` | | None | — | Plain text with no placeholders | Placeholders are validated after translation to ensure none are missing or modified. --- # Supported frameworks Source: https://docs.tolkbot.ai/docs/supported-frameworks TolkBot recognizes your i18n framework and finds your locale files in the repository. There are no per-framework default paths. Whatever framework TolkBot finds, the source pattern comes from the locale files it finds in your repository: `messages/en.json` becomes `messages/{locale}.json`, and `public/locales/en/common.json` becomes `public/locales/{locale}/{namespace}.json`. --- ## next-intl For Next.js applications using [next-intl](https://next-intl.dev). TolkBot looks for `next-intl` in `package.json`, its configuration (`i18n/request.ts`, `i18n/routing.ts`, or the plugin in `next.config`) and the locale files in a `messages/` directory. What TolkBot does in a next-intl project, with an example: [TolkBot for next-intl](https://tolkbot.ai/next-intl). ```json // messages/en.json { "HomePage": { "title": "Welcome", "description": "This is the home page" } } ``` --- ## next-i18next For Next.js applications using [next-i18next](https://github.com/i18next/next-i18next). TolkBot looks for `next-i18next` in `package.json` and reads `next-i18next.config.js` for the locales and the locale path. --- ## react-i18next and i18next For React applications using [react-i18next](https://react.i18next.com), and JavaScript or Node.js applications using [i18next](https://www.i18next.com) on its own. TolkBot looks for `react-i18next` or `i18next` in `package.json` and reads the i18next configuration (`src/i18n.ts`, `i18n/index.ts` and similar) for the languages. Namespace-based file splitting is supported: ``` public/locales/en/common.json public/locales/en/dashboard.json ``` What TolkBot does in an i18next project, with an example: [TolkBot for i18next and react-i18next](https://tolkbot.ai/i18next). --- ## Expo For React Native applications built with [Expo](https://expo.dev) that use [i18n-js](https://github.com/fnando/i18n-js). TolkBot detects Expo projects through i18n-js: it looks for `i18n-js` in `package.json` (or `expo-localization` together with `expo`) and follows the files that import it to find your translations. --- ## vue-i18n For Vue.js applications using [vue-i18n](https://vue-i18n.intlify.dev), including Nuxt with `@nuxtjs/i18n`. TolkBot looks for `vue-i18n` or `@nuxtjs/i18n` in `package.json` and reads the configuration (`i18n.config.ts`, `src/i18n/index.ts`, `nuxt.config.ts`). --- ## Other setups A repository that uses none of these can still be translated. TolkBot looks for locale files in directories named `locales`, `locale`, `messages`, `i18n`, `translations`, `lang` or `languages`. If it finds nothing, the project asks you for a source pattern when you create it. See [Supported formats](https://docs.tolkbot.ai/docs/supported-formats) for the file formats it reads. --- ## Detection When you create a project in the dashboard, or run `tolkbot init` in the CLI, TolkBot: 1. Checks `package.json` for i18n library dependencies 2. Reads framework-specific configuration files 3. Scans the repository for locale files 4. Infers locale codes from directory and file names 5. Determines the base language (prefers `en` if found) The dashboard shows the detected framework on the project's **Settings → Languages** page; you can't change it there, and nothing you can set depends on it. If the source pattern or the base language is wrong, change those on the same page. The CLI's `tolkbot init` takes a `--framework` flag. --- # Supported languages Source: https://docs.tolkbot.ai/docs/supported-languages TolkBot translates between any two of the languages below. The list is the one the dashboard's **Add a language** dialog offers, built from TolkBot's own code each time these docs are published. --- ## How codes are matched A language is written as a language code, with a region when it matters: `pt` is Portuguese, `pt-br` Portuguese as written in Brazil. Your files can spell a code any of the usual ways. `pt-BR`, `pt_BR` and `ptBR` are all `pt-br`, and TolkBot writes new files with the spelling your existing files use. A glossary term for a language applies to its regions as well: a `pt` term applies to a `pt-br` project, never the other way round. `no` and `nb` are the same language, and `nn` (Nynorsk) is its own. See [Context](https://docs.tolkbot.ai/docs/context#glossary-locales). Plural forms follow the language: see [Placeholders and plurals](https://docs.tolkbot.ai/docs/placeholders-and-plurals). --- ## Languages | Language | Code | | --- | --- | | Afrikaans | `af` | | Arabic | `ar` | | Basque | `eu` | | Bengali | `bn` | | Bulgarian | `bg` | | Catalan | `ca` | | Chinese | `zh` | | Chinese (Hong Kong) | `zh-hk` | | Chinese (Simplified) | `zh-cn` | | Chinese (Traditional) | `zh-tw` | | Croatian | `hr` | | Czech | `cs` | | Danish | `da` | | Dutch | `nl` | | Dutch (Belgium) | `nl-be` | | English | `en` | | English (Australia) | `en-au` | | English (Canada) | `en-ca` | | English (UK) | `en-gb` | | English (US) | `en-us` | | Estonian | `et` | | Finnish | `fi` | | French | `fr` | | French (Canada) | `fr-ca` | | French (France) | `fr-fr` | | Galician | `gl` | | German | `de` | | German (Austria) | `de-at` | | German (Germany) | `de-de` | | German (Switzerland) | `de-ch` | | Greek | `el` | | Hebrew | `he` | | Hindi | `hi` | | Hungarian | `hu` | | Icelandic | `is` | | Indonesian | `id` | | Italian | `it` | | Japanese | `ja` | | Korean | `ko` | | Latvian | `lv` | | Lithuanian | `lt` | | Malay | `ms` | | Norwegian | `no` | | Norwegian Bokmål | `nb` | | Norwegian Nynorsk | `nn` | | Persian | `fa` | | Polish | `pl` | | Portuguese | `pt` | | Portuguese (Brazil) | `pt-br` | | Portuguese (Portugal) | `pt-pt` | | Romanian | `ro` | | Russian | `ru` | | Serbian | `sr` | | Slovak | `sk` | | Slovenian | `sl` | | Spanish | `es` | | Spanish (Argentina) | `es-ar` | | Spanish (Mexico) | `es-mx` | | Spanish (Spain) | `es-es` | | Swahili | `sw` | | Swedish | `sv` | | Tagalog | `tl` | | Tamil | `ta` | | Thai | `th` | | Turkish | `tr` | | Ukrainian | `uk` | | Vietnamese | `vi` | --- ## A language that isn't listed The dashboard can set up only the languages above, even when your repository has a locale file for another one. Write to [hello@tolkbot.ai](mailto:hello@tolkbot.ai) with the language you need. --- # Notifications and emails Source: https://docs.tolkbot.ai/docs/notifications-and-emails TolkBot tells you about jobs, pull requests, your team, billing and your GitHub connection in the dashboard and by email. This page lists every one, who gets it, and which you can turn off. --- ## In the dashboard The bell at the top of the dashboard shows your notifications and how many are unread. **Mark all as read** clears the count. **Notifications** in your account menu, at the bottom of the sidebar, opens the full list and your preferences. Notifications are per organization: you see the ones for the organization you are in. --- ## Jobs, pull requests and your team ![The Notifications page with the Preferences card](https://docs.tolkbot.ai/screenshots/notifications.png) Your notifications and preferences, from Notifications in the account menu. These go to every member of the organization. Each person chooses for themselves, on the **Notifications** page under **Preferences**, whether to get each one **In-app**, by **Email**, both or neither. | Notification | Sent when | In-app | Email | | -------------------- | ------------------------------------------------ | ------ | ----- | | **Job failures** | A translation job failed | On | On | | **Partial failures** | A translation job finished with some keys failed | On | On | | **Job success** | A translation job finished | On | Off | | **PR created** | TolkBot opened a translation pull request | On | Off | | **PR merged** | A translation pull request was merged | On | Off | | **PR closed** | A translation pull request was closed unmerged | On | Off | | **Member joined** | Someone joined the organization | On | Off | The table shows the defaults. Each email has a **Notification settings** link to the same page. --- ## Billing and GitHub access These go to every member, both in the dashboard and by email, and can't be turned off: missing one can stop your translations. | Notification | Sent when | | ------------------------- | --------------------------------------------------------------------------------- | | Credits | The organization has used 80% of this month's included credits | | Overage started | The included credits are used and overage is on, so translation continues | | Out of credits | The included credits are used with overage off, or a trial's credits are used | | Spending limit | This month's overage reached 80% of the spending limit | | Spending limit reached | This month's overage reached the spending limit, and translation paused | | Payment failed | A subscription payment didn't go through | | Subscription canceled | The subscription was canceled | | GitHub access paused | The TolkBot app was suspended on GitHub | | GitHub access removed | The TolkBot app was uninstalled from GitHub | | Repository deleted | A repository a project uses was deleted on GitHub, and its projects were archived | | Repository transferred | A repository moved to an account TolkBot can't reach from this organization | | Repository access removed | The TolkBot app lost access to a repository a project uses | | Repository reconnected | A repository came back, and its archived projects with it | Each credit alert is sent at most once a month, and only when TolkBot's own translations used the credits, not when the balance moves for another reason such as a renewal. The credit alerts show on the Preferences card as **Credit alerts**, always on. See [Billing and credits](https://docs.tolkbot.ai/docs/billing-and-credits) and [archived projects](https://docs.tolkbot.ai/docs/organization-and-members#archived-projects). --- ## Product emails These are emails only, to the organization's admins. Most of them invite a reply, which reaches a person. | Email | Sent when | | ------------------------------------------------------- | ------------------------------------------------------------------------------- | | Your TolkBot trial ends in 3 days | The trial ends within three days | | You're on (your plan) | The trial turned into a subscription | | Your TolkBot trial has ended | The trial ended without a subscription | | TolkBot is connected but hasn't translated anything yet | GitHub was connected three or more days ago and nothing has been translated yet | | Your first TolkBot pull request is merged | The organization's first TolkBot pull request was merged | **Unsubscribe from product updates**, at the bottom of each one, stops all of these for that email address, in every organization. It asks you to confirm first, and lets you subscribe again. Emails about your account, such as a failed payment or a failed job, keep coming. --- ## Where emails come from Product emails come from `hello@tolkbot.ai`, everything else from `noreply@tolkbot.ai`. The subject is the notification's title followed by the organization's name, for example `Translation job failed in acme/web · Acme`. --- # Trust and data Source: https://docs.tolkbot.ai/docs/trust What TolkBot reads from your repository, who else sees it, what the GitHub App may do there, and how long we keep anything. It describes TolkBot as it works today. --- ## What leaves your repository ### What TolkBot reads - The locale files your project's patterns match: the base-language strings, the existing translations, their key names and file paths, and any `.context.json` file beside them. - The list of file paths in the repository, to find those files. Paths only, not contents. - When a project is set up, the files that tell it which i18n library you use and where the locale files live: `package.json` files, the library's configuration (`i18n/request.ts`, `next.config.js` and the like), and, when no configuration names the locales, JavaScript and TypeScript files read one at a time until it finds the one that imports the library. It uses them to find your locale files and keeps none of them. - When you push, the list of changed files and the changes to locale files between the commits the push names. GitHub's comparison includes changes to other files too; TolkBot drops those without storing them or sending them on. It also reads the pusher's username and the latest commit message, to recognise its own merges. - Pull request comments that mention TolkBot, the lines of the diff they sit on, and who wrote them. It asks for no file by name other than those above: no `.env` files, no workflows. It reads no git history beyond the commits a push or pull request names, and no commit authors. ### What reaches an AI model - To translate: the string, its key name, the context you or the file gave it, the glossary terms and learnings that apply, and your tone settings. No file paths. - To review a job: the translated strings of a file with their sources, and other translations from the same file for comparison. - To check: each source string and its translation, and an edited source string before and after the edit. - To act on a pull request comment: the comment and the diff lines it sits on. - To set up a project when the file patterns alone are not conclusive: up to 100 file paths whose names suggest translations (`locale`, `i18n`, `messages`), the number of files in the repository, and up to five files that set up the i18n library, such as `i18n/request.ts` or the source file that imports it. ### What TolkBot stores The strings and translations of each job, [translation memory](https://docs.tolkbot.ai/docs/translation-memory) (your translations, looked up by a hash of the source), each key's source text at the time it was translated, drafts, glossaries, learnings and context. It does not store your file list or any file that is not a locale file. Translation memory belongs to your organization, and no other organization can use it. ### The CLI `tolkbot translate` sends the strings it translates to TolkBot, the same as a pull request run. `tolkbot validate` runs on your machine. It sends no strings, only usage telemetry (counts), which `TOLKBOT_TELEMETRY=0` turns off. --- ## AI models and training Every model request goes through Vercel AI Gateway. These are the models TolkBot calls, and what each one is for: | Model | Made by | What it does | | --------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Gemini 3.5 Flash-Lite | Google | Translates every string first. Reviews each translated file at the end of a job. Works out where a new repository keeps its locale files. | | Claude Sonnet 5.5 | Anthropic | Translates a string again when a check flags the first attempt. Suggests context for a project. Applies a correction from a pull request comment to other strings. | | GPT-4.1 mini | OpenAI | Reads a pull request comment that mentions TolkBot, to work out what the reviewer wants changed. | | Jev | TypeSafe AI | Checks each translation against its source: which language it is in, and whether it says the same thing. Decides whether an edit to a source string changed its meaning. Reads a pull request comment that asks for a new translation, to tell whether it wants a formal or informal form of address. | | Gemini 3.1 Flash-Lite | Google | Answers Jev's questions when Jev is unreachable, and double-checks a translation Jev flagged before the flag counts. | ### Training TolkBot does not train or fine-tune models, on your strings or anyone else's. Your strings reach a model only as the input to a request whose answer we use. No model provider may train on them either. TolkBot's Vercel AI Gateway account disallows prompt training, and the gateway enforces that on every model request TolkBot makes. ### Retention at the provider The checking calls (Jev, and Gemini 3.1 Flash-Lite when it stands in or double-checks) ask the gateway for zero data retention on every request. A provider route without that agreement fails the request instead of answering it. The other calls in the table follow each provider's own retention terms. Zero data retention on every call is planned. --- ## Subprocessors TolkBot runs on these services. Each one receives only what it needs to do its part. | Provider | What for | What it receives | | -------------------------------------- | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Convex | Database, backend functions, file storage | Everything TolkBot stores: accounts, organizations, strings and translations, glossaries, learnings, usage | | Vercel | Hosting the website, dashboard and docs; AI Gateway | Page requests; every model request and its answer | | Google, Anthropic, OpenAI, TypeSafe AI | The models [above](#ai-models-and-training) | Strings, translations, key names and the rest listed under [What reaches an AI model](#what-reaches-an-ai-model) | | Clerk | Sign-in, organizations and members | Name, email address, avatar, GitHub username, sessions | | Polar | Subscriptions, payments, invoices | Billing email, payment details, the credits each model call used. Polar is the merchant of record: it resells the subscription to you, handles sales tax and issues invoices. Stripe takes card payments for it, and Polar's privacy policy says how it handles what you give it at checkout. It never receives repository content | | Resend | Sending email | Recipient address and the message | | Axiom | Backend logs | Job events, key names and error messages. Excerpts of strings: the first 30 characters of each source and translation, up to 500 of a translation a check refused, and the strings a pull request comment corrects | | Sentry | Errors in the website and dashboard | Error details. Your account and IP address only if you accepted analytics | | PostHog | Product analytics | Which pages and features are used (website only with your consent), job and pull request events, CLI telemetry. Never strings or file contents | Where they run: Convex in US East (N. Virginia), Vercel's functions in US East (Washington, D.C.), Resend in the EU (Ireland), Sentry in the EU (Germany) and PostHog in the EU. Clerk, Polar, Axiom and the four model providers are in the US. Some of these providers process data in the United States. Those transfers rely on the safeguards in each provider's data processing agreement: the EU–US Data Privacy Framework where the provider is certified under it, otherwise the European Commission's standard contractual clauses. GitHub is not on the list because it is yours: it hosts your repository, and TolkBot works in it through the App described below. --- ## GitHub App permissions You choose which repositories the App can reach when you install it. Inside those, it asks for four permissions. | Permission | Access | Why | | ------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Metadata | Read | GitHub requires it of every App. TolkBot uses it to list the repositories you granted, with their name, default branch, visibility and whether they are archived. | | Contents | Read and write | Read: the locale files, the repository's file list to find them, `package.json` files to recognise the framework, and the comparison between two commits to see which strings a push changed. Write: create the translation branch, commit translated locale files to it, and delete it once its pull request is merged or closed. | | Pull requests | Read and write | Open and update the translation pull request, find the one already open, and reply to and react on review comments on a line of the diff that mention TolkBot. | | Issues | Read and write | GitHub keeps a pull request's conversation comments and its labels under issues. TolkBot uses it to reply to and react on a comment that mentions it in the conversation of its own pull request, and to label the pull requests it opens. It also delivers the issue comment event. TolkBot ignores comments on issues and never opens, edits or comments on one. | ### Events it listens to - **Push**, to start translating when your strings change. - **Pull request**, to notice when its own pull request is merged, closed or reopened. - **Issue comment** and **pull request review comment**, to answer a comment that mentions TolkBot on a pull request. Comments on issues are ignored. - **Repository**, to follow a rename, transfer, archive or deletion. ### What it never does - Merge or close a pull request, or push to any branch but the one its own pull request uses. - Touch workflows, Actions, secrets, checks, branch protection or repository settings. It holds no permission for any of them. - Act as you. Signing in with GitHub tells TolkBot who you are; it never calls GitHub with your account. --- ## How long we keep it | What | Kept for | | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | | Each translation job's strings, one row per key with source and translation | 90 days after the job finished | | Translation job logs | 30 days | | Translation memory | 365 days after an entry was last used. Reuse restarts the clock | | The values captured for a commit to your pull request | 30 days after the commit | | Pull request run history (no strings) | 365 days | | Pushes TolkBot did not act on: the branch, the commit, why, and who pushed when their pushes are ignored | The newest 60 for each project | | Usage, one row per model call | 400 days, then folded into daily totals that stay until the organization is deleted | | Email bodies at our email provider | 7 days after delivery. A record of what we sent and whether it arrived stays until the organization is deleted | | Backend logs (Axiom) | 30 days | | Drafts, glossaries, learnings, context, and each key's translation baseline and health verdict | As long as the project exists. They are what TolkBot works from | --- ## Deleting your data **Deleting an organization erases it.** Its projects, repositories, translation jobs, pull request history, drafts, glossaries, learnings, translation memory, health verdicts, usage records, notifications and email records are all deleted. The organization disappears from the dashboard the moment deletion is requested, any job still running is cancelled, and the rows are removed in the background, 500 at a time. An admin deletes the organization from its settings, under General. Its subscription is cancelled first: it does not renew, the rest of the billing period is not refunded, and overage used in its last month is still invoiced. The admins get an email once everything is deleted. **Deleting a project** (an admin can, from the project's settings) removes the same things for that project. Its usage records stay with the organization, because they are what you were billed for. **Uninstalling the GitHub App erases nothing.** TolkBot loses access at once, and your glossaries, learnings and projects are kept so that reinstalling brings them back. Delete the organization if you want them gone. **Deleting or transferring a repository, or removing it from the App,** archives its projects. Nothing is deleted, and the projects come back if the repository does. Nothing here touches your repository. Pull requests and files TolkBot already wrote stay where they are. Invoices stay with Polar for as long as bookkeeping law requires, and email bodies and logs age out on the schedule above. --- ## Data processing agreement For your strings and the rest of your repository content, your organization is the controller and Duoworks AS processes it on your behalf. The [privacy policy](https://tolkbot.ai/privacy) covers the personal data of the people who sign in. To sign a data processing agreement, email [support@tolkbot.ai](mailto:support@tolkbot.ai) and we will send you one. --- ## Questions Ask [support@tolkbot.ai](mailto:support@tolkbot.ai) anything this page leaves open, or tell us if it is wrong. --- # Troubleshooting Source: https://docs.tolkbot.ai/docs/troubleshooting What to check when a push opened no pull request, a run translated nothing, a job failed, or translation stopped for billing. Two places answer most questions. The project's **Activity** page lists what TolkBot did, newest first. The **Needs you** list on the project's **Overview** shows failures and paused translation, each with a button that fixes it. --- ## No pull request after a push Open the project's **Activity** page and find the push. What the timeline shows tells you where to look. | What the timeline shows | What it means | | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | | No **Push to** entry for the commit | TolkBot left the push out. See [No entry for the push](#no-entry-for-the-push) | | **Push to** _branch_ and **Not translated:** with a reason | TolkBot didn't act on the push. See [Not translated](#not-translated) | | **Push to** _branch_, **Checked** _languages_ and a reason | TolkBot read the push and translated nothing in those languages. See [Checked, and nothing translated](#checked-and-nothing-translated) | | A translation job, and no pull request entry | The job ran, and nothing it translated could be written | | **Couldn't update the pull request for** _language_ | The update failed. See [Pull request failures](#pull-request-failures) | A push that arrives while TolkBot is already translating or writing that language waits for it to finish. Its entry appears once it runs. ### No entry for the push The timeline leaves out pushes that aren't the project's, so it doesn't fill up with every branch and every commit. TolkBot makes no entry when: - **The push went to another branch.** Only the repository's default branch counts, unless **Base branches** in [workflow settings](https://docs.tolkbot.ai/docs/workflow-settings#base-branches-filter) names others. - **The push changed nothing under the project's root directory.** In a monorepo, a project only reacts to files inside the directory you picked when you created it. See [Monorepo support](https://docs.tolkbot.ai/docs/connect-github#monorepo-support). - **The push changed none of the project's translation files**, and automatic pull requests are off, the pusher is in **Ignore users**, or no language is set up. A push that changed a file the source pattern covers gets a **Not translated** entry instead. - **It was one of TolkBot's own pull requests merging.** The **Pull request merged** entry stands for it. - **The project is archived**, or its repository was deleted, transferred or disconnected. The project shows a banner saying why. See [Archived projects](https://docs.tolkbot.ai/docs/organization-and-members#archived-projects). - **The GitHub App is suspended or uninstalled.** A banner at the top of the dashboard says so, with a button to fix it. ### Not translated A push to a branch TolkBot translates from that changed your translation files, and that TolkBot didn't act on, says why: | The entry says | What to do | | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **automatic pull requests are off** | Switch on **Auto-create PRs** under **Settings → Workflow**. A new project has it on. A project created before that became the default has it off unless someone switched it on | | **pushes from** _name_ **are ignored** | The account is in [Ignore users](https://docs.tolkbot.ai/docs/workflow-settings#ignore-users) | | **no language is set up** | A push updates pull requests only for languages that are set up. See [Languages that aren't set up](https://docs.tolkbot.ai/docs/adding-a-language#languages-that-arent-set-up). Projects from before automatic pull requests were the default are the exception: they update every target language | ### Checked, and nothing translated Under **Checked** _languages_, the entry says why a language got nothing: | The entry says | What it means and what to do | | -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Nothing new to translate in** _language_ | Every key the push added or changed already has a translation. See [Nothing was translated](#nothing-was-translated) | | _n_ **keys to translate, below the minimum of** _m_ | With **Minimum keys threshold** above 1, a smaller push translates nothing. See [Minimum keys threshold](https://docs.tolkbot.ai/docs/workflow-settings#minimum-keys-threshold) | | **your payment is failing**, **the spending limit is reached**, **the trial credits are used** or **out of credits** | Translation is paused for billing. See [Credits and payments](#credits-and-payments). Once it is fixed, nothing re-runs on its own: the next push translates, and **Translate missing** picks up the rest | | **the project has no source pattern** | Set **Source pattern** under **Settings → Languages** | | **the only work was removing translations a person holds** | The push removed source keys, and every translation it would have removed is one a person holds. See [Removed and renamed keys](https://docs.tolkbot.ai/docs/removed-and-renamed-keys) | | **Nothing new to commit in** _language_ | The pull request branch already had every value. See [A job ran, and no pull request came of it](#a-job-ran-and-no-pull-request-came-of-it) | Pushes from before this was recorded say only **Checked** _languages_. ### A job ran, and no pull request came of it The job's page has a **Checks** summary. A line such as **3 values withheld for a lock or a pending draft**, under **Waiting on a person**, means TolkBot translated keys a person holds and didn't write them. A key someone locked or is drafting is theirs; TolkBot never writes over it. When every translated key was held, or the pull request branch already had the same values, there is nothing to commit and no pull request update. --- ## Nothing was translated A key counts as translated when the target file has it, even with an empty value, or when the language's open pull request already carries it. So a push can add keys and still have nothing to translate. The other reasons: - **The keys were missing before this push.** By default a push translates only the keys it added or changed. Keys that were missing already stay missing. Use **Translate missing** on the [Translations](https://docs.tolkbot.ai/docs/translations#translate-missing) page, or set the [translation scope](https://docs.tolkbot.ai/docs/workflow-settings#translation-scope) to **All missing keys**. - **The source text changed for a translation a person owns.** TolkBot replaces a translation only if it wrote it and nobody touched it since. Anything else, or a translation with no record of who wrote it, is shown as needing you on the Translations page. See [Changed source text](https://docs.tolkbot.ai/docs/automated-pull-requests#changed-source-text). - **The edit was cosmetic.** A fixed typo, changed whitespace or curly quotes keep the existing translations. - **The key was renamed.** A renamed key takes its translation with it. See [Removed and renamed keys](https://docs.tolkbot.ai/docs/removed-and-renamed-keys). ### Translate missing found nothing The preview in **All languages** says per language why: | Badge | Meaning | | ------------------ | ----------------------------------------------------------------------------------------------------- | | **Up to date** | The language has every key | | **Left out** | Every key with work is held by a person: **locked**, **draft in progress** or **written by a person** | | **Could not read** | TolkBot couldn't parse the language's file | **Translate missing** and **All languages** read your default branch, not the open pull request. ### The CLI found nothing `tolkbot translate` keeps translations it has no record of, and doesn't retranslate them. See [What counts as work](https://docs.tolkbot.ai/docs/cli-translating#what-counts-as-work). --- ## Unreadable locale files When TolkBot can't read the base language file, the run fails, and **Show technical details** on the failure has the message: | Message starts with | What to do | | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `Cannot read source translation file … file not found` | The source pattern or base language doesn't match a file. Fix them under **Settings → Languages** | | `Cannot read source translation file … the file is empty` | The base file is empty on that branch | | `Cannot parse` | The file isn't valid JSON or TypeScript, or the pattern points at the wrong file. See [Supported formats](https://docs.tolkbot.ai/docs/supported-formats) | --- ## Job failures A translation job ends in one of these when it didn't translate everything. See [Activity](https://docs.tolkbot.ai/docs/activity#jobs) for the full list of statuses. | Status | Meaning | What to do | | ----------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | | `partial` | Some keys were translated and some failed | **View Failed Keys** in the job's menu lists them, each with its error | | `failed` | Nothing was translated | **Retry** on the Overview's **Translation failed in** _language_ row starts **Translate missing** for that language | | `cancelled` | Someone cancelled it | Start it again from the Translations page | Nothing re-runs a whole job. A key the job didn't translate keeps the state it had, so a missing key is still missing and **Translate missing** picks it up. To try one key again, open it on the job's **Keys** tab and choose **Retranslate**. You get a notification when a job fails or finishes with failures; see [Notifications and emails](https://docs.tolkbot.ai/docs/notifications-and-emails). ### Why a key failed The error is in the key's **Result** column on the job's page. | Error | What happened and what to do | | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Placeholder validation failed for key …` | The translation dropped or changed a placeholder. TolkBot tried three times, the last with the stronger model, and none kept them all. The refused attempts cost nothing. Write the value yourself on the Translations page. See [Placeholders and plurals](https://docs.tolkbot.ai/docs/placeholders-and-plurals) | | Another error, ending in `(gave up after …)` | The model kept failing on the key, for example during a provider outage. Translate it again later | | Starts with `Insufficient credits`, `Overage limit` or `Your trial credits` | The organization hit a credit limit while the job ran. The job stopped and kept what it had translated. See [Credits and payments](#credits-and-payments) | | `Job cancelled by user` | The job was cancelled before it reached the key. The key shows as skipped | | `Abandoned in … state when the job finalized`, or starts with `Job failed:` | The job stopped before the key finished. Translate it again | A key that is still retrying can show an error in red while it waits for its next attempt. --- ## Pull request failures When TolkBot can't update a pull request, the timeline says **Couldn't update the pull request for** _language_, and the Overview's **Needs you** list has **Pull request update failed for** _language_. Nothing was committed. **Retry** starts **Translate missing** for that language, and the next push tries again too. On the **Pull requests** tab, the language shows **Failed**, or **Last update failed** when a pull request is already open. **Show technical details** on the timeline entry has the error. The common ones: | Error | What to do | | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | `Access denied`, or a resource `not found` | The GitHub App can't reach the repository or a branch it needs. Check the app's repository access on GitHub | | `Another PR write for this language is still active` | Another update of the same language held the branch for over a minute. Retry | | `The PR branch changed after …` or `The source branch changed after validation` | The branch moved while TolkBot wrote. Retry | | `Rate limited, retry after …` | GitHub's API limit. Retry after the time it gives | | A file message | See [Unreadable locale files](#unreadable-locale-files) | TolkBot retries GitHub's temporary errors itself before it reports a failure. ### Changes not in the pull request Edits you send from the dashboard can be left out of the pull request. The Overview then shows **Changes not in the pull request**, with the reason. **Another update for this language is finishing. Try again in a minute.** means another update held the branch. **Retry** sends them again. --- ## Credits and payments When translation stops for billing, the dashboard shows a banner on every page, and the Overview's **Needs you** list starts with **Translation is paused**. While it lasts: - a translation started from the dashboard is refused, with the reason - a push translates nothing and opens no pull request - the CLI exits with code 4 and the same reason; see [Exit codes](https://docs.tolkbot.ai/docs/cli-translating#exit-codes) A job already running when the limit is reached stops between batches. It keeps what it translated, and the keys it didn't reach fail with the reason. Nothing re-runs once translation resumes: the next push translates its own keys, and **Translate missing** picks up the rest. Only admins can change the plan, the spending limit and the payment method. Members see the **Billing** page without the controls. Billing emails go to every member and can't be turned off; see [Notifications and emails](https://docs.tolkbot.ai/docs/notifications-and-emails#billing-and-git-hub-access). See [Billing and credits](https://docs.tolkbot.ai/docs/billing-and-credits) for how credits, overage and the spending limit work. ### Included credits used, overage on Nothing stops, and no banner shows. Translation continues, and the extra credits are billed as overage with the next renewal. Admins and members get an email, **Your included credits are used; overage has started**. An admin who would rather stop here can lower the spending limit or switch overage off in **Billing**. ### Included credits used, overage off The banner says **You are out of credits**, and translation is paused until the credits renew. To continue now, an admin switches overage on in **Billing**. ### Spending limit reached The banner says **You reached your spending limit**, and translation is paused until next month. An email comes at 80% of the limit and another when it is reached. To continue now, an admin raises the limit in **Billing**. ### Trial credits used The banner says **You are out of credits** and that the trial credits are used. A trial has no overage, so translation is paused until the paid plan starts. An admin can start it now with **Start paying now** in **Billing**, which also gives a fresh month of credits. ### A payment failed While the card is still being retried, the banner says **Your payment did not go through**, and the sidebar says **Payment failed**. Translation continues on the included credits that are left. There is no overage while the payment fails, so translation stops when they run out, and the **You're out of credits** email says to update the payment method. After several failed attempts, the banner says **Translations are paused — payment failed**, **Billing** says **Translations are paused: your payment failed**, and everything stops. Either way, an admin chooses **Update payment method** in **Billing**. Translation resumes once the payment goes through. ### Subscription ended The dashboard opens on **Your subscription has ended**, or tells a member that an admin has to subscribe again. Credits left over can still be spent, without overage; then translation stops. An admin chooses **Choose a plan** to start again. Projects, glossaries and learnings are kept. ### Moving to Starter archived a project Starter has one active project. Moving to it archives the others, and moving back to Pro brings them back. See [Changing plans](https://docs.tolkbot.ai/docs/billing-and-credits#changing-plans).