mirror of
https://github.com/flarum/framework.git
synced 2025-03-31 04:15:15 +08: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:
parent
99a4d91bdd
commit
ea28537b76
@ -13,12 +13,11 @@ export default class UserSuspendedNotification extends Notification {
|
||||
|
||||
content() {
|
||||
const notification = this.props.notification;
|
||||
const actor = notification.sender();
|
||||
const suspendUntil = notification.content();
|
||||
const timeReadable = moment(suspendUntil.date).from(notification.time(), true);
|
||||
|
||||
return app.translator.transChoice('flarum-suspend.forum.notifications.user_suspended_text', {
|
||||
actor,
|
||||
return app.translator.trans('flarum-suspend.forum.notifications.user_suspended_text', {
|
||||
user: notification.sender(),
|
||||
timeReadable,
|
||||
});
|
||||
}
|
||||
|
@ -13,10 +13,9 @@ export default class UserUnsuspendedNotification extends Notification {
|
||||
|
||||
content() {
|
||||
const notification = this.props.notification;
|
||||
const actor = notification.sender();
|
||||
|
||||
return app.translator.transChoice('flarum-suspend.forum.notifications.user_unsuspended_text', {
|
||||
actor,
|
||||
return app.translator.trans('flarum-suspend.forum.notifications.user_unsuspended_text', {
|
||||
user: notification.sender(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user