FIX: Use title attribute for notification items. (#7840)
This commit is contained in:
parent
f3c9dbcf20
commit
459932f4e2
|
@ -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) : "";
|
||||
},
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue