Apply Pre-translate issue


I’m attempting to implement the same pre-translation functionality as found on the project page of “my-project” via Dashborad using the Crowdin dev API. I’ve followed these steps:

  1. Initiated a POST request to {protocol}://{host}/api/v2/projects/{projectId}/pre-translations with the required parameters.
  2. Periodically checked the pre-translation status at projects/{projectId}/pre-translations/{preTranslationId} until it is marked as finished.

I’ve also examined the network requests made by the Crowdin site, and they closely resemble what I’m trying to achieve through the Crowdin dev API.

Based on my observations, I’ve narrowed down the possibilities to two options:

  1. There may be a bug in the apply-pretranslate API.
  2. I might be overlooking some steps in the pre-translation process.

Could you please assist me with resolving this issue? I would appreciate it if you could point out any mistakes I may have made in my approach.

Hi @pavel.karpukhin

Can you please clarify what issues you are facing with the pre-translate feature and what is the expected result?

Looking forward to your reply,

I want to have the same functionality that crowdin on Crowdin>dashboard-> pre-translation-> via TM

When I pre-translate string resources on crowdin site it works perfectly. As soon as pre-translation is finished, I can see that my string resources are translated via TM.

I expect the same behaviour when I use projects/{projectId}/pre-translations with TM parameters. The problem is that as soon as I use Apply Pre-Translation from API v2 Reference and wait until it 's finished, I do not see translated string resources


Thank you for sharing the details!

Please provide details of how you are making a request, including any request body parameters. Do you any of the Crowdin API Clients?

I do not use any Crowdin API Clients.

Here is my pre-translate request using package:

            .header("Authorization", "Bearer my token")
            .header("Content-Type", "application/json")

        val response = client.send(request, HttpResponse.BodyHandlers.ofString())

request body:




Hi @pavel.karpukhin ,

Thanks for the details! As far as I can see, the response is successful. However, in your request body, you have set the parameter “translateWithPerfectMatchOnly”:true, which means that only those strings that have a perfect match TM suggestion will receive the translation.

From my database, I can see that this file that you are applying pre-translation to has only 3 untranslated strings in French, for example, and none of them has a perfect match in the TM.

Thus, when running the Apply Pre-translation method, the response is successful, but there is nothing to apply. If you set the parameter “translateWithPerfectMatchOnly”:false, the translations will be applied when there are perfect match and not less than 100% match suggestions.

Hope this helps!

Hi, @taniam

Thanks for response!

I have tried to set translateWithPerfectMatchOnly to false.
Unfortunately, it is futile.

I added another string resource that has already been translated, and translation for this string exists in TM. Applying Pre-translation has still no results

@pavel.karpukhin ,

In the file with the ID 57614, there are only untranslated 3 strings. Two of them do not have TM suggestions at all, and the third one has the suggestion but its match ratio is 70%. In order for the translations to be applied, the match ratio needs to be 100%.

As for the second file, I do not see from our database any new files added recently. Could you please let me know its ID if it is the same project?

PROJECT_ID = 292597

Please, take a look at the attached screenshot.
I haven’t added new file. I have added text to existed file.
There are untranslated string resource and translation from TM that has 100% match

@pavel.karpukhin ,

Thanks! Let me please check everything with the team and get back to you.

Hi @pavel.karpukhin,

As far as I can see from our database, the string “Request a call” has already been translated using the TM. Could you please confirm if everything worked fine?

Hi, apply pre-translate still doesn’t work

Dear Pavel,

As I can from the last message, pre-translation was applied. Could you please share details of what file are you trying to pre-translate this time, the request, and the response you are getting?

@NataliaS , Hi

I have added new file with name features_temp_string.xml
With single string: Call Requested

Request body:




Then I open my project on crowdin website and see that features_temp_string.xml hasn’t been translated.

Dear Pavel,

Could you please try to run this string with pre-translate via IU? Just to check if the issue is related only to the API

Done it.
Pre-translate via UI works perfectly

Thank you! We need to investigate case from our end

1 Like

Do you have any updates?

Hi @pavel.karpukhin ! let us double-check the progress with the team and get back to you

1 Like

Hi @pavel.karpukhin

Could you please tell me whether you used any duplicate options at the moment you tried to pre-translate the file?