Code hosting integrations

Weblate integrates with code hosting sites in several separate places: repository access, incoming notifications, and pushing translations back. The exact setup depends on whether you use Hosted Weblate or run your own Weblate instance, and on whether Weblate should push directly or create pull requests.

Use this page as a provider-oriented checklist. The individual setting pages remain the canonical reference for setting syntax.

Setup overview

  1. Grant Weblate access to the repository.

  2. Configure Stór cód foinse so Weblate can clone the repository.

  3. Configure incoming notifications so Weblate pulls changes soon after a push. The repository webhook or app must point to the matching Weblate hook URL, and the project must have Cumasaigh crúcaí enabled.

  4. Decide how Weblate should push translations back:

    • Use Git or mearcair and URL bhrú stórais to push directly.

    • Use a provider-specific VCS backend, such as GitHub or GitLab, to create pull or merge requests. These backends need API credentials in the Weblate settings.

  5. Optionally set Brainse a bhrú when Weblate should push to a branch in the upstream repository instead of using a fork where supported.

Athruithe a bhrú ó Weblate

Each translation component can have a push URL set up (see URL bhrú stórais), and in that case Weblate will be able to push changes to the remote repository. Weblate can also be configured to automatically push changes on every commit; this is enabled by default, see Brúigh ar thiomantas.

If you do not want changes to be pushed automatically, you can push manually under Repository maintenance or using the API via wlc push.

In case you do not want direct pushes by Weblate, there is support for Iarratais tharraingt GitHub, Iarratais chumasc GitLab, Iarratais tarraingt Gitea, leathanach iarratais chumaisc, Iarratais tarraingthe Azure DevOps, or Gerrit review requests reviews. You can activate these by choosing GitHub, GitLab, Gitea, Gerrit, Azure DevOps, or Pagure as Córas rialaithe leagan in Cumraíocht na Comhpháirte.

Overall, following options are available with Git, Mercurial, GitHub, GitLab, Gitea, Pagure, Azure DevOps, Gerrit, Bitbucket Data Center and Bitbucket Cloud:

Socrú inmhianaithe

Córas rialaithe leagan

URL bhrú stórais

Brainse a bhrú

Gan bhrú

Git

folamh

folamh

Brúigh go díreach

Git

URL SSH

folamh

Brúigh chuig brainse ar leith

Git

URL SSH

Ainm brainse

Gan bhrú

mearcair

folamh

folamh

Brúigh go díreach

mearcair

URL SSH

folamh

Iarratas tarraingt GitHub ón bhforc

Iarratais tharraingt GitHub

folamh

folamh

Iarratas tarraingt GitHub ón bhrainse

Iarratais tharraingt GitHub

URL SSH [1]

Ainm brainse

Iarratas cumaisc GitLab ón bhforc

Iarratais chumasc GitLab

folamh

folamh

Iarratas cumaisc GitLab ón bhrainse

Iarratais chumasc GitLab

URL SSH [1]

Ainm brainse

Iarratas chumasc Gitea ón bhforc

Iarratais tarraingt Gitea

folamh

folamh

Iarratas chumasc Gitea ón bhrainse

Iarratais tarraingt Gitea

URL SSH [1]

Ainm brainse

Iarratas cumaisc leathanach ón bhforc

leathanach iarratais chumaisc

folamh

folamh

leathanach iarratas cumaisc ón bhrainse

leathanach iarratais chumaisc

URL SSH [1]

Ainm brainse

Tarraingíonn Azure DevOps iarratas ón bhforc

Iarratais tarraingthe Azure DevOps

folamh

folamh

Tarraingíonn Azure DevOps iarratas ón bhrainse

Iarratais tarraingthe Azure DevOps

URL SSH [1]

Ainm brainse

Gerrit review

Gerrit review requests

URL SSH

Target branch name (optional)

Iarratas tarraingte ón bhforc ag Ionad Sonraí Bitbucket

Iarratais ar tharraingt Ionad Sonraí Bitbucket

folamh

folamh

Iarratas tarraingte ón mbrainse ag Ionad Sonraí Bitbucket

Iarratais ar tharraingt Ionad Sonraí Bitbucket

URL SSH [1]

Ainm brainse

Iarratas tarraingt Bitbucket Cloud ón bhforc

Iarratais ar tharraingt Bitbucket Cloud

folamh

folamh

Iarratas tarraingt Bitbucket Cloud ón bhrainse

Iarratais ar tharraingt Bitbucket Cloud

URL SSH [1]

Ainm brainse

GitHub

GitHub repository access

Tá dhá phríomhchur chuige ann chun rochtain a fháil ar stórtha GitHub le Weblate:

Option 1: HTTPS with personal access token

Use HTTPS authentication with a personal access token and your GitHub account. This works for both read-only access and read-write access.

Chun an cur chuige seo a úsáid:

  1. Cruthaigh comhartha rochtana pearsanta mar a thuairiscítear in Comhartha rochtana a chruthú lena úsáid ag an líne ordaithe.

  2. Include the token in your repository URL: https://username:token@github.com/owner/repo.git.

This is suitable when you are starting with Weblate or working with a single repository.

Option 2: SSH with a dedicated user

For setups with multiple repositories, create a dedicated user for Weblate. This avoids GitHub's limitation that each SSH key can only be used once per platform.

Chun an cur chuige seo a úsáid:

  1. Create a dedicated GitHub user account, for example weblate-bot.

  2. Add Weblate's public SSH key to this user, see Eochracha gréasáin SSH.

  3. Grant this user access to all repositories you want to translate.

  4. Use SSH URLs for your repositories: git@github.com:owner/repo.git.

Úsáidtear an cur chuige seo le haghaidh Hosted Weblate freisin, a bhfuil úsáideoir weblate tiomnaithe aige chuige sin.

Note

When using GitHub for pull requests, the Brainse a bhrú configuration affects the behavior: if not set, the project is forked and changes are pushed through a fork. If set, changes are pushed to the upstream repository and the chosen branch.

GitHub notifications

Tagann Weblate le tacaíocht dhúchais do GitHub.

If you are using Hosted Weblate, the recommended approach is to install the Weblate app. The app delivers GitHub notifications to Hosted Weblate, so you do not need to configure a separate Webhook in GitHub. However, it does not by itself grant Hosted Weblate write access to the repository. To push changes back, you still need to add the Hosted Weblate weblate GitHub user as a collaborator with write access, see Teacht ar stórtha ó Hosted Weblate.

If you are not using the app, add the Weblate webhook in the repository settings (Webhooks) to receive notifications on every push to a GitHub repository, as shown on the image below:

../_images/github-settings.png

Is éard atá sa Payload URL do URL Weblate atá i gceangal le /hooks/github/, mar shampla don tseirbhís Hosted Weblate, is é seo https://hosted.weblate.org/hooks/github/.

You can leave other values at default settings. Weblate can handle both content types and consumes just the push event.

Iarratais tharraingt GitHub

Cuireann sé seo sraith tanaí ar bharr Git ag baint úsáide as an GitHub API chun athruithe aistriúcháin a bhrú mar iarratais tarraingthe, in ionad brú díreach chuig an stór.

Git pushes changes directly to a repository, while the GitHub backend creates pull requests. The latter is not needed for merely accessing Git repositories.

To create pull requests, select GitHub as Córas rialaithe leagan and configure GITHUB_CREDENTIALS. For GitHub.com, use api.github.com as the API host. The token must allow Weblate to read and write repository contents and create pull requests. If Weblate should fork private repositories, the token might also need administration access.

GitLab

GitLab repository access

Access via SSH is possible, see stórtha SSH, but if you need to access more than one repository, you will hit a GitLab limitation on allowed SSH key usage because each key can be used only once.

Sa chás nach bhfuil an Brainse a bhrú socraithe, tá an tionscadal forc agus athruithe á bhrú trí fhorc. I gcás go bhfuil sé socraithe, déantar athruithe a bhrú ar an stór in aghaidh an tsrutha agus an brainse roghnaithe.

Is féidir comharthaí rochtana pearsanta nó tionscadail a úsáid chomh maith. Teastaíonn raon feidhme write_repository ón gcomhartha le go mbeidh sé in ann athruithe a bhrú chuig an stór. Éilíonn an comhartha rochtana tionscadail ról Developer le haghaidh brú.

The URL needs to contain a username. For a personal access token, it is the actual username: https://user:personal_access_token@gitlab.com/example/example.git. For project access tokens it can be a non-blank value: https://example:project_access_token@gitlab.com/example/example.git.

Note

The rules for using project access tokens have changed between GitLab releases, the non-blank value is the current requirement, but older versions had different expectations (project name, bot user name). Check GitLab documentation matching your version if unsure.

GitLab notifications

Weblate has support for GitLab hooks. Add a project webhook with destination to /hooks/gitlab/ URL on your Weblate installation, for example https://hosted.weblate.org/hooks/gitlab/.

Fabhtcheartú

Iarratais chumasc GitLab

This adds a thin layer atop Git using the GitLab API to allow pushing translation changes as merge requests instead of pushing directly to the repository.

There is no need to use this to access Git repositories, ordinary Git works the same, the only difference is how pushing to a repository is handled. With Git changes are pushed directly to the repository, while the GitLab backend creates a merge request.

To create merge requests, select GitLab as Córas rialaithe leagan and configure GITLAB_CREDENTIALS.

Gitea, Forgejo, and Codeberg

For Hosted Weblate repositories on Codeberg, add the hosted weblate user where write access is needed, see Teacht ar stórtha ó Hosted Weblate.

Gitea notifications

Weblate has support for Gitea webhooks. Add a Gitea Webhook for Push events event with destination to /hooks/gitea/ URL on your Weblate installation, for example https://hosted.weblate.org/hooks/gitea/. This can be done in Webhooks under repository Settings.

Forgejo notifications

Weblate has support for Forgejo webhooks. Add a Forgejo Webhook for Push events event with destination to /hooks/forgejo/ URL on your Weblate installation, for example https://hosted.weblate.org/hooks/forgejo/. This can be done in Webhooks under repository Settings.

Iarratais tarraingt Gitea

Added in version 4.12.

This adds a thin layer atop Git using the Gitea API to allow pushing translation changes as pull requests instead of pushing directly to the repository.

There is no need to use this to access Git repositories, ordinary Git works the same, the only difference is how pushing to a repository is handled. With Git changes are pushed directly to the repository, while the Gitea backend creates pull requests.

To create pull requests, select Gitea as Córas rialaithe leagan and configure GITEA_CREDENTIALS.

Bitbuicéad

Hosted Weblate has a dedicated weblate user for Bitbucket access, see Teacht ar stórtha ó Hosted Weblate.

To push directly, use Git or mearcair with URL bhrú stórais.

Bitbucket notifications

Weblate has support for Bitbucket webhooks. Add a webhook which triggers upon repository push, with destination to /hooks/bitbucket/ URL on your Weblate installation, for example https://hosted.weblate.org/hooks/bitbucket/.

../_images/bitbucket-settings.png

Iarratais ar tharraingt Ionad Sonraí Bitbucket

Added in version 4.16.

This adds a thin layer atop Git using the Bitbucket Data Center API to allow pushing translation changes as pull requests instead of pushing directly to the repository.

Warning

Ní thacaíonn sé seo le Bitbucket Cloud API.

There is no need to use this to access Git repositories, ordinary Git works the same, the only difference is how pushing to a repository is handled. With Git changes are pushed directly to the repository, while the Bitbucket Data Center backend creates a pull request.

To create pull requests, select Bitbucket Data Center as Córas rialaithe leagan and configure BITBUCKETSERVER_CREDENTIALS.

Iarratais ar tharraingt Bitbucket Cloud

Added in version 5.8.

This adds a thin layer atop Git using the Bitbucket Cloud API to allow pushing translation changes as pull requests instead of pushing directly to the repository.

Warning

Tá sé seo difriúil ó Bitbucket Data Center API.

There is no need to use this to access Git repositories, ordinary Git works the same, the only difference is how pushing to a repository is handled. With Git changes are pushed directly to the repository, while the Bitbucket Cloud backend creates a pull request.

To create pull requests, select Bitbucket Cloud as Córas rialaithe leagan and configure BITBUCKETCLOUD_CREDENTIALS.

Azure DevOps

Azure Repos notifications

Weblate has support for Azure Repos webhooks. Add a webhook for Code pushed event with destination to /hooks/azure/ URL on your Weblate installation, for example https://hosted.weblate.org/hooks/azure/. This can be done in Service hooks under Project settings.

Iarratais tarraingthe Azure DevOps

Cuireann sé seo sraith tanaí ar bharr Git ag baint úsáide as an Azure DevOps API chun athruithe aistriúcháin a bhrú mar iarratais tarraingthe, in ionad brú díreach chuig an stór.

Git pushes changes directly to a repository, while the Azure DevOps backend creates pull requests. The latter is not needed for merely accessing Git repositories.

To create pull requests, select Azure DevOps as Córas rialaithe leagan and configure AZURE_DEVOPS_CREDENTIALS.

Pagure

Pagure notifications

Weblate has support for Pagure hooks. Add a webhook with destination to /hooks/pagure/ URL on your Weblate installation, for example https://hosted.weblate.org/hooks/pagure/. This can be done in Activate Web-hooks under Project options:

../_images/pagure-webhook.png

leathanach iarratais chumaisc

Added in version 4.3.2.

This adds a thin layer atop Git using the Pagure API to allow pushing translation changes as merge requests instead of pushing directly to the repository.

There is no need to use this to access Git repositories, ordinary Git works the same, the only difference is how pushing to a repository is handled. With Git changes are pushed directly to the repository, while the Pagure backend creates a merge request.

To create merge requests, select Pagure as Córas rialaithe leagan and configure PAGURE_CREDENTIALS.

Other workflows

Gitee notifications

Weblate has support for Gitee webhooks. Add a WebHook for Push event with destination to /hooks/gitee/ URL on your Weblate installation, for example https://hosted.weblate.org/hooks/gitee/. This can be done in WebHooks under repository Management.

Gerrit review requests

Gerrit support adds a thin layer atop Git using the git-review tool to allow pushing translation changes as Gerrit review requests, instead of pushing them directly to the repository.

The optional Brainse a bhrú setting selects the target branch for the Gerrit review. Leave it empty to use Brainse stór. Use the short branch name, such as main; Weblate and git-review push the review to refs/for/<branch> automatically. Do not include Gerrit push options such as %submit or %l=Code-Review+2 in the branch name.

The Gerrit documentation has the details on the configuration necessary to set up such repositories. There is no separate code hosting credential setting for this backend.

Docker credentials

For Docker installations, code hosting API credentials can also be provided through environment variables, see Dintiúir suímh óstála cód.