Problem/Motivation
I have setup "Continuous Job" to translate from EN do DE including taxonomy terms. After creating new content in EN via JSON:API, in my case - taxonomy term, it's translation status hang on stage "In progress", immediate translation is not working. In Settings i disabled option "Submit continuous job items on cron", meaning translation should be made on content creation. JSON:API creates new content (POST request) in source language EN but DE translation is missing. I use "DeepL API Free" REST API key. I must add that when using Drupal administration panel, translation is added correctly after term creation. For authorization i use Bearer token and my role is Administrator so all permissions are sufficient.
Steps to reproduce
JSON:API payload:
{
"data": {
"attributes": {
"name": "Car",
"description": {
"value": "",
"format": "basic_html"
},
"revision_translation_affected": null
},
"relationships": {},
"type": "taxonomy_term--sm_industry"
}
}
JSON:API response:
{
"jsonapi": {
"version": "1.0",
"meta": {
"links": {
"self": {
"href": "http://jsonapi.org/format/1.0/"
}
}
}
},
"data": {
"type": "taxonomy_term--sm_industry",
"id": "db6dfbd0-ef5a-4448-9bb2-c8cc26f33dc1",
"links": {
"self": {
"href": "https://api.io/jsonapi/taxonomy_term/sm_industry/db6dfbd0-ef5a-4448-9bb2..."
}
},
"attributes": {
"drupal_internal__tid": 91,
"drupal_internal__revision_id": 300,
"langcode": "en",
"revision_created": "2023-06-30T16:45:15+00:00",
"revision_log_message": null,
"status": true,
"name": "Car",
"description": null,
"weight": 0,
"changed": "2023-06-30T16:45:15+00:00",
"default_langcode": true,
"revision_translation_affected": true,
"content_translation_source": "und",
"content_translation_outdated": false,
"content_translation_created": "2023-06-30T16:45:15+00:00"
},
"relationships": {
"vid": {
"data": {
"type": "taxonomy_vocabulary--taxonomy_vocabulary",
"id": "6ab2c17b-763f-4052-87bc-273f0453138e",
"meta": {
"drupal_internal__target_id": "sm_industry"
}
},
"links": {
"related": {
"href": "https://api.io/jsonapi/taxonomy_term/sm_industry/db6dfbd0-ef5a-4448-9bb2..."
},
"self": {
"href": "https://api.io/jsonapi/taxonomy_term/sm_industry/db6dfbd0-ef5a-4448-9bb2..."
}
}
},
"revision_user": {
"data": null,
"links": {
"related": {
"href": "https://api.io/jsonapi/taxonomy_term/sm_industry/db6dfbd0-ef5a-4448-9bb2..."
},
"self": {
"href": "https://api.io/jsonapi/taxonomy_term/sm_industry/db6dfbd0-ef5a-4448-9bb2..."
}
}
},
"parent": {
"data": [
{
"type": "taxonomy_term--sm_industry",
"id": "virtual",
"meta": {
"links": {
"help": {
"href": "
https://www.drupal.org/docs/8/modules/json-api/core-concepts#virtual →
",
"meta": {
"about": "Usage and meaning of the 'virtual' resource identifier."
}
}
}
}
}
],
"links": {
"related": {
"href": "https://api.io/jsonapi/taxonomy_term/sm_industry/db6dfbd0-ef5a-4448-9bb2..."
},
"self": {
"href": "https://api.io/jsonapi/taxonomy_term/sm_industry/db6dfbd0-ef5a-4448-9bb2..."
}
}
},
"content_translation_uid": {
"data": {
"type": "user--user",
"id": "a43c44e1-4135-47b7-87d1-c9a6c0e3c37e",
"meta": {
"drupal_internal__target_id": 1
}
},
"links": {
"related": {
"href": "https://api.io/jsonapi/taxonomy_term/sm_industry/db6dfbd0-ef5a-4448-9bb2..."
},
"self": {
"href": "https://api.io/jsonapi/taxonomy_term/sm_industry/db6dfbd0-ef5a-4448-9bb2..."
}
}
}
}
},
"links": {
"self": {
"href": "https://api.io/jsonapi/taxonomy_term/sm_industry"
}
}
}
Proposed resolution
I am trying to find out what event/hook invokes the translation to estimate if invoking handler is not takin into account JSON:API. Since JSON:API is based on Entity API i assume fixture should be relatively simple.
Remaining tasks
User interface changes
API changes
Data model changes