Skip to content

Node.js based forum software built for the modern web

closes #5942

Barış Soner Uşaklı645410131dae
diff --git a/package.json b/package.json
index a5d8ec1f37..8a316d6b0a 100644
--- a/package.json
+++ b/package.json
@@ -69,7 +69,7 @@
"nodebb-theme-persona": "6.1.2",
"nodebb-theme-slick": "1.1.1",
"nodebb-theme-vanilla": "7.1.1",
- "nodebb-widget-essentials": "3.0.6",
+ "nodebb-widget-essentials": "3.0.7",
"nodemailer": "4.1.1",
"passport": "^0.4.0",
"passport-local": "1.0.0",
diff --git a/src/widgets/index.js b/src/widgets/index.js
index 446174c907..30f2791afa 100644
--- a/src/widgets/index.js
+++ b/src/widgets/index.js
@@ -92,18 +92,19 @@ function renderWidget(widget, uid, options, callback) {
}
if (widget.data.container && widget.data.container.match('{body}')) {
- translator.translate(widget.data.title, function (title) {
- Benchpress.compileParse(widget.data.container, {
- title: title,
- body: html,
- }, function (err, html) {
- next(err, { html: html });
- });
- });
+ Benchpress.compileParse(widget.data.container, {
+ title: widget.data.title,
+ body: html,
+ }, next);
} else {
- next(null, { html: html });
+ next(null, html);
}
},
+ function (html, next) {
+ translator.translate(html, function (translatedHtml) {
+ next(null, { html: translatedHtml });
+ });
+ },
], callback);
}