Allow different default status per-plugin
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3539336. -->
Reported by: [claudiu.cristea](https://www.drupal.org/user/56348)
Related to !35
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Some projects might need to set the status as published, others as unpublished, when a source string is discovered. It would be nice to be defined per-plugin. Then, by altering the plugin definitions, 3rd-party is able to modify this.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<ul>
<li>Add a new <code>status</code> boolean optional property to TranslationType attribute defaulting to <code>TRUE</code>.</li>
<li>In BabeStorage, when a new source string is inserted check if the hash already exists:
<ul>
<li>If the inserted source string is new (its hash doesn't exist yet in DB), create the hash with the (plugin) default status of the new string.</li>
<li>If existing source string status is TRUE, don't change it. Regardless of the (plugin) default status of the inserted string, the existing TRUE wins.</li>
<li>If existing source string status is FALSE, change the status to the (plugin) default status of the newly inserted string</li>
</ul>
</li>
</ul>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>None.</p>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>None.</p>
<h3 id="summary-api-changes">API changes</h3>
<p>None.</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p>New TranslationType definition property</p>
issue