Remove unused StringTranslationTrait from FormHooks service.
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3542343. --> Reported by: [rduterte](https://www.drupal.org/user/3809153) Related to !9 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>The `FormHooks` service includes `StringTranslationTrait` but does not use it.<br> Keeping unused traits adds unnecessary code and may confuse maintainers.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>Review the `FormHooks` class in the `config_warning` module.<br> The `StringTranslationTrait` is imported and used, but `$this-&gt;t()` or any other method from the trait is never called.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Remove the `StringTranslationTrait` from the FormHooks service. </p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>- [ ] Remove the unused trait from the codebase.<br> - [ ] Confirm manually that no regressions are introduced.<br> - [ ] Automated tests will cover this in !<a href="https://www.drupal.org/project/config_warning/issues/3535448">3535448</a> (currently in review).</p> <h3 id="summary-ui-changes">User interface changes</h3> <h3 id="summary-api-changes">API changes</h3> <h3 id="summary-data-model-changes">Data model changes</h3>
issue