From 5d9f193303607506f799b0b194f5a9a8d9125d6e Mon Sep 17 00:00:00 2001 From: A Date: Tue, 30 Jan 2018 15:39:36 +0100 Subject: [PATCH] Uses the translation cachet.subscriber.manage. When a component's status changes or when an incident is created/updated, an email is sent to every people that has subscribed. At the end of the mail a link to manage its subscription has been introduced. Now, it uses the translation. --- .../Component/ComponentStatusChangedNotification.php | 3 +-- app/Notifications/Incident/NewIncidentNotification.php | 3 +-- .../IncidentUpdate/IncidentUpdatedNotification.php | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/Notifications/Component/ComponentStatusChangedNotification.php b/app/Notifications/Component/ComponentStatusChangedNotification.php index 9c10ede5cf6a..f2eb5b40e943 100644 --- a/app/Notifications/Component/ComponentStatusChangedNotification.php +++ b/app/Notifications/Component/ComponentStatusChangedNotification.php @@ -89,8 +89,7 @@ public function toMail($notifiable) ->line($content) ->action(trans('notifications.component.status_update.mail.action'), cachet_route('status-page')) ->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)])) - //TODO: Translate the text below - ->line('Manage your subscriptions at ' . cachet_route('subscribe.manage', $notifiable->verify_code)); + ->line(trans('cachet.subscriber.manage') . ' ' . cachet_route('subscribe.manage', $notifiable->verify_code)); } /** diff --git a/app/Notifications/Incident/NewIncidentNotification.php b/app/Notifications/Incident/NewIncidentNotification.php index 14be39cbedf8..5edf9468aff1 100644 --- a/app/Notifications/Incident/NewIncidentNotification.php +++ b/app/Notifications/Incident/NewIncidentNotification.php @@ -80,8 +80,7 @@ public function toMail($notifiable) ->action(trans('notifications.incident.new.mail.action'), cachet_route('incident', [$this->incident])) ->line($this->incident->message) ->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)])) - //TODO: Translate the text below. - ->line('Manage your subscriptions at '. cachet_route('subscribe.manage', $notifiable->verify_code)); + ->line(trans('cachet.subscriber.manage') . ' ' . cachet_route('subscribe.manage', $notifiable->verify_code)); } /** diff --git a/app/Notifications/IncidentUpdate/IncidentUpdatedNotification.php b/app/Notifications/IncidentUpdate/IncidentUpdatedNotification.php index 655b3908e957..1c0f4a324034 100644 --- a/app/Notifications/IncidentUpdate/IncidentUpdatedNotification.php +++ b/app/Notifications/IncidentUpdate/IncidentUpdatedNotification.php @@ -84,8 +84,7 @@ public function toMail($notifiable) ->action(trans('notifications.incident.update.mail.action'), cachet_route('incident', [$this->update->incident])) ->line($this->update->message) ->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)])) - //TODO: Translate the text below - ->line('Manage your subscriptions at ' . cachet_route('subscribe.manage', $notifiable->verify_code)); + ->line(trans('cachet.subscriber.manage') . ' ' . cachet_route('subscribe.manage', $notifiable->verify_code)); }