[COMPONENT][Notification] Use _m() in reason
This commit is contained in:
parent
3e83387e98
commit
9cda64f275
@ -281,7 +281,7 @@ class Posting extends Component
|
||||
}
|
||||
|
||||
DB::flush();
|
||||
Event::handle('NewNotification', [$actor, $activity, ['object' => $mentioned], "{$actor->getNickname()} created note {$note->getUrl()}"]);
|
||||
Event::handle('NewNotification', [$actor, $activity, ['object' => $mentioned], _m('{nickname} created a note {note_id}.', ['nickname' => $actor->getNickname(), 'note_id' => $activity->getObjectId()])]);
|
||||
|
||||
return $note;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ class Inbox extends Controller
|
||||
$ap_actor->getActorId(),
|
||||
Discovery::normalize($actor->getNickname() . '@' . parse_url($ap_actor->getInboxUri(), PHP_URL_HOST)),
|
||||
);
|
||||
Event::handle('NewNotification', [$actor, $ap_act->getActivity(), [], "{$actor->getNickname()} mentioned you in a note"]);
|
||||
Event::handle('NewNotification', [$actor, $ap_act->getActivity(), [], _m('{nickname} mentioned you.', ['nickname' => $actor->getNickname()])]);
|
||||
DB::flush();
|
||||
|
||||
dd($ap_act, $act = $ap_act->getActivity(), $act->getActor(), $act->getObject());
|
||||
|
@ -60,7 +60,7 @@ class DeleteNote extends NoteHandlerPlugin
|
||||
$activity = $note->delete(actor: $actor, source: 'web');
|
||||
|
||||
// Undertaker successful
|
||||
Event::handle('NewNotification', [$actor, $activity, [], "{$actor->getNickname()} deleted note {$activity->getObjectId()}"]);
|
||||
Event::handle('NewNotification', [$actor, $activity, [], _m('{nickname} deleted note {note_id}.', ['nickname' => $actor->getNickname(), 'note_id' => $activity->getObjectId()])]);
|
||||
return $activity;
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ class Favourite extends NoteHandlerPlugin
|
||||
]);
|
||||
DB::persist($activity);
|
||||
|
||||
Event::handle('NewNotification', [$actor = Actor::getById($actor_id), $activity, [], "{$actor->getNickname()} favoured note {$note_id}"]);
|
||||
Event::handle('NewNotification', [$actor = Actor::getById($actor_id), $activity, [], _m('{nickname} favoured note {note_id}.', ['nickname' => $actor->getNickname(), 'note_id' => $activity->getObjectId()])]);
|
||||
}
|
||||
return $activity;
|
||||
}
|
||||
@ -79,7 +79,7 @@ class Favourite extends NoteHandlerPlugin
|
||||
]);
|
||||
DB::persist($activity);
|
||||
|
||||
Event::handle('NewNotification', [$actor = Actor::getById($actor_id), $activity, [], "{$actor->getNickname()} unfavoured note {$note_id}"]);
|
||||
Event::handle('NewNotification', [$actor = Actor::getById($actor_id), $activity, [], _m('{nickname} unfavoured note {note_id}.', ['nickname' => $actor->getNickname(), 'note_id' => $activity->getObjectId()])]);
|
||||
}
|
||||
return $activity;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ class RepeatNote extends NoteHandlerPlugin
|
||||
]);
|
||||
DB::persist($repeat_activity);
|
||||
|
||||
Event::handle('NewNotification', [$actor = Actor::getById($actor_id), $repeat_activity, [], "{$actor->getNickname()} repeated note {$note->getUrl()}"]);
|
||||
Event::handle('NewNotification', [$actor = Actor::getById($actor_id), $repeat_activity, [], _m('{nickname} repeated note {note_id}.', ['nickname' => $actor->getNickname(), 'note_id' => $repeat_activity->getObjectId()])]);
|
||||
|
||||
return $repeat_activity;
|
||||
}
|
||||
@ -119,7 +119,7 @@ class RepeatNote extends NoteHandlerPlugin
|
||||
]);
|
||||
DB::persist($undo_repeat_activity);
|
||||
|
||||
Event::handle('NewNotification', [$actor = Actor::getById($actor_id), $undo_repeat_activity, [], "{$actor->getNickname()} unrepeated note {$note_id}"]);
|
||||
Event::handle('NewNotification', [$actor = Actor::getById($actor_id), $undo_repeat_activity, [], _m('{nickname} unrepeated note {note_id}.', ['nickname' => $actor->getNickname(), 'note_id' => $note_id])]);
|
||||
|
||||
return $undo_repeat_activity;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user