GroupNodeDeriver does not implement StringTranslationTrait so cannot use $this->t().
Same for all of the cache contexts
Same for all of the entity classes (Group, GroupContent, etc.)
On top of that, Group::baseFieldDefinitions(), GroupContent::baseFieldDefinitions(), etc. are static so they can't even use $this
GroupTypeListBuilder, GroupRoleDeleteForm, GroupRoleForm, GroupPermissionsRoleSpecificForm and GroupContentViewsData did have the trait (all forms do) and could thus use it.
Attached is a smaller patch fixing the places that were valid. If we want to use $this->t() in other places, we need to look into using the trait there and whether it is useful to actually do so.
Comments
Comment #2
lomasr commentedAdding a patch .Please review.
Comment #3
lomasr commentedComment #5
lomasr commentedComment #6
kristiaanvandeneynde$this->t().$thisGroupTypeListBuilder, GroupRoleDeleteForm, GroupRoleForm, GroupPermissionsRoleSpecificForm and GroupContentViewsData did have the trait (all forms do) and could thus use it.
Attached is a smaller patch fixing the places that were valid. If we want to use $this->t() in other places, we need to look into using the trait there and whether it is useful to actually do so.
Comment #7
lomasr commentedThanks for the clarification. I applied the patch in #6 It didn't worked for me . Please see the after.png.
Comment #8
kristiaanvandeneyndeYeah it needs a reroll.
Comment #9
lobsterr commentedI've added a reroll
Comment #10
i-trokhanenkoPatch #9 applied correctly to 8.x-1.x-dev. Changes looks good for me.
+1 RTBC
Comment #11
kristiaanvandeneyndeLooks good, thanks!
Comment #14
lomasr commented