Don't hardcode 'value' key for textual field translation

Created on 12 June 2025, 30 days ago

Problem/Motivation

Currently, the logic in AI Translate module assumes all textual content to be translated is in the fields 'value' property.
See \Drupal\ai_translate\Controller\AiTranslateController::translateSingleText().

There are scenario's where text-to-be-translated will not be stored in the 'value' property though.
Some examples:

Proposed resolution

Make the property name to extract part of the metadata, and set it dynamically, instead of hardcoded 'value' property? I haven't dug deeper into the full architecture, to know if this is possible...

✨ Feature request
Status

Active

Version

1.1

Component

AI Translate

Created by

πŸ‡§πŸ‡ͺBelgium svendecabooter Gent

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024