Closed tehbeard closed 3 years ago
Ran in to this when trying to dump string translations from twig templates. Functions within embed tags aren't scanned.
embed-bug.twig
<div class="embed-wrapper"> <h2>{{ p__("500embed", "string outside of embed") }}</h2> {% embed 'embed.twig' %} {% block main %} <h2>{{ p__("500embed", "Server Error") }}</h2> <p>...Rest of content cut for bug report...</p> {% endblock %} {% endembed %} </div>
embed.twig
<div class="mega-embed"> {% block main %} {% endblock %} </div>
extends works fine
extends-test.twig
{% extends 'embed.twig' %} {% block main %} <h2>{{ p__("500extends", "Server Error") }}</h2> <p>...Rest of content cut for bug report...</p> {% endblock %}
There might need to be special handling for it's Node class. I'll give it a look and see if I can make a PR to fix it. No real rush on it right now.
Node
Thanks for reporting this. Your PR is appreciated
Same. The patch sounds sane & logical. (Updated tests would be superb) :)
Ran in to this when trying to dump string translations from twig templates. Functions within embed tags aren't scanned.
embed-bug.twig
embed.twig
extends works fine
extends-test.twig
There might need to be special handling for it's
Node
class. I'll give it a look and see if I can make a PR to fix it. No real rush on it right now.