From 7bdc75acb1eeaefd9810564d794428e08bcf02a3 Mon Sep 17 00:00:00 2001 From: GuimDev Date: Thu, 23 Jan 2014 14:03:02 +0100 Subject: [PATCH] Allow change sentence for DataCollector For Datacollector you can add "sentence" in array return of collect function. --- src/DebugBar/Resources/widgets.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DebugBar/Resources/widgets.js b/src/DebugBar/Resources/widgets.js index 8da2821..5f1cccb 100644 --- a/src/DebugBar/Resources/widgets.js +++ b/src/DebugBar/Resources/widgets.js @@ -476,7 +476,8 @@ if (typeof(PhpDebugBar) == 'undefined') { this.bindAttr('data', function(data) { this.$list.set('data', data.templates); - this.$status.empty().append($('').text(data.templates.length + " templates were rendered")); + var sentence = data.sentence || "templates were rendered"; + this.$status.empty().append($('').text(data.templates.length + " " + sentence)); if (data.accumulated_render_time_str) { this.$status.append($('').addClass(csscls('render_time')).text(data.accumulated_render_time_str)); }