Tip
For information about GitHub integration in Phrase TMS, refer to GitHub (TMS).
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. -
-
Classic tokens
Requires the repo scope (
public_repo
if synchronizing with a public repository) -
Fine-grained tokens
Requires the following permissions:
-
Contents: Read and write
-
Pull requests: Read and write
-
-
-
If SSO is enabled in GitHub, it must also be enabled for the access token.
-
The phrase_translations branch cannot be protected.
-
Ensure repository settings do not require signed commits.
Note
Due to continuous improvements, the user interface may not be exactly the same as presented in the video.
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
page opens. -
Click Add Sync/GitHub.
The
settings window opens. -
Select a project from the dropdown list.
-
Optionally select
and provide the GitHub self-hosted . -
Select a
from the dropdown list. -
Select a
from the dropdown list to import (push) and export (pull) from. This is usually the master branch. -
Click Validate Configuration to ensure access token and configuration file are correct.
-
Optionally select
to import files with every commit to the selected GitHub branch. -
Click Save.
The project is now connected to the selected GitHub repository and added to the list.
Ensure the push commands are correctly configured within the .phrase.yml
configuration file. Push options are the same as for the uploads
API endpoint.
To import files:
-
From the Import .
page, select a project and clickLanguage files (defined as push source entries in the configuration file) are imported into the project.
A default locale must be present.
Note
In case of issues upon importing, use the CLI client to test the
.phrase.yml
configuration file locally and check for any error messages.If required, contact Phrase Technical Support and attach the
.phrase.yml
configuration file to the support request.
Ensure the pull commands are correctly configured within the .phrase.yml
configuration file. Pull options (e.g. include_empty_translations
parameter) are the same as for the locales download
API endpoint.
To export files:
-
From the Export .
page, select a project and clickThe most recent language files in the repository are exported as a new pull request.
-
Once files are exported, the pull request can be merged or closed in the repository and the branch can be deleted.
Note
In case of issues upon exporting, use the CLI client to test the .phrase.yml
configuration file locally and check for any error messages.
If required, contact Phrase Technical Support and attach the .phrase.yml
configuration file to the support request.
Repo syncs keep a history of the latest imports and exports for each Phrase Strings project.
To view the history: