Support translation of 'description' field in custom menu link content
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3574185. -->
Reported by: [shayan.azali](https://www.drupal.org/user/3538071)
Related to !12
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>The ai_translate module currently uses a hardcoded list of field names in <code>TextExtractor::shouldExtract()</code> to determine which fields are candidates for translation. This list includes "body", "info", and fields starting with "field_" or "layout_builder_", but it is missing the standard description field.</p>
<p>As a result, entities like Menu Link Content, which store their translatable description in a field named description, are ignored by the AI translator even when they are configured to be translatable.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Try to translate a custom menu link which has a description field using the ai_translate module. You will see the title gets translated, but the description field is not translated.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>I have created a <a href="https://www.drupal.org/files/issues/2026-02-18/ai_translate-description_support.patch">patch</a> that adds "description" to the list of supported field names in "src/TextExtractor.php"<br><br>
The patch also adds a check for <code>$fieldDefinition->isTranslatable()</code> to ensure we only extract description fields that are explicitly configured for translation.</p>
issue