Integration with DeepL pre-translate and Bitbucket synchronisation fails

I am trying to implement Crowdin into an Angular project and am failing miserably.

I first installed crowdin-cli to do upload → pre-translation (DeepL) → download. It required separate scripts to work locally (development) and remotely (pipeline) and it required an image with java. But it worked.

We then decided to perform all translations and synchronisation within Crowdin.
The application now only has following crowdin.yml

preserve_hierarchy: false

  • source: /**/i18n/*.json
    translation: /**/i18n/%two_letters_code%/%original_file_name%

Upload to crowdin should trigger a Crowdin Workflow that pre-translates the Dutch source file to target languages Dutch & English. In order to make Crowdin create both target languages I had to select another Source Language. Selecting Dutch would not create target language Dutch, selecting English would not create English. So I selected English (United Kingdom) to create both target files.

A change in translations files should trigger BitBucket Integration to create branch crowdin from master and offer a pull-request. The branch is created and the pull-request is offered, but instead of offering Dutch and English files, both target files are in Dutch. It seems that pre-translation by DeepL never happened.

Where everything worked when executed with crowdin-cli, nothing seems to work via Bitbucket Integration. I must be doing something wrong, but ignore where.

There are a couple of things I can think of to happen:
(1) Merging feature branch to master performs no upload to crowdin, therefore triggers no workflow, therefore no translations are executed and translations files are not created.

(2) Even when translations files exist they are not given to the pull request, instead the original source file is placed in both target folders (en/translations.json and nl/translations.json).

(3) A Path is incorrect so that crowdin sends no target files to Bitbucket.

I find that documentation for crowdin-cli was quite good, whereas documentation for crowdin-gui is lacking. I have tried many configuration settings and fail to make it work. I hope I have provided sufficient information.

I don’t think it would work. To start with, I don’t think here are deeply tech people who are developers who’re doing the proper CI integration. But the most breaking point - CLI doesn’t work with BitBucket. Same with Github and Gitlab and so on. It’s a stand alone tool, and integration is integration. It would work if you skip integration and have a workflow like

BitB - your laptop - upload files into Crowdin by API\CLI - translate - download - upload translation from laptop to BitB

But, I have some tips here:

Dutch source already is in Dutch, same with English. No need to have target to double the source. Plus, not all engines of Machine translation support dialects (like En -Britain or En -United States). Better to keep 'em in general version if you’re doing to use machine.

2nd, if you use native connector this is the guide on it

So, here are 2 wofklows:

  1. Without native connector, but with API \ CLI
    A laptop used as buffer between Crowdin and BitB

Download source to laptop
Upload to Crowdin
Translate, change, modify, do whatever is needed
Build + download project
Donwload transaltion to laptop
Upload into BitB

  1. With native connector

Connect BitB with Crowdin
Wait for sources being downloaded to Crowdin
Run the pre translation by CLI
Wait for synchronisation being triggered (10 minutes the shortest schedule)
Accept pull request
Merge branches or do other management staff

Hope this will. be helpful.

Maybe it would work with BitBucket Server & Data Center Integration?

You mean this? Discover the right solution to enhance Crowdin experience
I suppose the logic of this BitB version is same.

But you may try some webhooks to be notified and then run something.

Still, I suppose Crowdin is well designed as stand alone tool. You can connect BitB with integration, then create an advanced workflow in Crowdin which will have pre translation added, so all will be automatically. Having updates once in 10-120 minutes should be more that enough. Also, you can configure some export option, so more custom way will be achieved.

This is indeed what I used.

The problem I have is that I have Dutch source file and need both Dutch and English target files.

I push Dutch source file to BitBucket and BitBucket Integration Configuration synchronises BitBucket with Crowdin and applies pre-translation by DeepL.

However, when I select Dutch as Source Language, DeepL translates only Dutch → English and creates an English target file but no Dutch target file.

Good new is that Crowdin pushes two target files to BitBucket, both English and Dutch. I assume it offers the source file as target file. Both files appear in the correct target locations:

Bad news is that in Crowdin only English target file is visible and there is no Dutch target file. The reason I want both target files in Crowdin is to split concerns. Developers manage source file (Dutch), Translators manage target files (Dutch & English).

But I have found no way to do this inside Crowdin and without use of crowdin-cli locally and/or in pipeline. I hope someone can help with this.

I really don’t understand your current setup :see_no_evil: If your source text is Dutch indeed, why do you specify English UK as a source language?

Why do you need Crowdin to produce Dutch files? Do you plan to add/modify source strings within Crowdin? If so, you can activate “Push Sources” in the integration settings, so any changes made to sources will be included in the PR. Alternatively, you can indeed keep Dutch as source and target language at the same time. It shouldn’t be translated by MT I guess.

1 Like

I do not specify English as source language.
I specify Dutch as source language and Dutch/English as target languages.

The reason I want Dutch as target language is that developers maintain source file and translators maintain target files. I understand that DeepL need not translate from Dutch to Dutch.

Interestingly enough Crowdin pushes Dutch target file to Bitbucket, but does not show it in Crowdin-gui. I wish it would.

Maybe you have different ways of files? Like source path, translation path. Some files outside of working branch and so on. In my project wrong path and branch conflicts caused duplicates conflict. Probably try to re -set up the project using integration UI configuration pannel. More into: