From 7e357565b983d4b62ddbcffefaafe5c81a6a06e3 Mon Sep 17 00:00:00 2001 From: Julian Prieber <60265788+JulianPrieber@users.noreply.github.com> Date: Thu, 27 Jul 2023 16:00:59 +0200 Subject: [PATCH] Translation support --- app/Http/Controllers/UserController.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index f0a7f87..c6530df 100755 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -725,10 +725,10 @@ class UserController extends Controller 'name' => 'sometimes|max:255|string', 'image' => 'sometimes|image|mimes:jpeg,jpg,png,webp|max:2048', // Max file size: 2MB ], [ - 'littlelink_name.unique' => 'That handle has already been taken.', - 'image.image' => 'The selected file must be an image.', - 'image.mimes' => 'The image must be a: JPEG, JPG, PNG, webP.', - 'image.max' => 'The image size should not exceed 2MB.', + 'littlelink_name.unique' => __('messages.That handle has already been taken'), + 'image.image' => __('messages.The selected file must be an image'), + 'image.mimes' => __('messages.The image must be') . ' JPEG, JPG, PNG, webP.', + 'image.max' => __('messages.The image size should not exceed 2MB'), ]); if ($validator->fails()) { @@ -778,10 +778,10 @@ class UserController extends Controller $request->validate([ 'image' => 'required|image|mimes:jpeg,jpg,png,webp,gif|max:2048', // Max file size: 2MB ], [ - 'image.required' => 'Please select an image file.', - 'image.image' => 'The selected file must be an image.', - 'image.mimes' => 'The image must be a: JPEG, JPG, PNG, webP, GIF.', - 'image.max' => 'The image size should not exceed 2MB.', + 'image.required' => __('messages.Please select an image'), + 'image.image' => __('messages.The selected file must be an image'), + 'image.mimes' => __('messages.The image must be') . ' JPEG, JPG, PNG, webP, GIF.', + 'image.max' => __('messages.The image size should not exceed 2MB'), ]); $customBackground = $request->file('image');