Skip to content

Commit 7e35756

Browse files
committed
Translation support
1 parent 07336bb commit 7e35756

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

app/Http/Controllers/UserController.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -725,10 +725,10 @@ public function editPage(Request $request)
725725
'name' => 'sometimes|max:255|string',
726726
'image' => 'sometimes|image|mimes:jpeg,jpg,png,webp|max:2048', // Max file size: 2MB
727727
], [
728-
'littlelink_name.unique' => 'That handle has already been taken.',
729-
'image.image' => 'The selected file must be an image.',
730-
'image.mimes' => 'The image must be a: JPEG, JPG, PNG, webP.',
731-
'image.max' => 'The image size should not exceed 2MB.',
728+
'littlelink_name.unique' => __('messages.That handle has already been taken'),
729+
'image.image' => __('messages.The selected file must be an image'),
730+
'image.mimes' => __('messages.The image must be') . ' JPEG, JPG, PNG, webP.',
731+
'image.max' => __('messages.The image size should not exceed 2MB'),
732732
]);
733733

734734
if ($validator->fails()) {
@@ -778,10 +778,10 @@ public function themeBackground(Request $request)
778778
$request->validate([
779779
'image' => 'required|image|mimes:jpeg,jpg,png,webp,gif|max:2048', // Max file size: 2MB
780780
], [
781-
'image.required' => 'Please select an image file.',
782-
'image.image' => 'The selected file must be an image.',
783-
'image.mimes' => 'The image must be a: JPEG, JPG, PNG, webP, GIF.',
784-
'image.max' => 'The image size should not exceed 2MB.',
781+
'image.required' => __('messages.Please select an image'),
782+
'image.image' => __('messages.The selected file must be an image'),
783+
'image.mimes' => __('messages.The image must be') . ' JPEG, JPG, PNG, webP, GIF.',
784+
'image.max' => __('messages.The image size should not exceed 2MB'),
785785
]);
786786

787787
$customBackground = $request->file('image');

0 commit comments

Comments
 (0)