Don't hardcode 'value' key for textual field translation
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3529802. -->
Reported by: [svendecabooter](https://www.drupal.org/user/35369)
Related to !688 !677
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Currently, the logic in AI Translate module assumes all textual content to be translated is in the fields 'value' property.<br>
See \Drupal\ai_translate\Controller\AiTranslateController::translateSingleText().</p>
<p>There are scenario's where text-to-be-translated will not be stored in the 'value' property though.<br>
Some examples:</p>
<ul>
<li>Issue for link field translation: <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-3"><a href="https://www.drupal.org/project/ai/issues/3529669" title="Status: Closed (duplicate)">#3529669: Handle link field translation as well</a></span> - although this works around the limitation by putting the link title into the 'value' property upon extraction. Only works if there is 1 property to be translated though.</li>
<li><span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-5"><a href="https://www.drupal.org/project/custom_field/issues/3529794" title="Status: Closed (won't fix)">#3529794: Add support for AI submodule "ai_translate" FieldTextExtractor plugin</a></span>: Custom Field module, which allows any arbitrary name to be used for the subfield / property that gets defined.</li>
</ul>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>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...</p>
issue