- 🇩🇪Germany gngn
With #2 we are using
$this->t()
and$this->messenger
in a static function, i.e. we are not in object context.I also think we do not need the newly introduced dependency injections at all:
- MessengerInterface $messenger is only used in
public static function changeAuthorActionFinishedCallback()
, so not in object context. - TranslationInterface $stringTranslation is not used at all (because #2 also has "use StringTranslationTrait" which would be enough for the call to $this->t() in the same function ...
- ... but this also happens in the static function, so we cannot reference $this at all
There is still one untranslated string 'Changing author...' in
public static function updateFields()
.This considered I think we should revert this commit (and
$message = 'Changing author...';
to$message = t('Changing author...');
.Or did I get something wrong?
Patch coming.
- MessengerInterface $messenger is only used in
- 🇩🇪Germany gngn
I opened 🐛 $this called in non object context - revert #3197015 and add missing translation Active .