Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Translation connector - implementation for scope requests

Avatar

Level 2

We are currently developing a translation connector based on the example implementation (https://github.com/Adobe-Marketing-Cloud/aem-translation-framework-bootstrap-connector) and using the translation API documentation (https://docs.adobe.com/docs/en/aem/6-2/develop/ref/javadoc/com/adobe/granite/translation/api/package...) as a help.

We are using AEM 6.2 and struggling with implementing the optional scoping request path as shown in this diagram:

https://files.acrobat.com/a/preview/32824bd9-6cc6-41b4-bc7b-8e7c4d2c7d65

Our problem is that the “createTranslationJob” method on the TranslationService Interface (com.adobe.granite.translation.api) is called twice for the same translation job project. The first time when the user clicks on “Request scope”.  The second time when he clicks on “Start” after scoping is complete. Moreover, the translation objects are only uploaded to the first job and not the second one.

We would have expected that AEM calls “createTranslationJob” only once for a translation project and updates the status of the translation job  from SCOPE_COMPLETE to COMMITED_FOR_TRANSLATION by calling “updateTranslationJobState”.

Why is “createTranslationJob” called twice?

Is there any way to figure out that createTranslationJob is called the second time for the same translation project? And what the returned job id of the first call is?

Thanks for the help.

1 Accepted Solution

Avatar

Correct answer by
Level 2

No the code is not on a public git server.

But I found out that the same happens with the bootstrap connector.

Clicking on "Request scope" will set the job status to SCOPE_REQUESTED and create a translation job with the content to translate:

1247192_pastedImage_1.png

So far so good. Setting the job status to SCOPE_COMPLETE and then clicking on "start" will create a new translation job:1247194_pastedImage_2.png

Without any content to translate though (which results in errors later in the workflow)

Seems to me to be a bug in the AEM translation API. Or the bootstrap example is also not able to handle multiple "createTranslationJob" calls for the same project.

View solution in original post

7 Replies

Avatar

Administrator

Veena_07bsloki​ Any help here ?

~kautuk



Kautuk Sahni

Avatar

Community Advisor

Hi Kautuk

      Apologies. I have not worked with translation api. But I would still try to implement this in my local and check the requirement mentioned here

Thanks

Veena

Avatar

Level 2

Hi Veena

Thanks for having a look at this.

Avatar

Level 7

Do you happen to have sample code on github in which you are facing issue?

Avatar

Correct answer by
Level 2

No the code is not on a public git server.

But I found out that the same happens with the bootstrap connector.

Clicking on "Request scope" will set the job status to SCOPE_REQUESTED and create a translation job with the content to translate:

1247192_pastedImage_1.png

So far so good. Setting the job status to SCOPE_COMPLETE and then clicking on "start" will create a new translation job:1247194_pastedImage_2.png

Without any content to translate though (which results in errors later in the workflow)

Seems to me to be a bug in the AEM translation API. Or the bootstrap example is also not able to handle multiple "createTranslationJob" calls for the same project.

Avatar

Former Community Member

I am not even able to compile the translation code provide here GitHub - Adobe-Marketing-Cloud/aem-translation-framework-bootstrap-connector: Bootstrap Translation ...

I am trying to follow these steps.. Adobe Experience Manager Help | Getting Started with the Translation Bootstrap Connector

However, first, Archiva servlet this link does not work. I had to download the jar from some other website and install it using AEM package manager. Second. after downloading build fails on https://repo.adobe.com/nexus/content/groups/public/com/adobe/granite/com.adobe.granite.translation.a...  version 1.2.0 does not exist. I changed it to 1.1.18 and it still fails to connect. I have set my settings.xml as per Adobe Experience Manager Help | Getting Started with the Translation Bootstrap Connector  but it still fails to build.

Any suggestion on how to install bootstrap connector will be very helpful.. Thanks in advance..