Translations not syncing to Contentful

We have the Contentful integration trial enabled in our project (729981), but I’m not seeing any approved translations synced. I believe I have it set up to sync all approved translations.

We’ve created a few custom locales on both sides, but the first locale we have an approved translation for (es-419, which is available by default of both) hasn’t synced. The only translation that has synced is our In-Context editor pseudo locale.

I’ve found a few previous issues that are similar:

They both seem to mention locale mapping in the integration, but I don’t see any options beyond saying what the source locale is (which we’ve set).

Does this option still exist somewhere, or is there something else I need to do?

Hi @thewilkybarkid
Please make sure that you’ve configured the localization for each field as in the guide below:

From the latest logs, I can see the error “message”:“The resource could not be found.” Could you please confirm that, after syncing the files to Crowdin, the content was not renamed or placed into a different path or folder on the Contentful side?

The underlying cause of the error is that, once the files are moved, the connection between Crowdin<>Contentful is lost, thus the content can’t be synced. This then requires resyncing the source content again to restore the connections

Please follow the suggested steps and sync the content one more time so that we can receive the new logs. If any error occurs during the sync, please share a screenshot in your reply.

Hi @Tetiana,

Thanks for taking a look; I believe that it’s set up correctly.

I just resynced from Contentful to Crowdin, then from Crowdin to Contentful. I can (still) see that the integration can create a new version on the Contentful side (for the Contentful ID 19ku1fGWddXyrFone7Pu62), but it doesn’t include the accepted es-419 translation (in fact, there’s a new version on Contentful without any visible changes).

Hi @thewilkybarkid ,

I can see that the export options for the project are set to Skip untranslated strings and files and Export only approved translations. Thus, in order for the translations to be synced back, the file needs to be 100% translated and approved. Please try to fully translate the file and approve those translations or change the export option in the project Settings (e.g., disable Skip untranslated strings and Skip untranslated files).

Hi @TaniaM,

I tried turning off the ‘Skip untranslated files’ option, only to see an error when trying to sync:

Fail to prepare translations
An unknown error occurred while generating the resulting file.
Please contact the support team for more details.
File: /Contentful/PREreview.org/master/Banner/19ku1fGWddXyrFone7Pu62.xml.
Language: Arabic, Modern Standard.

That immediately reminded me that we have the option enabled following email advice from support last week. With the option turned off, it fails to sync with Contentful and breaks our other translations. This was the relevant part of my email:

I see the following when running the CLI ‘crowdin download translations’ command:

:check_mark: Fetching project info
:check_mark: Building ZIP archive with the latest translations
:cross_mark: Building translation (14%)
:cross_mark: Failed to build translation. Please contact our support team for help
:cross_mark: The build has failed

I don’t seem to be able to get any more details out of it.

I do, however, see the following when manually trying to sync Crowdin to Contentful:

Fail to prepare translations
An unknown error occurred while generating the resulting file.
Please contact the support team for more details.
File: /Contentful/PREreview.org/master/Banner/19ku1fGWddXyrFone7Pu62.xml.
Language: Arabic, Modern Standard.

And the relevant part of the reply (hopefully it’s ok to repost):

As far as I can see, this file is not translated for the Arabic language. At the same time, you have the export option enabled in the project settings: Skip untranslated strings

As the file is not translated, the system cannot export an empty file. Please try adding translations to that language or disable the option and sync translations back to Contentful again.

Then my reply:

I’ve enabled the ‘Skip untranslated files’ option, and it completes successfully now.

Thinking about this further, having the option enabled means we don’t have Contentful content translated until it’s complete (which we might be able to live with), but the rest of our website no longer receives partially translated files (which is a regression).

Is there any way of having the ‘Skip untranslated files’ option enabled for just Contentful content? Or, ideally, have the Contentful integration gracefully handle these empty files?

The support emails were on the 27th July if it’s easier to move back to email. Thanks.

Hi @thewilkybarkid

The Skip untranslated files option is a project-level export setting, so it applies to everything the project builds, including the CLI downloads and the files pushed to Contentful. There isn’t currently a way to scope it to a single integration or to a subfolder within the same project

On the second part of your question, having the Contentful integration handle empty files gracefully rather than surfacing the export error is a fair request and not something the integration does today (due to API limitations).