Connectors

GitLab Connector

GitLab is an open-source, web-based DevOps lifecycle tool that focuses on software development. It lets teams work together on code and gives increased control over their repositories.

Memsource supports three different connectors for Git Service accounts: Git, GitHub, and GitLab. Each one requires a different method of authentication, access, and setup. Please visit the Git and GitHub connector pages for more setup information regarding those connectors.

Set up the GitLab Connector

Connecting to GitLab

Unlike GitHub, GitLab allows for the use of REST APIs and thus requires a more complicated setup. To set up the connection between GitLab and Memsource, you first need to create an access token in your GitLab account.

 

Step 1: Log into your GitLab account and navigate to Settings and click on Access Tokens.

Step 2: Fill in the Name and Expires at fields. It’s best to choose a longer time period so that you don’t need to re-create the token again and again.

Step 3: Under Scopes, check the API and read_user checkboxes.

Step 4: Click on Create personal access token. This will generate a token that you will need to enter into Memsource. Important: The token is only visible at this stage and cannot be reached afterward.

With the access token correctly created and copied, navigate back to Memsource to establish the connector. The following fields are required to set up the GitLab connector:

  • Name
  • Type (GitLab)
  • GitLab site URL (the same URL where the Access token was generated)
  • GitLab personal access token
  • Commit message

Connecting in Memsource

Step 1: In Memsource, go to Setup in the top right corner. Scroll down to the Integrations section and click on Connectors.

 

 

Step 2: Click New.

Step 3: Under, Type choose GitLab.

Step 4: Complete the GitLab site URL field and enter your token from GitLab into the GitLab personal access token field.

Step 5: Click Test connection. 

If a little tick appears next to the Test connection button, then everything’s connected correctly. If not, you’ll see a little exclamation mark. If you do see the exclamation mark, check that you’ve entered your GitLab site URL and the GitLab personal access token correctly.

Once you see the tick, click Save. The new integration will now appear in your list of connectors.

Using the GitLab Connector

Now that you have your connector set up, it’s time to put it to use. You can do this in two ways:

  1. Use Automated Project Creation so that Memsource checks your GitLab files for changes at regular intervals. New projects and jobs are created when you make any changes.
  2. Manually create Memsource jobs from your GitLab files. This will be explained in the steps below.

 

Step 1: To set up projects manually, go to a project and select New.

Step 2: Instead of adding a new file, click Add from Online Repository

Step 3: Select the GitLab integration that you created. Then, select the file or files that need to be translated.

Manual or Automated File Retrieval

Memsource enables users to either manually or automatically retrieve content from Online Repositories or CMSs.

When creating a new job, instead of selecting Choose Files to manually retrieve files from your local PC's hard drive, select Add from Online Repository. Then browse the folder structure directly in your Git account and choose the files you want to translate.

Show Files Added or Changed in the Last Commit

In this same section, users attempting to manually upload documents from their Git repository to Memsource can easily identify content that has been changed or added in the last commit. Display changed or new content by clicking on Git Service at the top of the window and then clicking the folder name in the bottom half of the window. The Show button will be located in the middle of the screen.

Automated Project Creation

Together with the GIT connector, Automated Project Creation allows you to monitor folders, subfolders, and even specific files to detect when new content is added or existing content is modified.

Organizations can define a folder structure specifically for files targeted for localization, and Memsource will do the rest. This option also eliminates accidental imports of documents that are not really intended for translation but still need to be contained in the same folder as translatable content (e.g. Readme files).

This can be done in the Automated Project Settings section of Memsource. Click the Set remote folder button to either monitor entire folders or specific files only.

Continuous Jobs

Memsource knows that developers code around the clock. To make your life even easier, Memsource supports continuous jobs, allowing you to upload new versions of files that are still being translated. They are then pushed back to your Git repository periodically, once changes have been made.  

Troubleshooting

During setup, you may see a small red ! after you click Connection test. If this happens…

Video

To see a demonstration outlining how each of these processes work, please see the video below: