]> BookStack Code Mirror - bookstack/blobdiff - app/Notifications/ConfirmEmail.php
Updated Spanish translation
[bookstack] / app / Notifications / ConfirmEmail.php
index bd310d73de62211744e93bd501150b012dabc66b..858b12166be9411ed28fe047c739b304f9da9152 100644 (file)
@@ -2,12 +2,16 @@
 
 namespace BookStack\Notifications;
 
+use Illuminate\Bus\Queueable;
 use Illuminate\Notifications\Notification;
+use Illuminate\Contracts\Queue\ShouldQueue;
 use Illuminate\Notifications\Messages\MailMessage;
 
-class ConfirmEmail extends Notification
+class ConfirmEmail extends Notification implements ShouldQueue
 {
 
+    use Queueable;
+    
     public $token;
 
     /**
@@ -38,11 +42,11 @@ class ConfirmEmail extends Notification
      */
     public function toMail($notifiable)
     {
+        $appName = ['appName' => setting('app-name')];
         return (new MailMessage)
-                    ->subject('Confirm your email on ' . session('app-name'))
-                    ->greeting('Thanks for joining ' . setting('app-name') . '!')
-                    ->line('Please confirm your email address by clicking the button below:')
-                    ->action('Confirm Email', baseUrl('/register/confirm/' . $this->token));
+                    ->subject(trans('auth.email_confirm_subject', $appName))
+                    ->greeting(trans('auth.email_confirm_greeting', $appName))
+                    ->line(trans('auth.email_confirm_text'))
+                    ->action(trans('auth.email_confirm_action'), baseUrl('/register/confirm/' . $this->token));
     }
-
 }