mirror of
https://github.com/flarum/core.git
synced 2025-07-17 14:51:19 +02:00
Remove notification pluralization logic
Since we don't return an "unread count" in the API, this pluralization logic is useless at the moment. Related to #643 and #716 but really needs further thought in #868.
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
import Notification from 'flarum/components/Notification';
|
import Notification from 'flarum/components/Notification';
|
||||||
import username from 'flarum/helpers/username';
|
|
||||||
import punctuateSeries from 'flarum/helpers/punctuateSeries';
|
|
||||||
|
|
||||||
export default class PostLikedNotification extends Notification {
|
export default class PostLikedNotification extends Notification {
|
||||||
icon() {
|
icon() {
|
||||||
@@ -14,15 +12,8 @@ export default class PostLikedNotification extends Notification {
|
|||||||
content() {
|
content() {
|
||||||
const notification = this.props.notification;
|
const notification = this.props.notification;
|
||||||
const user = notification.fromUser();
|
const user = notification.fromUser();
|
||||||
const auc = notification.additionalUnreadCount();
|
|
||||||
|
|
||||||
return app.translator.transChoice('flarum-likes.forum.notifications.post_liked_text', auc + 1, {
|
return app.translator.transChoice('flarum-likes.forum.notifications.post_liked_text', 1, {user});
|
||||||
user,
|
|
||||||
username: auc ? punctuateSeries([
|
|
||||||
username(user),
|
|
||||||
app.translator.transChoice('flarum-likes.forum.notifications.others_text', auc, {count: auc})
|
|
||||||
]) : undefined
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
excerpt() {
|
excerpt() {
|
||||||
|
Reference in New Issue
Block a user