fix translations

This commit is contained in:
Adrian Hopek
2022-03-21 10:54:13 +01:00
parent 1091a279af
commit 882e70df5e
3 changed files with 11 additions and 15 deletions

View File

@@ -45,7 +45,7 @@ class VacationRequestStatusChangedNotification extends Notification
$user = $this->user->first_name;
$title = $this->vacationRequest->name;
$type = $this->vacationRequest->type->label();
$status = $this->vacationRequest->state;
$status = $this->vacationRequest->state->label();
$from = $this->vacationRequest->from->toDisplayString();
$to = $this->vacationRequest->to->toDisplayString();
$days = $this->vacationRequest->vacations()->count();

View File

@@ -36,4 +36,9 @@ abstract class VacationRequestState extends State
Approved::class,
], Cancelled::class);
}
public function label(): string
{
return __(static::$name);
}
}