feat:use provider name in social error messages

This commit is contained in:
hackerESQ
2024-10-20 14:17:09 -05:00
parent dd1e5c836c
commit 82dde818e6
6 changed files with 12 additions and 9 deletions
@@ -41,7 +41,7 @@ class ConnectedAccountController extends Controller
} catch (Exception $e) {
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
@@ -92,7 +92,10 @@ class ConnectedAccountController extends Controller
$user->notify(new VerifyConnectedAccountNotification($verification->id));
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
+2 -2
View File
@@ -51,8 +51,8 @@
"Token Name": "Token Name",
"Permissions": "Permissions",
"Profile Information": "Profile Information",
"Account already exists. Check your email to connect the accounts.": "Account already exists. Check your email to connect the accounts.",
"Could not login using that provider. Try again later.": "Could not login using that provider. Try again later.",
"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 :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.",
"Photo": "Photo",
"Select A New Photo": "Select A New Photo",
+2 -2
View File
@@ -51,8 +51,8 @@
"Token Name": "Nombre del Token",
"Permissions": "Permisos",
"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.",
"Could not login using that provider. Try again later.": "No se pudo iniciar sesión con ese proveedor. Inténtalo nuevamente más tarde.",
"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 :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.",
"Photo": "Foto",
"Select A New Photo": "Seleccionar una Nueva Foto",
@@ -11,7 +11,7 @@
</div>
@session('status')
<x-alert icon="o-envelope" class="alert-success">
<x-alert icon="o-envelope" class="alert-success mb-4">
{{ $value }}
</x-alert>
@endsession
+1 -1
View File
@@ -9,7 +9,7 @@
<x-errors class="mb-4" />
@session('status')
<x-alert icon="o-envelope" class="alert-success">
<x-alert icon="o-envelope" class="alert-success mb-4">
{{ $value }}
</x-alert>
@endsession
+1 -1
View File
@@ -11,7 +11,7 @@
</div>
@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.') }}
</x-alert>
@endif