backport: support heading module
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3580352. --> Reported by: [koppie](https://www.drupal.org/user/261840) Related to !1335 >>> <p>[Tracker]<br> <strong>Update Summary: </strong> backport from <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/ai_translate/-/work_items/3580131" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/ai_translate/-/work_items/3580131</a></span><br> <strong>Short Description: </strong>support the heading module for translations<br> <strong>Check-in Date: </strong> 3/19/2026<br> <em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br> [/Tracker]</p> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>You have a node with paragraphs attached to it, and you want to translate the whole thing (including paragraphs). Those are separate node types. Not to worry - ai_translate already loops through all fields in associated paragraphs (if you configure it correctly). <strong>The problem</strong>: it skips heading fields! That leaves headers untranslated in the result.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <ol> <li>Create new paragraph type with two fields: heading, and body text</li> <li>Add paragraph field to a content type</li> <li>Create a new node</li> <li>Add a paragraph with heading and body</li> <li>save the node</li> <li>configure at least one language</li> <li>configure the ai_translate module to translate paragraphs associated with the content</li> <li>translate the node using ai_translate</li> <li>oops, the headings did not get translated!</li> </ol> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Modify the "allow list" to include heading fields</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <ul> <li>Review MR</li> <li>Tests?</li> </ul> <h3 id="summary-ui-changes">User interface changes</h3> <p>None</p> <h3 id="summary-api-changes">API changes</h3> <p>Modify the "allow list" in TextFieldExtractor.php, to include 'heading'</p> <h3 id="summary-data-model-changes">Data model changes</h3> <p>None (I don't think?)</p> <h3 id="summary-ai-usage">AI usage (if applicable)</h3> <p>[ ] AI Assisted Issue<br> This issue was generated with AI assistance, but was reviewed and refined by the creator.</p> <p>[x] AI Assisted Code<br> This code was mainly generated by a human, with AI autocompleting or parts AI generated, but under full human supervision.</p> <p>[ ] AI Generated Code<br> This code was mainly generated by an AI with human guidance, and reviewed, tested, and refined by a human.</p> <p>[ ] Vibe Coded<br> This code was generated by an AI and has only been functionally tested.</p> > Related issue: [Issue #3580131](https://www.drupal.org/node/3580131) > Related issue: [Issue #3582000](https://www.drupal.org/node/3582000)
issue