From ae27469601425de31e5d968c586875af1f0a3a99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Artaud?= Date: Sun, 10 Jan 2021 17:06:43 -0500 Subject: [PATCH 1/2] Update WelcomesNewUsers.php Internationalization and localization support --- src/WelcomesNewUsers.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/WelcomesNewUsers.php b/src/WelcomesNewUsers.php index 9ecabc0..f8a54ca 100644 --- a/src/WelcomesNewUsers.php +++ b/src/WelcomesNewUsers.php @@ -11,19 +11,19 @@ class WelcomesNewUsers public function handle($request, Closure $next) { if (! $request->hasValidSignature()) { - abort(Response::HTTP_FORBIDDEN, 'The welcome link does not have a valid signature or is expired.'); + abort(Response::HTTP_FORBIDDEN, __('The welcome link does not have a valid signature or is expired.')); } if (! $request->user) { - abort(Response::HTTP_FORBIDDEN, 'Could not find a user to be welcomed.'); + abort(Response::HTTP_FORBIDDEN, __('Could not find a user to be welcomed.')); } if (is_null($request->user->welcome_valid_until)) { - return abort(Response::HTTP_FORBIDDEN, 'The welcome link has already been used.'); + return abort(Response::HTTP_FORBIDDEN, __('The welcome link has already been used.')); } if (Carbon::create($request->user->welcome_valid_until)->isPast()) { - return abort(Response::HTTP_FORBIDDEN, 'The welcome link has expired.'); + return abort(Response::HTTP_FORBIDDEN, __('The welcome link has expired.')); } return $next($request); From e31161df8d08b425761e3409f1848310e21dab66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Artaud?= Date: Sun, 10 Jan 2021 17:09:40 -0500 Subject: [PATCH 2/2] Update WelcomeController.php Internationalization and localization support --- src/WelcomeController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WelcomeController.php b/src/WelcomeController.php index 03308b1..b7ff0be 100644 --- a/src/WelcomeController.php +++ b/src/WelcomeController.php @@ -32,7 +32,7 @@ public function savePassword(Request $request, User $user) protected function sendPasswordSavedResponse(): Response { - return redirect()->to($this->redirectPath())->with('status', 'Welcome! You are now logged in!'); + return redirect()->to($this->redirectPath())->with('status', __('Welcome! You are now logged in!')); } protected function rules()