mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Ensures multi-like notifs respect
This commit is contained in:
@@ -4,14 +4,25 @@ import { i18n } from "discourse-i18n";
|
||||
|
||||
export default class extends NotificationTypeBase {
|
||||
get label() {
|
||||
let name = "";
|
||||
let name2 = "";
|
||||
|
||||
if (!this.siteSettings.prioritize_full_name_in_ux) {
|
||||
name = this.username;
|
||||
name2 = this.#username2;
|
||||
} else {
|
||||
name = this.notification.data.original_name;
|
||||
name2 = this.#full_name2;
|
||||
}
|
||||
|
||||
if (this.count === 2) {
|
||||
return i18n("notifications.liked_by_2_users", {
|
||||
username: this.username,
|
||||
username2: this.#username2,
|
||||
username: name,
|
||||
username2: name2,
|
||||
});
|
||||
} else if (this.count > 2) {
|
||||
return i18n("notifications.liked_by_multiple_users", {
|
||||
username: this.username,
|
||||
username: name,
|
||||
count: this.count - 1,
|
||||
});
|
||||
} else {
|
||||
@@ -34,4 +45,9 @@ export default class extends NotificationTypeBase {
|
||||
get #username2() {
|
||||
return formatUsername(this.notification.data.username2);
|
||||
}
|
||||
|
||||
get #full_name2() {
|
||||
return this.notification.data.fullname2;
|
||||
// this doesn't exist on the returned object yet
|
||||
}
|
||||
}
|
||||
|
@@ -2875,7 +2875,6 @@ en:
|
||||
liked_consolidated_description:
|
||||
one: "liked %{count} of your posts"
|
||||
other: "liked %{count} of your posts"
|
||||
liked_consolidated: "<span>%{username}</span> %{description}"
|
||||
linked_consolidated_description:
|
||||
one: "linked %{count} of your posts"
|
||||
other: "linked %{count} of your posts"
|
||||
|
Reference in New Issue
Block a user