Start

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 with a subscription or a trial

Step 1: Connect GitHub

  1. Sign in to the TolkBot dashboard at 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 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 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.


Step 4: Push a change

Add a key to your source locale file and push to your default branch:

{
    "welcome": "Welcome to our application",
    "dashboard": {
        "title": "Dashboard",
        "greeting": "Hello, {name}"
    }
}
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. To translate the keys your target files were already missing, use Translate missing on the project's Translations 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

Previous
Getting started