diff --git a/app/Http/Middleware/Locale.php b/app/Http/Middleware/Locale.php new file mode 100644 index 0000000..c72d1e0 --- /dev/null +++ b/app/Http/Middleware/Locale.php @@ -0,0 +1,28 @@ + $locale]); + } + } catch (\Exception $e) { + } + app()->setLocale(session('locale', session('browser-locale', config('app.settings.language', config('app.locale', 'en'))))); + return $next($request); + } +} diff --git a/bootstrap/app.php b/bootstrap/app.php index 7b162da..94f56e3 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -11,7 +11,9 @@ return Application::configure(basePath: dirname(__DIR__)) health: '/up', ) ->withMiddleware(function (Middleware $middleware) { - // + $middleware->web(append: [ + \App\Http\Middleware\Locale::class, + ]); }) ->withExceptions(function (Exceptions $exceptions) { // diff --git a/resources/js/boil.js b/resources/js/boil.js index 7ef20ed..d1e765d 100644 --- a/resources/js/boil.js +++ b/resources/js/boil.js @@ -57,10 +57,11 @@ window.addEventListener("showAlert", (event) => { window.addEventListener("copyEmail", (event) => { const element = document.getElementById("copyEmail"); + const copyText = document.getElementById('copyEmailText').innerText if (element) { const textToCopy = element.innerHTML; navigator.clipboard.writeText(textToCopy).then(() => { - const detail = { type: 'success', message: 'Email copied to clipboard' }; + const detail = { type: 'success', message: copyText}; showToast(detail); }).catch(err => { const detail = { type: 'error', message: 'Failed to copy email' }; diff --git a/resources/lang/ar.json b/resources/lang/ar.json index 647a95b..9b7e132 100644 --- a/resources/lang/ar.json +++ b/resources/lang/ar.json @@ -1,4 +1,6 @@ { + "Inbox": "صندوق الوارد", + "You are signed in as:": "أنت مسجل دخولك كـ:", "Get back to MailBox": "ارجع إلى صندوق البريد", "Enter Username": "أدخل اسم المستخدم", "Select Domain": "حدد المجال", @@ -49,4 +51,4 @@ " temp mail": " بريد مؤقت", "Sorry! That email is already been used by someone else. Please try a different email address.": "آسف! تم استخدام هذا البريد الإلكتروني بالفعل من قبل شخص آخر. يرجى تجربة عنوان بريد إلكتروني مختلف.", "Invalid Captcha. Please try again": "كلمة التحقق غير صالحة. يرجى المحاولة مرة أخرى" -} \ No newline at end of file +} diff --git a/resources/lang/de.json b/resources/lang/de.json index 6fd6cef..25c5233 100644 --- a/resources/lang/de.json +++ b/resources/lang/de.json @@ -1,4 +1,6 @@ { + "Inbox": "Posteingang", + "You are signed in as:": "Sie sind angemeldet als:", "Get back to MailBox": "Geh zurück zu MailBox", "Enter Username": "Benutzername eingeben", "Select Domain": "Wählen Sie Domäne", @@ -49,4 +51,4 @@ " temp mail": " Temporäre E-Mail", "Sorry! That email is already been used by someone else. Please try a different email address.": "Entschuldigung! Diese E-Mail wurde bereits von jemand anderem verwendet. Bitte versuchen Sie es mit einer anderen E-Mail-Adresse.", "Invalid Captcha. Please try again": "Ungültiges Captcha. Bitte versuche es erneut" -} \ No newline at end of file +} diff --git a/resources/lang/en.json b/resources/lang/en.json index 34c0ac5..b7bf7ec 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -1,4 +1,6 @@ { + "Inbox": "Inbox", + "You are signed in as:": "You are signed in as:", "Get back to MailBox": "Get back to MailBox", "Enter Username": "Enter Username", "Select Domain": "Select Domain", @@ -49,4 +51,4 @@ " temp mail": " temp mail", "Sorry! That email is already been used by someone else. Please try a different email address.": "Sorry! That email is already been used by someone else. Please try a different email address.", "Invalid Captcha. Please try again": "Invalid Captcha. Please try again" -} \ No newline at end of file +} diff --git a/resources/lang/es.json b/resources/lang/es.json index b2a450b..acee2eb 100644 --- a/resources/lang/es.json +++ b/resources/lang/es.json @@ -1,4 +1,6 @@ { + "Inbox": "Bandeja de entrada", + "You are signed in as:": "Estás registrado como:", "Get back to MailBox": "Regresar al buzón", "Enter Username": "Introduce tu nombre", "Select Domain": "Seleccionar dominio", @@ -49,4 +51,4 @@ " temp mail": " correo temporal", "Sorry! That email is already been used by someone else. Please try a different email address.": "¡Lo siento! Ese correo electrónico ya lo ha utilizado otra persona. Prueba con otra dirección de correo electrónico.", "Invalid Captcha. Please try again": "Captcha no válido. Inténtalo de nuevo" -} \ No newline at end of file +} diff --git a/resources/lang/fr.json b/resources/lang/fr.json index bd6eb24..ad7f0ed 100644 --- a/resources/lang/fr.json +++ b/resources/lang/fr.json @@ -1,4 +1,6 @@ { + "Inbox": "Boîte de réception", + "You are signed in as:": "Vous êtes connecté en tant que:", "Get back to MailBox": "Revenir à la boîte aux lettres", "Enter Username": "Entrez votre nom", "Select Domain": "Sélectionner un domaine", @@ -49,4 +51,4 @@ " temp mail": " courrier temporaire", "Sorry! That email is already been used by someone else. Please try a different email address.": "Désolé ! Cette adresse e-mail a déjà été utilisée par quelqu'un d'autre. Veuillez essayer une autre adresse e-mail.", "Invalid Captcha. Please try again": "Captcha non valide. Veuillez réessayer" -} \ No newline at end of file +} diff --git a/resources/lang/hi.json b/resources/lang/hi.json index 4a0afb6..5e21df9 100644 --- a/resources/lang/hi.json +++ b/resources/lang/hi.json @@ -1,4 +1,6 @@ { + "Inbox": "इनबॉक्स", + "You are signed in as:": "आप साइन इन हैं जैसे:", "Get back to MailBox": "MailBox पर वापस जाएं", "Enter Username": "यूजरनेम डालें", "Select Domain": "डोमेन चुनें", @@ -49,4 +51,4 @@ " temp mail": " अस्थायी मेल", "Sorry! That email is already been used by someone else. Please try a different email address.": "माफ़ करना! उस ईमेल का उपयोग पहले से ही किसी और द्वारा किया जा चुका है। कृपया एक अलग ईमेल पता आज़माएं।", "Invalid Captcha. Please try again": "अमान्य कैप्चा। कृपया फिर से कोशिश करें" -} \ No newline at end of file +} diff --git a/resources/lang/id.json b/resources/lang/id.json index a6a43f4..07375ed 100644 --- a/resources/lang/id.json +++ b/resources/lang/id.json @@ -1,4 +1,6 @@ { + "Inbox": "Kotak Masuk", + "You are signed in as:": "Anda masuk sebagai:", "Get back to MailBox": "Kembali Ke Kotak Surat", "Enter Username": "Masukkan Nama Pengguna", "Select Domain": "Pilih Domain", @@ -49,4 +51,4 @@ " temp mail": " Email Sementara", "Sorry! That email is already been used by someone else. Please try a different email address.": "Maaf! Email Tersebut Sudah digunakan oleh user lain, Silahkan mencoba dengan alamat email lain.", "Invalid Captcha. Please try again": "Invalid Captcha. Silahkan Coba Lagi" -} \ No newline at end of file +} diff --git a/resources/lang/no.json b/resources/lang/no.json index 7299217..3244fd5 100644 --- a/resources/lang/no.json +++ b/resources/lang/no.json @@ -1,4 +1,6 @@ { + "Inbox": "Innboks", + "You are signed in as:": "Du er logget inn som:", "Get back to MailBox": "Gå tilbake til innboks", "Enter Username": "Fyll inn brukernavn", "Select Domain": "Velg domene", @@ -49,4 +51,4 @@ " temp mail": " temp post", "Sorry! That email is already been used by someone else. Please try a different email address.": "Unnskyld! Den e-posten er allerede brukt av noen andre. Prøv en annen e-postadresse.", "Invalid Captcha. Please try again": "Ugyldig Captcha. Vennligst prøv på nytt" -} \ No newline at end of file +} diff --git a/resources/lang/pl.json b/resources/lang/pl.json index 369196d..a094c17 100644 --- a/resources/lang/pl.json +++ b/resources/lang/pl.json @@ -1,4 +1,6 @@ { + "Inbox": "Skrzynka odbiorcza", + "You are signed in as:": "Jesteś zalogowany jako:", "Get back to MailBox": "Wróć do skrzynki pocztowej", "Enter Username": "Wprowadź nazwę użytkownika", "Select Domain": "Wybierz domenę", @@ -49,4 +51,4 @@ " temp mail": " tymczasowa poczta", "Sorry! That email is already been used by someone else. Please try a different email address.": "Przepraszam! Ten e-mail jest już używany przez kogoś innego. Wypróbuj inny adres e-mail.", "Invalid Captcha. Please try again": "Nieprawidłowy Captcha. Proszę spróbować ponownie" -} \ No newline at end of file +} diff --git a/resources/lang/ru.json b/resources/lang/ru.json index a54aa36..c5a664c 100644 --- a/resources/lang/ru.json +++ b/resources/lang/ru.json @@ -1,4 +1,6 @@ { + "Inbox": "Входящие", + "You are signed in as:": "Вы вошли как:", "Get back to MailBox": "Вернитесь в Mailbox", "Enter Username": "Введите имя пользователя", "Select Domain": "Выберите домен", @@ -49,4 +51,4 @@ " temp mail": " временная почта", "Sorry! That email is already been used by someone else. Please try a different email address.": "Извините! Этим письмом уже воспользовался кто-то другой. Пожалуйста, укажите другой адрес электронной почты.", "Invalid Captcha. Please try again": "Неверная капча. Пожалуйста, попробуйте еще раз" -} \ No newline at end of file +} diff --git a/resources/lang/tr.json b/resources/lang/tr.json index 53c20d4..7a4be93 100644 --- a/resources/lang/tr.json +++ b/resources/lang/tr.json @@ -1,4 +1,6 @@ { + "Inbox": "Gelen Kutusu", + "You are signed in as:": "Oturum açtığınız kişi:", "Get back to MailBox": "MailBox'a geri dön", "Enter Username": "Kullanıcı Adı Girin", "Select Domain": "Alan Adı Seç", @@ -49,4 +51,4 @@ " temp mail": " geçici posta", "Sorry! That email is already been used by someone else. Please try a different email address.": "Üzgünüm! Bu e-posta zaten başka biri tarafından kullanılmış. Lütfen farklı bir e-posta adresi deneyin.", "Invalid Captcha. Please try again": "Geçersiz Captcha. Lütfen tekrar deneyin" -} \ No newline at end of file +} diff --git a/resources/lang/vi.json b/resources/lang/vi.json index ba6c27c..aacb325 100644 --- a/resources/lang/vi.json +++ b/resources/lang/vi.json @@ -1,4 +1,6 @@ { + "Inbox": "Hộp thư đến", + "You are signed in as:": "Bạn đã đăng nhập dưới tên:", "Get back to MailBox": "Quay lại Mailbox", "Enter Username": "Nhập tên người dùng", "Select Domain": "Chọn tên miền", @@ -49,4 +51,4 @@ " temp mail": " thư tạm thời", "Sorry! That email is already been used by someone else. Please try a different email address.": "Xin lỗi! Email đó đã được người khác sử dụng. Vui lòng thử một địa chỉ email khác.", "Invalid Captcha. Please try again": "Captcha không hợp lệ. Vui lòng thử lại" -} \ No newline at end of file +} diff --git a/resources/views/components/layouts/app.blade.php b/resources/views/components/layouts/app.blade.php index 4c72c29..1dedfb2 100644 --- a/resources/views/components/layouts/app.blade.php +++ b/resources/views/components/layouts/app.blade.php @@ -2,9 +2,10 @@ + - {{ $title ?? 'Page Title' }} + @yield('title', config('app.settings.app_title')) @if (file_exists(public_path('build/manifest.json')) || file_exists(public_path('hot'))) @vite(['resources/css/app.css', 'resources/css/boil.css', 'resources/js/app.js', 'resources/js/boil.js']) @endif @@ -21,7 +22,7 @@ - Inbox + {{ __('Inbox') }} {{-- Refresh--}}