From 9db1fef4e33db5ff611082408fd45306d4e0e672 Mon Sep 17 00:00:00 2001 From: Maja Komel Date: Thu, 6 Jun 2019 17:35:50 +0200 Subject: [PATCH] FIX: add support for custom/plugin notification title attribute --- .../javascripts/discourse/widgets/notification-item.js.es6 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/widgets/notification-item.js.es6 b/app/assets/javascripts/discourse/widgets/notification-item.js.es6 index eac0c6e6995..52d51ab72f1 100644 --- a/app/assets/javascripts/discourse/widgets/notification-item.js.es6 +++ b/app/assets/javascripts/discourse/widgets/notification-item.js.es6 @@ -159,7 +159,11 @@ createWidget("notification-item", { let title; if (notificationName) { - title = I18n.t(`notifications.titles.${notificationName}`); + if (notificationName === "custom") { + title = data.title ? I18n.t(data.title) : ""; + } else { + title = I18n.t(`notifications.titles.${notificationName}`); + } } else { title = ""; }