mirror of
https://github.com/flarum/core.git
synced 2025-07-29 12:40:40 +02:00
Fix the translator not being used properly in the notifications (#20)
* Fix the translator not being used properly * fix weird indentation thing
This commit is contained in:
committed by
Toby Zerner
parent
99a4d91bdd
commit
ea28537b76
@@ -13,12 +13,11 @@ export default class UserSuspendedNotification extends Notification {
|
|||||||
|
|
||||||
content() {
|
content() {
|
||||||
const notification = this.props.notification;
|
const notification = this.props.notification;
|
||||||
const actor = notification.sender();
|
|
||||||
const suspendUntil = notification.content();
|
const suspendUntil = notification.content();
|
||||||
const timeReadable = moment(suspendUntil.date).from(notification.time(), true);
|
const timeReadable = moment(suspendUntil.date).from(notification.time(), true);
|
||||||
|
|
||||||
return app.translator.transChoice('flarum-suspend.forum.notifications.user_suspended_text', {
|
return app.translator.trans('flarum-suspend.forum.notifications.user_suspended_text', {
|
||||||
actor,
|
user: notification.sender(),
|
||||||
timeReadable,
|
timeReadable,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -13,10 +13,9 @@ export default class UserUnsuspendedNotification extends Notification {
|
|||||||
|
|
||||||
content() {
|
content() {
|
||||||
const notification = this.props.notification;
|
const notification = this.props.notification;
|
||||||
const actor = notification.sender();
|
|
||||||
|
|
||||||
return app.translator.transChoice('flarum-suspend.forum.notifications.user_unsuspended_text', {
|
return app.translator.trans('flarum-suspend.forum.notifications.user_unsuspended_text', {
|
||||||
actor,
|
user: notification.sender(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user