File tree 1 file changed +25
-1
lines changed
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector
1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 57
57
{% endblock %}
58
58
59
59
{% block panelContent %}
60
+ {% set filter = request .query .get (' state' , ' -1' ) %}
61
+ {% set filterOptions = {
62
+ ' -1' : ' ' ,
63
+ (constant (' Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_DEFINED' )): ' Defined messages' ,
64
+ (constant (' Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_MISSING' )): ' Missing messages' ,
65
+ (constant (' Symfony\\Component\\Translation\\DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK' )): ' Fallback messages' ,
66
+ } %}
67
+
60
68
<h2 >Translation Stats</h2 >
61
69
<table >
62
70
<tbody >
72
80
<th >Missing messages</th >
73
81
<td ><pre >{{ collector .countMissings }}</pre ></td >
74
82
</tr >
83
+ <tr >
84
+ <th >Filter</th >
85
+ <td >
86
+ <form id =" filter-form" action =" " method =" get" style =" display: inline" >
87
+ <input type =" hidden" name =" panel" value =" translation" >
88
+ <select id =" filter" name =" state" onchange =" document.getElementById('filter-form').submit(); " >
89
+ {% for key ,option in filterOptions %}
90
+ <option value =" {{ key }}" {{ filter == key ? ' selected' : ' ' }}>{{ option }}</option >
91
+ {% endfor %}
92
+ </select >
93
+ <noscript >
94
+ <input type =" submit" value =" refresh" >
95
+ </noscript >
96
+ </form >
97
+ </td >
98
+ </tr >
75
99
</tbody >
76
100
</table >
77
101
83
107
<th >Id</th >
84
108
<th >Message Preview</th >
85
109
</tr >
86
- {% for message in collector .messages %}
110
+ {% for message in collector .messages if message . state == filter or filter == ' -1 ' %}
87
111
<tr >
88
112
<td ><code >{{ translator.state (message ) }}</code ></td >
89
113
<td ><code >{{ message .locale }}</code ></td >
You can’t perform that action at this time.
0 commit comments