Skip to content

Commit 7bdc75a

Browse files
committed
Allow change sentence for DataCollector
For Datacollector you can add "sentence" in array return of collect function.
1 parent f98d912 commit 7bdc75a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/DebugBar/Resources/widgets.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,8 @@ if (typeof(PhpDebugBar) == 'undefined') {
476476

477477
this.bindAttr('data', function(data) {
478478
this.$list.set('data', data.templates);
479-
this.$status.empty().append($('<span />').text(data.templates.length + " templates were rendered"));
479+
var sentence = data.sentence || "templates were rendered";
480+
this.$status.empty().append($('<span />').text(data.templates.length + " " + sentence));
480481
if (data.accumulated_render_time_str) {
481482
this.$status.append($('<span title="Accumulated render time" />').addClass(csscls('render_time')).text(data.accumulated_render_time_str));
482483
}

0 commit comments

Comments
 (0)