Allow altering the translation before saving
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3579369. -->
Reported by: [budalokko](https://www.drupal.org/user/788636)
Related to !14
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>There is no way for site builders or other modules to alter the resulting translation other than generic <code>entity pre_save</code> hooks, which apply to any content, not only those translated via this module.</p>
<p>Oh please, if there is already some way please let me know !!</p>
<p>Our use case:</p>
<ul>
<li>Set <code>created</code>, <code>updated</code>, <code>author</code> in the translation different than in the original language.</li>
<li>Set a custom internal <code>ai_used</code> flag to <code>true</code> to leave trace that AI was used building that specific translation.</li>
</ul>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Add an <code>ai_translate.presave</code> event that fires just before saving the translation.</p>
issue