-
Bitbucket Sync is only supported for Bitbucket Cloud. It cannot be used with Bitbucket Server.
-
Bitbucket Sync can be used via API.
Prerequisites
-
The
.phrase.yml
configuration file must be present in the repository. 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.
Sample configuration file:
phraseapp: project_id: 1f61b9ecdb7a17a9dd174302419c50cc file_format: simple_json push: sources: - file: ./<locale_name>.json pull: targets: - file: ./<locale_name>.json
Project ID of a project is found in project settings.
Once the configuration file is in place, to connect a repository, follow these steps:
-
From the Configure.
page, scroll down to the connector and clickThe
configuration page opens. -
Click Connect repository.
The
window opens. -
Select a repository from the dropdown list and click Save.
The repository is added to list of connected repositories and an access token is automatically created.
If repository ownership is not correct, the repository will not be visible in the dropdown list.
Integrations can be deactivated or removed from the
page.After activating Bitbucket Sync and connecting a repository, local files can be imported. This is done in the form of pull requests so changes can be reviewed and branch management can be controlled.
To import local files to BitBucket, follow these steps:
To export locale files from Bitbucket, follow these steps:
-
From the Bitbucket account, select a repository to be synchronized.
-
Select a branch of the repository and from the context menu, click Export to Phrase.
Translations are pushed into the project. Keys and current translations are updated.
-
Click on an upload in the list or from Uploads in the project to see a detailed upload summary.
Successful uploads are indicated with a green icon and failed uploads are indicated with a red icon.