Problem/Motivation
Noticed in #2226493: Apply formatters and widgets to Node base fields. Right now you get warnings and errors.
Right now {% trans %} only allows strings to be passed in and using render arrays is not possible. Being able to use render arrays in node.html.twig would allow us to simplify template_preprocess_node().
Proposed resolution
Change this line:$compiler->string($token->getAttribute('placeholder'))->raw(' => ')->subcompile($token)->raw(', ');
in TwigNodeTrans.php
API changes
Allows common values to be rendered in Trans tag.
Before
Image may be NSFW.
Clik here to view.
After
Image may be NSFW.
Clik here to view.