2020-10-30 14:08:56 -04:00
---
2020-11-17 10:09:28 -05:00
stage: Manage
group: Import
2020-11-26 01:09:20 -05:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-10-30 14:08:56 -04:00
---
2020-04-07 14:09:19 -04:00
# Merging translations from CrowdIn
2018-09-26 08:30:08 -04:00
2020-04-07 14:09:19 -04:00
CrowdIn automatically syncs the `gitlab.pot` file with the CrowdIn service, presenting
2019-10-24 23:06:02 -04:00
newly added externalized strings to the community of translators.
2018-09-26 08:30:08 -04:00
2020-04-07 14:09:19 -04:00
[GitLab CrowdIn Bot ](https://gitlab.com/gitlab-crowdin-bot ) also creates merge requests
2019-10-24 23:06:02 -04:00
to take newly approved translation submissions and merge them into the `locale/<language>/gitlab.po`
2020-02-06 10:09:11 -05:00
files. Check the [merge requests created by `gitlab-crowdin-bot` ](https://gitlab.com/gitlab-org/gitlab/-/merge_requests?scope=all&utf8=%E2%9C%93&state=opened&author_username=gitlab-crowdin-bot )
2019-10-22 11:06:06 -04:00
to see new and merged merge requests.
2018-09-26 08:30:08 -04:00
## Validation
2020-04-07 14:09:19 -04:00
By default CrowdIn commits translations with `[skip ci]` in the commit
2018-09-26 08:30:08 -04:00
message. This is done to avoid a bunch of pipelines being run. Before
merging translations, make sure to trigger a pipeline to validate
2020-04-07 14:09:19 -04:00
translations, we have static analysis validating things CrowdIn
2019-09-27 08:06:07 -04:00
doesn't do. Create a new pipeline at `https://gitlab.com/gitlab-org/gitlab/pipelines/new`
(need Developer access permissions) for the `master-i18n` branch.
2018-09-26 08:30:08 -04:00
If there are validation errors, the easiest solution is to disapprove
2020-04-07 14:09:19 -04:00
the offending string in CrowdIn, leaving a comment with what is
2018-09-26 08:30:08 -04:00
required to fix the offense. There is an
2020-05-21 02:08:25 -04:00
[issue ](https://gitlab.com/gitlab-org/gitlab/-/issues/23256 )
2020-12-07 13:10:36 -05:00
suggesting to automate this process. Disapproving excludes the
invalid translation, the merge request is then updated within a few
2018-09-26 08:30:08 -04:00
minutes.
2020-07-22 08:09:42 -04:00
If the translation has failed validation due to angle brackets `<` or `>`
it should be disapproved on CrowdIn as our strings should be
using [variables ](externalization.md#html ) for HTML instead.
2020-04-07 14:09:19 -04:00
It might be handy to pause the integration on the CrowdIn side for a
2018-09-26 08:30:08 -04:00
little while so translations don't keep coming. This can be done by
2020-04-07 14:09:19 -04:00
clicking `Pause sync` on the [CrowdIn integration settings
2018-09-26 08:30:08 -04:00
page](https://translate.gitlab.com/project/gitlab-ee/settings#integration).
## Merging translations
When all translations are found good and pipelines pass the
2019-10-24 23:06:02 -04:00
translations can be merged into the master branch. When merging the translations,
2020-04-07 14:09:19 -04:00
make sure to check the **Remove source branch** checkbox, so CrowdIn recreates the
2019-10-24 23:06:02 -04:00
`master-i18n` from master after the new translation was merged.
2018-09-26 08:30:08 -04:00
2020-05-21 02:08:25 -04:00
We are discussing [automating this entire process ](https://gitlab.com/gitlab-org/gitlab/-/issues/19896 ).
2018-09-26 08:30:08 -04:00
## Recreate the merge request
2020-04-07 14:09:19 -04:00
CrowdIn creates a new merge request as soon as the old one is closed
2020-12-07 13:10:36 -05:00
or merged. But it does not recreate the `master-i18n` branch every
2020-04-07 14:09:19 -04:00
time. To force CrowdIn to recreate the branch, close any [open merge
2020-02-06 10:09:11 -05:00
request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests?scope=all& utf8=%E2%9C%93& state=opened& author_username=gitlab-crowdin-bot)
2018-09-26 08:30:08 -04:00
and delete the
2019-09-27 08:06:07 -04:00
[`master-18n` ](https://gitlab.com/gitlab-org/gitlab/-/branches/all?utf8=✓&search=master-i18n ).
2018-09-26 08:30:08 -04:00
This might be needed when the merge request contains failures that
have been fixed on master.
2020-06-10 20:08:35 -04:00
## Recreate the GitLab integration in CrowdIn
2020-12-04 16:09:29 -05:00
NOTE:
2020-06-10 20:08:35 -04:00
These instructions work only for GitLab Team Members.
2021-02-03 16:09:17 -05:00
If for some reason the GitLab integration in CrowdIn doesn't exist, you can
recreate it with the following steps:
1. Sign in to GitLab as `gitlab-crowdin-bot` . (If you're a GitLab Team Member,
find credentials in the GitLab shared
[1Password account ](https://about.gitlab.com/handbook/security/#1password-for-teams ).)
1. Sign in to CrowdIn with the GitLab integration.
1. Go to **Settings > Integrations > GitLab > Set Up Integration** .
1. Select the `gitlab-org/gitlab` repository.
1. In `Select Branches for Translation` , select `master` .
1. Ensure the `Service Branch Name` is `master-i18n` .