8000 [Webprofiler] Added blocks that allows extension of the profiler page. by Nyholm · Pull Request #23680 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Webprofiler] Added blocks that allows extension of the profiler page. #23680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@

<h2>Translation Messages</h2>

{% block translation_messages %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we are in a template managing templates, what about just messages? Would that be clear enough?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. Inside we have blocks named "missing_messages", "fallback_messages", and "defined_messages". So naming "translation_messages" to "messages" makes sense.


{# sort translation messages in groups #}
{% set messages_defined, messages_missing, messages_fallback = [], [], [] %}
{% for message in collector.messages %}
Expand All @@ -108,7 +110,9 @@
<p>None of the used translation messages are defined for the given locale.</p>
</div>
{% else %}
{{ helper.render_table(messages_defined) }}
{% block defined_messages %}
{{ helper.render_table(messages_defined) }}
{% endblock %}
{% endif %}
</div>
</div>
Expand All @@ -127,7 +131,9 @@
<p>No fallback translation messages were used.</p>
</div>
{% else %}
{{ helper.render_table(messages_fallback) }}
{% block fallback_messages %}
{{ helper.render_table(messages_fallback) }}
{% endblock %}
{% endif %}
</div>
</div>
Expand All @@ -147,11 +153,16 @@
<p>There are no messages of this category.</p>
</div>
{% else %}
{{ helper.render_table(messages_missing) }}
{% block missing_messages %}
{{ helper.render_table(messages_missing) }}
{% endblock %}
{% endif %}
</div>
</div>
</div>

{% endblock %}

{% endblock %}

{% macro render_table(messages) %}
Expand Down
0