This commit is contained in:
EwelinaLasowy 2022-05-17 15:05:28 +02:00
parent 35247cbabe
commit 4162dd3d67
7 changed files with 9 additions and 10 deletions

View File

@ -62,11 +62,10 @@ class VacationRequestsSummaryNotification extends Notification
$url = route("vacation.requests.show", ["vacationRequest" => $request->id]);
$message->line(
__("- [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()]),
__("- [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(__("Go to requests"), $url);
}

View File

@ -37,7 +37,7 @@ class SendDailySummaryToSlack extends Command
Http::withToken($this->getSlackClientToken())
->post($this->getUrl(), [
"channel" => $this->getSlackChannel(),
"text" => __("Daily summary for day :day",["day"=>$now->toDisplayString()]),
"text" => __("Daily summary for day :day", ["day" => $now->toDisplayString()]),
"attachments" => $attachments,
]);
}

View File

@ -31,7 +31,7 @@ class VacationRequestsAttachment extends ListAttachment
"url" => $url,
"request" => $request->name,
"user" => $request->user->profile->full_name,
"date" => $date
"date" => $date,
]);
});
}

View File

@ -51,7 +51,7 @@ class GiveKeysTo extends SignatureHandler
$key->notify(new KeyHasBeenGivenNotification($authUser, $user));
return $this->respondToSlack(
__(":white_check_mark: Key no. :key has been given to <@:user>", ["key"=>$key->id, "user" => $user->profile->slack_id])
__(":white_check_mark: Key no. :key has been given to <@:user>", ["key" => $key->id, "user" => $user->profile->slack_id]),
);
}

View File

@ -35,7 +35,7 @@ class TakeKeysFrom extends SignatureHandler
if (!$key) {
throw ValidationException::withMessages([
"key" => __("User <@:user> does not have any keys", ["user" => $user->profile->slack_id])
"key" => __("User <@:user> does not have any keys", ["user" => $user->profile->slack_id]),
]);
}
@ -51,7 +51,7 @@ class TakeKeysFrom extends SignatureHandler
$key->notify(new KeyHasBeenTakenNotification($authUser, $user));
return $this->respondToSlack(__(":white_check_mark: Key no. :key has been taken from user <@:user>", ["key"=>$key->id, "user"=> $user->profile->slack_id]));
return $this->respondToSlack(__(":white_check_mark: Key no. :key has been taken from user <@:user>", ["key" => $key->id, "user" => $user->profile->slack_id]));
}
protected function getRules(): array
@ -64,7 +64,7 @@ class TakeKeysFrom extends SignatureHandler
protected function getMessages(): array
{
return [
"user.required" => __("You must specified the user you want to take the keys from")
"user.required" => __("You must specified the user you want to take the keys from"),
];
}
}

View File

@ -30,7 +30,7 @@ trait FindsUserBySlackId
$user = $this->findUserBySlackId($slackId);
if (!$user) {
throw new UserNotFoundException(__("User :input does not exist in toby", ["input"=> $slackId]));
throw new UserNotFoundException(__("User :input does not exist in toby", ["input" => $slackId]));
}
return $user;

View File

@ -37,7 +37,7 @@ trait ListsHandlers
)
->map(
fn(SignatureHandler $handler): AttachmentField => AttachmentField::create(
__($handler->getDescription()) ,
__($handler->getDescription()),
"`/{$handler->getSignature()}`",
),
)