feat: locale

This commit is contained in:
2026-05-21 21:32:20 +02:00
parent 19e65e36f3
commit 8e5a50dd2b
21 changed files with 337 additions and 32 deletions
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="fr">
<html lang="{{ $locale }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Nouveau mot de passe</title>
<title>{{ trans('mail.reset_password_form.page_title', [], $locale) }}</title>
</head>
<body style="margin: 0; min-height: 100vh; display: grid; place-items: center; background: #f5efe6; color: #232323; font-family: Arial, sans-serif;">
<main style="width: min(100% - 32px, 520px); background: #ffffff; border-radius: 8px; padding: 32px; box-sizing: border-box;">
@@ -12,16 +12,16 @@
</p>
<h1 style="margin: 0 0 16px; color: #000000; font-size: 28px; line-height: 34px;">
{{ $passwordReset ? 'Mot de passe modifié' : 'Nouveau mot de passe' }}
{{ $passwordReset ? trans('mail.reset_password_form.success_title', [], $locale) : trans('mail.reset_password_form.title', [], $locale) }}
</h1>
@if ($passwordReset)
<p style="margin: 0; color: #232323; font-size: 16px; line-height: 24px;">
Ton mot de passe a bien été réinitialisé. Tu peux retourner dans lapplication et te connecter.
{{ trans('mail.reset_password_form.success', [], $locale) }}
</p>
@else
<p style="margin: 0 0 24px; color: #232323; font-size: 16px; line-height: 24px;">
Choisis un nouveau mot de passe pour sécuriser ton compte.
{{ trans('mail.reset_password_form.intro', [], $locale) }}
</p>
@if ($errors->any())
@@ -36,7 +36,7 @@
<input type="hidden" name="token" value="{{ $token }}">
<label style="display: grid; gap: 8px; color: #232323; font-size: 14px; font-weight: 700;">
Email
{{ trans('mail.reset_password_form.email', [], $locale) }}
<input
type="email"
name="email"
@@ -48,7 +48,7 @@
</label>
<label style="display: grid; gap: 8px; color: #232323; font-size: 14px; font-weight: 700;">
Nouveau mot de passe
{{ trans('mail.reset_password_form.password', [], $locale) }}
<input
type="password"
name="password"
@@ -60,7 +60,7 @@
</label>
<label style="display: grid; gap: 8px; color: #232323; font-size: 14px; font-weight: 700;">
Confirmer le mot de passe
{{ trans('mail.reset_password_form.password_confirmation', [], $locale) }}
<input
type="password"
name="password_confirmation"
@@ -72,7 +72,7 @@
</label>
<button type="submit" style="min-height: 48px; border: 0; border-radius: 8px; background: #007f3a; color: #ffffff; font-size: 16px; font-weight: 700; cursor: pointer;">
Modifier le mot de passe
{{ trans('mail.reset_password_form.submit', [], $locale) }}
</button>
</form>
@endif
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="fr">
<html lang="{{ $locale }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Réinitialise ton mot de passe Bowli</title>
<title>{{ trans('mail.reset_password.subject', [], $locale) }}</title>
</head>
<body style="margin: 0; padding: 0; background: #f5efe6; color: #232323; font-family: Arial, sans-serif;">
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="background: #f5efe6; padding: 32px 16px;">
@@ -17,33 +17,33 @@
</p>
<h1 style="margin: 0 0 16px; color: #000000; font-size: 28px; line-height: 34px;">
Réinitialise ton mot de passe
{{ trans('mail.reset_password.title', [], $locale) }}
</h1>
<p style="margin: 0 0 16px; color: #232323; font-size: 16px; line-height: 24px;">
Bonjour {{ $userName ?: 'à toi' }},
{{ trans('mail.reset_password.greeting', ['name' => $userName ?: trans('mail.reset_password.default_name', [], $locale)], $locale) }}
</p>
<p style="margin: 0 0 24px; color: #232323; font-size: 16px; line-height: 24px;">
Clique sur le bouton ci-dessous pour créer un nouveau mot de passe. Le lien ouvre une page sécurisée de lAPI Bowli.
{{ trans('mail.reset_password.intro', [], $locale) }}
</p>
<table role="presentation" cellpadding="0" cellspacing="0" style="margin: 0 0 24px;">
<tr>
<td style="background: #007f3a; border-radius: 999px;">
<a href="{{ $resetUrl }}" style="display: inline-block; padding: 14px 24px; color: #ffffff; font-size: 16px; font-weight: 700; text-decoration: none;">
Choisir un nouveau mot de passe
{{ trans('mail.reset_password.action', [], $locale) }}
</a>
</td>
</tr>
</table>
<p style="margin: 0 0 16px; color: #666666; font-size: 14px; line-height: 22px;">
Ce lien expire dans {{ $expiresInMinutes }} minutes.
{{ trans('mail.reset_password.expires', ['minutes' => $expiresInMinutes], $locale) }}
</p>
<p style="margin: 0 0 16px; color: #666666; font-size: 14px; line-height: 22px;">
Si le bouton ne fonctionne pas, copie ce lien dans ton navigateur :
{{ trans('mail.reset_password.copy_link', [], $locale) }}
</p>
<p style="margin: 0 0 16px; word-break: break-all; color: #007f3a; font-size: 14px; line-height: 22px;">
@@ -51,7 +51,7 @@
</p>
<p style="margin: 0; color: #666666; font-size: 14px; line-height: 22px;">
Si tu nas pas demandé de réinitialisation, tu peux ignorer cet email.
{{ trans('mail.reset_password.ignore', [], $locale) }}
</p>
</td>
</tr>
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="fr">
<html lang="{{ $locale }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Vérifie ton compte Daily Meal</title>
<title>{{ trans('mail.verify_account.subject', [], $locale) }}</title>
</head>
<body style="margin: 0; padding: 0; background: #f5efe6; color: #232323; font-family: Arial, sans-serif;">
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="background: #f5efe6; padding: 32px 16px;">
@@ -13,37 +13,37 @@
<tr>
<td style="padding: 32px;">
<p style="margin: 0 0 8px; color: #426fb3; font-size: 14px; font-weight: 700; text-transform: uppercase;">
Daily Meal
Bowli
</p>
<h1 style="margin: 0 0 16px; color: #000000; font-size: 28px; line-height: 34px;">
Vérifie ton compte
{{ trans('mail.verify_account.title', [], $locale) }}
</h1>
<p style="margin: 0 0 16px; color: #232323; font-size: 16px; line-height: 24px;">
Bonjour {{ $userName ?: 'à toi' }},
{{ trans('mail.verify_account.greeting', ['name' => $userName ?: trans('mail.verify_account.default_name', [], $locale)], $locale) }}
</p>
<p style="margin: 0 0 24px; color: #232323; font-size: 16px; line-height: 24px;">
Confirme ton adresse email pour activer ton compte et accéder à Daily Meal.
{{ trans('mail.verify_account.intro', [], $locale) }}
</p>
<table role="presentation" cellpadding="0" cellspacing="0" style="margin: 0 0 24px;">
<tr>
<td style="background: #000000; border-radius: 999px;">
<a href="{{ $verificationUrl }}" style="display: inline-block; padding: 14px 24px; color: #ffffff; font-size: 16px; font-weight: 700; text-decoration: none;">
Vérifier mon compte
{{ trans('mail.verify_account.action', [], $locale) }}
</a>
</td>
</tr>
</table>
<p style="margin: 0 0 16px; color: #666666; font-size: 14px; line-height: 22px;">
Ce lien expire dans {{ $expiresInMinutes }} minutes.
{{ trans('mail.verify_account.expires', ['minutes' => $expiresInMinutes], $locale) }}
</p>
<p style="margin: 0; color: #666666; font-size: 14px; line-height: 22px;">
Si tu nas pas créé de compte Daily Meal, tu peux ignorer cet email.
{{ trans('mail.verify_account.ignore', [], $locale) }}
</p>
</td>
</tr>