Skip to content

Commit 05f5df6

Browse files
committed
UX: Add tooltips for messages and notifications in header
1 parent 772301b commit 05f5df6

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

Diff for: app/assets/javascripts/discourse/widgets/header.js.es6

+6-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ createWidget('header-notifications', {
4141
action: attrs.action,
4242
className: 'badge-notification unread-notifications',
4343
rawLabel: unreadNotifications,
44-
omitSpan: true
44+
omitSpan: true,
45+
title: "notifications.tooltip.regular",
46+
titleOptions: {count: unreadNotifications}
4547
}));
4648
}
4749

@@ -62,7 +64,9 @@ createWidget('header-notifications', {
6264
action: attrs.action,
6365
className: 'badge-notification unread-private-messages',
6466
rawLabel: unreadPMs,
65-
omitSpan: true
67+
omitSpan: true,
68+
title: "notifications.tooltip.message",
69+
titleOptions: {count: unreadPMs}
6670
}));
6771
}
6872

Diff for: config/locales/client.en.yml

+7
Original file line numberDiff line numberDiff line change
@@ -1287,6 +1287,13 @@ en:
12871287
admin_options_title: "Optional staff settings for this topic"
12881288

12891289
notifications:
1290+
tooltip:
1291+
regular:
1292+
one: "1 unseen notification"
1293+
other: "{{count}} unseen notifications"
1294+
message:
1295+
one: "1 unread message"
1296+
other: "{{count}} unread messages"
12901297
title: "notifications of @name mentions, replies to your posts and topics, messages, etc"
12911298
none: "Unable to load notifications at this time."
12921299
empty: "No notifications found."

0 commit comments

Comments
 (0)