Home/Integrations/Bitbucket
Bitbucket integration

Your translations, kept in step by Bitbucket Pipelines

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

Bitbucket en.json, strings.xml, .po locoloop translate · review glossary · history EU hosted Bitbucket 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.

bitbucket-pipelines.yml
image: alpine:3.20

definitions:
  steps:
    - step: &locoloop-sync
        name: Sync translations
        script:
          - apk add --no-cache curl jq
          - export LOCOLOOP=https://api.rondigi.com/api/v1
          - |
            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
          - |
            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: [locales/**]

pipelines:
  branches:
    main:
      - step: *locoloop-sync

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.

bitbucket-pipelines.yml
main:
      - step:
          name: Translations complete
          script:
            - apk add --no-cache curl jq
            - |
              pct=$(curl -fsS \
                "https://api.rondigi.com/api/v1/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 Bitbucket gets you

One repository variable

Add LOCOLOOP_API_KEY as a secured repository variable. That is the entire setup.

Renames survive

Rename a key in locoloop and a pipeline still pushing the old name updates the same key rather than resurrecting a duplicate.

Deploy blocked, not warned

The gate is an exit code. A missing translation stops the deploy the way a failing test does.

Put it in your Bitbucket pipeline today

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

Start freeLog inBook a demo