Integrations

Continuous Integration (Strings)

Content is machine translated from English by Phrase Language AI.

Use the CLI client to synchronize translations from within a CI environment.

To download strings into a CI environment, follow these steps:

  1. Create a .phrase.yml configuration file.

  2. Add a new bash script or step to the CI.

    • To upload new strings, add this command to script:

      #!/bin/bash
      
      # upload new strings to Phrase as configured in the .phrase.yml
      
      phrase push

      Ensure update_translation or update_description parameters are set if intending to not only add new values but also update existing values.

    • To download translated strings into the current workspace, add this command:

      #!/bin/bash
      
      # get new strings from phrase as configured in the .phrase.yml
      
      phrase pull

      Ensure the correct keys are included by using tags, as well as required options for verified and translated entries.

    • Register a webhook to subscribe to the required events.

      Webhooks are available for major events (e.g., a processed upload or completed order). A common workflow is to set up a notification for newly created comments in a Slack channel, as well as import scripts for job completions.

      API can also be used to query the current state of these items as well, depending on update cycles.

Branches

Phrase Strings has a branching concept for versioning that differs from typical applications of Git branches. Phrase branches can be used alongside Git branches. Check in the branch name in the configuration file for that branch and run CI steps in it.

When adding features, translations are usually added without removing existing ones. Add tags to the working branches and upload them to the main branch to allow tracking of features with share keys but also pulls and tests on certain subsets without confusing translators.

Was this article helpful?

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.