feat:use provider name in social error messages
This commit is contained in:
@@ -41,7 +41,7 @@ class ConnectedAccountController extends Controller
|
|||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|
||||||
return redirect(route('login'))
|
return redirect(route('login'))
|
||||||
->with('errors', new MessageBag([__('Could not login using that provider. Try again later.')]));
|
->with('errors', new MessageBag([__('Could not login using :provider. Try again later.', ['provider' => config("services.$provider.name")])]));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if this account is already linked
|
// check if this account is already linked
|
||||||
@@ -92,7 +92,10 @@ class ConnectedAccountController extends Controller
|
|||||||
$user->notify(new VerifyConnectedAccountNotification($verification->id));
|
$user->notify(new VerifyConnectedAccountNotification($verification->id));
|
||||||
|
|
||||||
return redirect(route('login'))
|
return redirect(route('login'))
|
||||||
->with('status', __('Account already exists. Check your email to connect your accounts.'));
|
->with('status', __(
|
||||||
|
'Account already exists. Check your email to connect your :provider account.',
|
||||||
|
['provider' => config("services.$provider.name")]
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function validateProvider($provider): void
|
protected function validateProvider($provider): void
|
||||||
|
|||||||
+2
-2
@@ -51,8 +51,8 @@
|
|||||||
"Token Name": "Token Name",
|
"Token Name": "Token Name",
|
||||||
"Permissions": "Permissions",
|
"Permissions": "Permissions",
|
||||||
"Profile Information": "Profile Information",
|
"Profile Information": "Profile Information",
|
||||||
"Account already exists. Check your email to connect the accounts.": "Account already exists. Check your email to connect the accounts.",
|
"Account already exists. Check your email to connect your :provider account.": "Account already exists. Check your email to connect your :provider account.",
|
||||||
"Could not login using that provider. Try again later.": "Could not login using that provider. Try again later.",
|
"Could not login using :provider. Try again later.": "Could not login using :provider. Try again later.",
|
||||||
"Update your account\\'s profile information and email address.": "Update your account\\'s profile information and email address.",
|
"Update your account\\'s profile information and email address.": "Update your account\\'s profile information and email address.",
|
||||||
"Photo": "Photo",
|
"Photo": "Photo",
|
||||||
"Select A New Photo": "Select A New Photo",
|
"Select A New Photo": "Select A New Photo",
|
||||||
|
|||||||
+2
-2
@@ -51,8 +51,8 @@
|
|||||||
"Token Name": "Nombre del Token",
|
"Token Name": "Nombre del Token",
|
||||||
"Permissions": "Permisos",
|
"Permissions": "Permisos",
|
||||||
"Profile Information": "Información del Perfil",
|
"Profile Information": "Información del Perfil",
|
||||||
"Account already exists. Check your email to connect the accounts.": "La cuenta ya existe. Revisa tu correo electrónico para un enlace de inicio de sesión.",
|
"Account already exists. Check your email to connect your :provider account.": "La cuenta ya existe. Revisa tu correo electrónico para conectar tu cuenta :provider.",
|
||||||
"Could not login using that provider. Try again later.": "No se pudo iniciar sesión con ese proveedor. Inténtalo nuevamente más tarde.",
|
"Could not login using :provider. Try again later.": "No se pudo iniciar sesión con :provider. Inténtalo nuevamente más tarde.",
|
||||||
"Update your account's profile information and email address.": "Actualiza la información de perfil y la dirección de correo electrónico de tu cuenta.",
|
"Update your account's profile information and email address.": "Actualiza la información de perfil y la dirección de correo electrónico de tu cuenta.",
|
||||||
"Photo": "Foto",
|
"Photo": "Foto",
|
||||||
"Select A New Photo": "Seleccionar una Nueva Foto",
|
"Select A New Photo": "Seleccionar una Nueva Foto",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
@session('status')
|
@session('status')
|
||||||
<x-alert icon="o-envelope" class="alert-success">
|
<x-alert icon="o-envelope" class="alert-success mb-4">
|
||||||
{{ $value }}
|
{{ $value }}
|
||||||
</x-alert>
|
</x-alert>
|
||||||
@endsession
|
@endsession
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<x-errors class="mb-4" />
|
<x-errors class="mb-4" />
|
||||||
|
|
||||||
@session('status')
|
@session('status')
|
||||||
<x-alert icon="o-envelope" class="alert-success">
|
<x-alert icon="o-envelope" class="alert-success mb-4">
|
||||||
{{ $value }}
|
{{ $value }}
|
||||||
</x-alert>
|
</x-alert>
|
||||||
@endsession
|
@endsession
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (session('status') == 'verification-link-sent')
|
@if (session('status') == 'verification-link-sent')
|
||||||
<x-alert icon="o-envelope" class="alert-success">
|
<x-alert icon="o-envelope" class="alert-success mb-4">
|
||||||
{{ __('A new verification link has been sent to the email address you provided in your profile settings.') }}
|
{{ __('A new verification link has been sent to the email address you provided in your profile settings.') }}
|
||||||
</x-alert>
|
</x-alert>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
Reference in New Issue
Block a user