]> BookStack Code Mirror - bookstack/blobdiff - app/Activity/Notifications/Messages/PageUpdateNotification.php
Notifications: Cleaned up mails, added debounce for updates
[bookstack] / app / Activity / Notifications / Messages / PageUpdateNotification.php
index f29f50dde44ed0170557a97a50edb8a6ca55d71d..c4a6de0bd1c06cdfd6e286834311335e3c622035 100644 (file)
@@ -2,7 +2,7 @@
 
 namespace BookStack\Activity\Notifications\Messages;
 
-use BookStack\Activity\Notifications\LinkedMailMessageLine;
+use BookStack\Activity\Notifications\MessageParts\ListMessageLine;
 use BookStack\Entities\Models\Page;
 use Illuminate\Notifications\Messages\MailMessage;
 
@@ -14,16 +14,14 @@ class PageUpdateNotification extends BaseActivityNotification
         $page = $this->detail;
 
         return (new MailMessage())
-            ->subject("Updated Page: " . $page->getShortName())
-            ->line("A page has been updated in " . setting('app-name') . ':')
-            ->line("Page Name: " . $page->name)
-            ->line("Updated By: " . $this->user->name)
-            ->line("To prevent a mass of notifications, for a while you won't be sent notifications for further edits to this page by the same editor.")
-            ->action('View Page', $page->getUrl())
-            ->line(new LinkedMailMessageLine(
-                url('/preferences/notifications'),
-                'This notification was sent to you because :link cover this type of activity for this item.',
-                'your notification preferences',
-            ));
+            ->subject(trans('notifications.updated_page_subject', ['pageName' => $page->getShortName()]))
+            ->line(trans('notifications.updated_page_intro', ['appName' => setting('app-name')]))
+            ->line(new ListMessageLine([
+                trans('notifications.detail_page_name') => $page->name,
+                trans('notifications.detail_updated_by') => $this->user->name,
+            ]))
+            ->line(trans('notifications.updated_page_debounce'))
+            ->action(trans('notifications.action_view_page'), $page->getUrl())
+            ->line($this->buildReasonFooterLine());
     }
 }