Integrations

GitLab (Strings)

Article content is machine translated from English to other languages by Phrase Translate.

Prerequisites

  • The .phrase.yml configuration file must be present in the root of the branch to be monitored. The file defines which files to import (pull) or export (push) from the repository.

  • Read and write access are required for the repository.

  • Incorrectly defined configuration files may cause errors. Ensure that the file contains at least one push and one pull target, correct file formats and the correct setting of the update_translations parameter.

  • Use GitLab 9.5 or newer to ensure API compatibility.

Connect Repositories

Once the configuration file is in place, to connect a repository, follow these steps:

  1. From the Integrations page, scroll down to the GitLab Sync connector and click Configure.

    The GitLab Sync page opens.

  2. Click Add GitLab Sync.

    The GitLab Sync settings window opens.

  3. Select a project from the dropdown list.

    GitLab Sync settings are presented.

  4. Optionally select GitLab self-hosted and provide the GitLab self-hosted api endpoint.

  5. Optionally select Enable auto import from GitLab to import files with every commit to the selected GitLab branch.

  6. Provide a Personal access token with an api scope.

  7. Select a GitLab project from the dropdown list.

  8. Select a Project branch from the dropdown list to import (push) and export (pull) from. This is usually the master branch.

  9. Click Validate Configuration to ensure access token and configuration file are correct.

  10. Click Save.

    The project is now connected to the selected GitLab repository and added to the list.

Import and Export Files

To import files:

  • From the GitLab Sync page, select a project and click Import.

    Gitlab data is imported into the selected project.

To export files, follow these steps:

  1. From the GitLab Sync page, select a project and click Export.

    The most recent files in the repository are exported as a new pull request.

  2. Once files are exported, the pull request can be merged or closed in the repository and the branch can be deleted.

History

Gitlab Sync keeps a history of the lastest imports and exports for each Phrase project.

To view the history:

  • From the GitLab Sync page, select a project and click History.

    The import and export history for the project is presented. Export entries in the history include a link to the corresponding merge request.

Was this article helpful?

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.