FIX: Use title attribute for notification items. (#7840)

This commit is contained in:
Bianca Nenciu 2019-07-03 17:48:13 +03:00 committed by Robin Ward
parent f3c9dbcf20
commit 459932f4e2
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ import { formatUsername } from "discourse/lib/utilities";
import { iconNode } from "discourse-common/lib/icon-library";
createWidgetFrom(DefaultNotificationItem, "custom-notification-item", {
title(notificationName, data) {
notificationTitle(notificationName, data) {
return data.title ? I18n.t(data.title) : "";
},

View File

@ -91,7 +91,7 @@ export const DefaultNotificationItem = createWidget(
return iconNode(`notification.${notificationName}`);
},
title(notificationName) {
notificationTitle(notificationName) {
if (notificationName) {
return I18n.t(`notifications.titles.${notificationName}`);
} else {
@ -108,7 +108,7 @@ export const DefaultNotificationItem = createWidget(
let text = emojiUnescape(this.text(notificationName, data));
let icon = this.icon(notificationName, data);
const title = this.title(notificationName, data);
const title = this.notificationTitle(notificationName, data);
// We can use a `<p>` tag here once other languages have fixed their HTML
// translations.