Translations for license checkout errors

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-07-16 21:02:58 +01:00
parent bb00edda4e
commit 70d95877d8
2 changed files with 5 additions and 3 deletions

View file

@ -94,14 +94,14 @@ class LicenseCheckoutController extends Controller
if (! $licenseSeat) { if (! $licenseSeat) {
if ($seatId) { if ($seatId) {
throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', 'This Seat is not available for checkout.')); throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkout.unavailable')));
} }
throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', 'There are no available seats for this license.')); throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkout.not_enough_seats')));
} }
if (! $licenseSeat->license->is($license)) { if (! $licenseSeat->license->is($license)) {
throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', 'The license seat provided does not match the license.')); throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkout.mismatch')));
} }
return $licenseSeat; return $licenseSeat;

View file

@ -44,6 +44,8 @@ return array(
'error' => 'There was an issue checking out the license. Please try again.', 'error' => 'There was an issue checking out the license. Please try again.',
'success' => 'The license was checked out successfully', 'success' => 'The license was checked out successfully',
'not_enough_seats' => 'Not enough license seats available for checkout', 'not_enough_seats' => 'Not enough license seats available for checkout',
'mismatch' => 'The license seat provided does not match the license',
'unavailable' => 'This seat is not available for checkout.',
), ),
'checkin' => array( 'checkin' => array(