diff --git a/app/Domain/Notifications/VacationRequestCreatedNotification.php b/app/Domain/Notifications/VacationRequestCreatedNotification.php index 378c98c..f5dff03 100644 --- a/app/Domain/Notifications/VacationRequestCreatedNotification.php +++ b/app/Domain/Notifications/VacationRequestCreatedNotification.php @@ -27,9 +27,10 @@ class VacationRequestCreatedNotification extends Notification public function toSlack(): SlackMessage { $url = route("vacation.requests.show", ["vacationRequest" => $this->vacationRequest->id]); + $seeDetails = __("See details"); return (new SlackMessage()) - ->text("{$this->buildDescription()}\n <${url}|Zobacz szczegóły>"); + ->text("{$this->buildDescription()}\n <${url}|$seeDetails>"); } /** diff --git a/app/Domain/Notifications/VacationRequestStatusChangedNotification.php b/app/Domain/Notifications/VacationRequestStatusChangedNotification.php index cacd1e4..e058d28 100644 --- a/app/Domain/Notifications/VacationRequestStatusChangedNotification.php +++ b/app/Domain/Notifications/VacationRequestStatusChangedNotification.php @@ -29,9 +29,10 @@ class VacationRequestStatusChangedNotification extends Notification public function toSlack(): SlackMessage { $url = route("vacation.requests.show", ["vacationRequest" => $this->vacationRequest->id]); + $seeDetails = __("See details"); return (new SlackMessage()) - ->text("{$this->buildDescription()}\n <${url}|Zobacz szczegóły>"); + ->text("{$this->buildDescription()}\n <${url}|$seeDetails>"); } /** diff --git a/app/Domain/Notifications/VacationRequestWaitsForApprovalNotification.php b/app/Domain/Notifications/VacationRequestWaitsForApprovalNotification.php index b4033ad..21700bf 100644 --- a/app/Domain/Notifications/VacationRequestWaitsForApprovalNotification.php +++ b/app/Domain/Notifications/VacationRequestWaitsForApprovalNotification.php @@ -30,9 +30,10 @@ class VacationRequestWaitsForApprovalNotification extends Notification public function toSlack(): SlackMessage { $url = route("vacation.requests.show", ["vacationRequest" => $this->vacationRequest->id]); + $seeDetails = __("See details"); return (new SlackMessage()) - ->text("{$this->buildDescription()}\n <${url}|Zobacz szczegóły>"); + ->text("{$this->buildDescription()}\n <${url}|$seeDetails>"); } /** diff --git a/app/Domain/Notifications/VacationRequestsSummaryNotification.php b/app/Domain/Notifications/VacationRequestsSummaryNotification.php index 65835d5..7e4f769 100644 --- a/app/Domain/Notifications/VacationRequestsSummaryNotification.php +++ b/app/Domain/Notifications/VacationRequestsSummaryNotification.php @@ -29,7 +29,7 @@ class VacationRequestsSummaryNotification extends Notification public function toSlack(): SlackMessage { return (new SlackMessage()) - ->text("Wnioski oczekujące na Twoją akcję - stan na dzień {$this->day->toDisplayString()}:") + ->text(__("Requests wait for your approval - status for day :date:", ["date" => $this->day->toDisplayString()])) ->withAttachment(new VacationRequestsAttachment($this->vacationRequests)); } @@ -55,18 +55,19 @@ class VacationRequestsSummaryNotification extends Notification "user" => $user, ]), ) - ->line("Lista wniosków oczekujących na Twoją akcję - stan na dzień {$this->day->toDisplayString()}:") - ->subject("Wnioski oczekujące na akcje - stan na dzień {$this->day->toDisplayString()}"); + ->line (__("Requests list waits for your approval - status for day :date:", ["date" => $this->day->toDisplayString()])) + ->subject(__("Requests wait for your approval - status for day :date:", ["date" => $this->day->toDisplayString()])); foreach ($this->vacationRequests as $request) { $url = route("vacation.requests.show", ["vacationRequest" => $request->id]); $message->line( - "- [wniosek nr {$request->name}]({$url}) użytkownika {$request->user->profile->full_name} ({$request->from->toDisplayString()} - {$request->to->toDisplayString()})", + __("- [request no. :request](:url) of user :user (:startDate - :endDate)",["request" => $request->name, "url" => $url, "user" => $request->user->profile->full_name, "startDate" => $request->from->toDisplayString(), "endDate"=>$request->to->toDisplayString()]), ); } + return $message - ->action("Przejdź do wniosków", $url); + ->action(__("Go to requests"), $url); } } diff --git a/resources/lang/pl.json b/resources/lang/pl.json index e196bff..b90842d 100644 --- a/resources/lang/pl.json +++ b/resources/lang/pl.json @@ -104,5 +104,10 @@ "There are no keys in toby": "Nie ma żadnych kluczy w tobym", "<:url|Request no. :request> for user :user (:date)": "<:url Wniosek urlopowy nr :request użytkownika :user (:date)", "The year period for given year does not exist.": "Okres roczny dla danego roku nie istnieje", - "Daily summary for day :day": "Podsumowanie dla dnia :day" + "Daily summary for day :day": "Podsumowanie dla dnia :day", + "Requests wait for your approval - status for day :date:": "Wnioski oczekujące na Twoją akcję - stan na dzień :date:", + "Requests list waits for your approval - status for day :date:": "Lista wniosków oczekujących na Twoją akcję - stan na dzień :date:", + "- [request no. :request](:url) of user :user (:startDate - :endDate)": "- [wniosek nr :request](:url) użytkownika :user (:startDate - :endDate)", + "Go to requests": "Przejdź do wniosków", + "See details": "Zobacz szczegóły" }