Home/Integrations/GitLab
GitLab integration

Your translations, kept in step by GitLab CI

No plugin to install and no bot to authorise. GitLab already runs commands on merge; two of them keep your translations in step.

GitLab en.json, strings.xml, .po locoloop translate · review glossary · history EU hosted GitLab every locale, native format push pull Source strings leave your repository on every merge. Translated files come back the same way.

The whole integration

Everything below authenticates with one API key, scoped to read or write and optionally pinned to a single platform, so a build job can never reach further than the app it builds.

.gitlab-ci.yml
variables:
  LOCOLOOP: "https://api.rondigi.com/api/v1"

.locoloop:
  image: alpine:3.20
  before_script:
    - apk add --no-cache curl jq

push-strings:
  extends: .locoloop
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
  script:
    - |
      jq '{platform: "web", prune: true,
           keys: [to_entries[] | {name: .key, value: .value}]}' \
        locales/en.json > push.json
      curl -fsS -X POST "$LOCOLOOP/push" \
        -H "X-Api-Key: $LOCOLOOP_API_KEY" \
        -H "Content-Type: application/json" \
        --data @push.json

pull-translations:
  extends: .locoloop
  needs: [push-strings]
  script:
    - |
      for locale in de fr es pl; do
        curl -fsS "$LOCOLOOP/pull?platform=web&locale=$locale" \
          -H "X-Api-Key: $LOCOLOOP_API_KEY" -o "locales/$locale.json"
      done
  artifacts:
    paths: [locales/]

Gate the release on it

GET /status reports how far every locale has got. Fail the job when the language you promised is not finished, and an untranslated string cannot reach production by accident.

.gitlab-ci.yml
translations-complete:
  extends: .locoloop
  stage: deploy
  script:
    - |
      pct=$(curl -fsS "$LOCOLOOP/status?platform=web" \
        -H "X-Api-Key: $LOCOLOOP_API_KEY" | jq '.locales.de.pct')
      echo "German is at ${pct}%"
      [ "$pct" -eq 100 ]
German100%French96%Polish71%

What GitLab gets you

Masked, scoped, pinned

Store the key as a masked CI/CD variable. Pin it to one platform in locoloop and a leaked runner log still reaches nothing else.

Cheap to poll

pull answers 304 Not Modified against an ETag, so a scheduled pipeline that finds no news costs nothing.

Native formats

The file comes back as that platform's own format — JSON, strings.xml, .po, .arb, XLIFF.

Put it in your GitLab pipeline today

Create a workspace, mint a read/write key, paste the job in. Free while you are evaluating.

Start freeLog inBook a demo