How to reliably check (pre-)translation status before downloading translations? #969
-
|
Hi, I'm in the process of integrating Crowdin into CI/CD. The goal is to have an automatic Crowdin sync without manual intervention from the developer.
For 2 I'm using This is necessary, since pre-translation for new source uploads runs asynchronously - i.e. downloading translations immediately after uploading new sources doesn't (always) return the correct/updated translations. Question 1: Question 2: EDIT:
Ok, I guess it would be possible to trigger the pre-translation explicitly via API/api-client and then observe the status as outlined in https://github.com/crowdin/crowdin-api-client-js/blob/master/EXAMPLES.md#pre-translate-project. Unfortunately, switching from the CLI to calling the API directly involves quite some work... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Hi @finebel!
This is the current API behavior, and it has always been this way. I doubt it can be changed.
Yes. It is possible to run pre-translation explicitly and synchronously. Please take a look at discussion crowdin/github-action#280, which contains a lot of useful information on the matter. BTW, what do you use for your CI/CD? With GitHub Actions, it's possible to use webhooks to trigger the workflow. This makes the status check in a loop redundant. See this guide for more details - https://store.crowdin.com/github-actions-webhook. In this case, one workflow is responsible for uploading sources, and another is responsible for downloading translations. |
Beta Was this translation helpful? Give feedback.

Hi @finebel!
This is the current API behavior, and it has always been this way. I doubt it can be changed.
Yes.
It is possible to run pre-translation explicitly and synchronously. Please take a look at discussion crowdin/github-action#280, which contains a lot of useful information on the matter.
BTW, what do you use for your CI/CD? With GitHub Actions, it's possible …