Normalize photobooth mail locale

This commit is contained in:
Codex Agent
2026-01-13 15:37:26 +01:00
parent 1918c1c101
commit 5da553ae54

View File

@@ -9,6 +9,7 @@ use App\Mail\PhotoboothUploaderDownload;
use App\Models\Event; use App\Models\Event;
use App\Models\PhotoboothSetting; use App\Models\PhotoboothSetting;
use App\Services\Photobooth\PhotoboothProvisioner; use App\Services\Photobooth\PhotoboothProvisioner;
use App\Support\LocaleConfig;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Mail;
@@ -85,7 +86,7 @@ class PhotoboothController extends Controller
]); ]);
} }
$locale = $user->preferred_locale ?: app()->getLocale(); $locale = LocaleConfig::canonicalize($user->preferred_locale ?: app()->getLocale());
$eventName = $this->resolveEventName($event, $locale); $eventName = $this->resolveEventName($event, $locale);
$recipientName = $user->fullName ?? $user->name ?? $user->email; $recipientName = $user->fullName ?? $user->name ?? $user->email;