To automatically create a configuration file, follow these steps:
-
From the command line, type
phrase init
to create a .phrase.yml file.The configuration process starts in the CLI.
-
Provide:
-
Access token
-
Phrase project ID
-
Locale file format
-
Location of locale files in the project codebase
-
A basic configuration file is created.
If using a manually created or copied configuration file, place it in one of these locations:
-
The directory in which the CLI client is called.
-
The home directory of the current user (
$HOME
in Unix,$HomePath
in Windows). -
The path specified in the
PHRASEAPP_CONFIG
environment variable. -
Path to configuration file via the
--config
flag (e.g./some/path/to/phrase.yml
).
Sample configuration file.
GitLab
-
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. -
Use GitLab 9.5 or newer to ensure API compatibility.
GitHub
-
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. -
A GitHub access token for the scope of the repository (
public_repo
if synchronizing with a public repository). -
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.
BitBucket
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.