Skip to content

Commit

Permalink
Add translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Xammie committed Feb 14, 2024
1 parent e326536 commit 171426f
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

namespace App\Mail;
declare(strict_types=1);

namespace App\Mail\Account;

use Illuminate\Mail\Mailable;

Expand All @@ -10,7 +12,7 @@ public function build(): self
{
return $this
->markdown('mail.account-created')
->subject('Welcome to our platform!')
->subject(__('Welcome to our platform!'))
->to('[email protected]', 'User');
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

namespace App\Mail;
declare(strict_types=1);

namespace App\Mail\Account;

use Illuminate\Mail\Mailable;

Expand All @@ -10,7 +12,7 @@ public function build(): self
{
return $this
->markdown('mail.account-deleted')
->subject('Your account has been deleted')
->subject(__('Your account has been deleted'))
->to('[email protected]', 'User')
->to('[email protected]', 'User');
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

namespace App\Mail;
declare(strict_types=1);

namespace App\Mail\Orders;

use Illuminate\Mail\Mailable;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

namespace App\Mail;
declare(strict_types=1);

namespace App\Mail\Orders;

use Illuminate\Mail\Mailable;

Expand Down
7 changes: 6 additions & 1 deletion lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@
"You can track it here with the following link.": "Sie können es hier mit dem folgenden Link verfolgen.",
"Track your package": "Verfolgen Sie Ihre Paket",
"It has been shipped without a tracking link": "Es wurde ohne einen Tracking-Link versandt",
"If you are having trouble clicking the \"Track your package\" button, copy and paste the URL below into your web browser:": "Wenn Sie Probleme haben, auf die Schaltfläche \"Verfolgen Sie Ihr Paket\" zu klicken, kopieren und fügen Sie die unten stehende URL in Ihren Webbrowser ein:"
"If you are having trouble clicking the \"Track your package\" button, copy and paste the URL below into your web browser:": "Wenn Sie Probleme haben, auf die Schaltfläche \"Verfolgen Sie Ihr Paket\" zu klicken, kopieren und fügen Sie die unten stehende URL in Ihren Webbrowser ein:",
"Hello user": "Hallo Benutzer",
"Welcome to our platform!": "Willkommen auf unserer Plattform!",
"Thank you for creating an account with us.": "Vielen Dank, dass Sie ein Konto bei uns erstellt haben.",
"Your account has been deleted": "Ihr Konto wurde gelöscht",
"Your account has been deleted. We're sorry to see you go.": "Ihr Konto wurde gelöscht. Wir bedauern, dass Sie gehen."
}
7 changes: 6 additions & 1 deletion lang/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@
"You can track it here with the following link.": "Volg je bestelling hier met de volgende link.",
"Track your package": "Track je pakket",
"It has been shipped without a tracking link": "Het is verzonden zonder een tracking link",
"If you are having trouble clicking the \"Track your package\" button, copy and paste the URL below into your web browser:": "Als je problemen hebt met het klikken op de \"Track je pakket\" knop, kopieer en plak dan de URL hieronder in je webbrowser:"
"If you are having trouble clicking the \"Track your package\" button, copy and paste the URL below into your web browser:": "Als je problemen hebt met het klikken op de \"Track je pakket\" knop, kopieer en plak dan de URL hieronder in je webbrowser:",
"Hello user": "Hallo gebruiker",
"Welcome to our platform!": "Welkom op ons platform!",
"Thank you for creating an account with us.": "Bedankt voor het aanmaken van een account bij ons.",
"Your account has been deleted": "Je account is verwijderd",
"Your account has been deleted. We're sorry to see you go.": "Je account is verwijderd. We vinden het jammer dat je weggaat."
}
7 changes: 2 additions & 5 deletions resources/views/mail/account-created.blade.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
@component('mail::message')
# Hello user,
# {{ __('Hello user') }},

Thank you for creating an account with us.

Thanks,<br>
{{ config('app.name') }}
{{ __('Thank you for creating an account with us.') }}
@endcomponent
7 changes: 2 additions & 5 deletions resources/views/mail/account-deleted.blade.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
@component('mail::message')
# Hello user,
# {{ __('Hello user') }},

Your account has been deleted. We're sorry to see you go.

Thanks,<br>
{{ config('app.name') }}
{{ __('Your account has been deleted. We\'re sorry to see you go.') }}
@endcomponent
12 changes: 6 additions & 6 deletions routes/mailbook.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<?php

use App\Mail\AccountCreated;
use App\Mail\AccountDeleted;
use App\Mail\Account\AccountCreated;
use App\Mail\Account\AccountDeleted;
use App\Mail\Changelog;
use App\Mail\OrderCreated;
use App\Mail\OrderShipped;
use App\Mail\Orders\OrderCreated;
use App\Mail\Orders\OrderShipped;
use App\Mail\WelcomeToMailbook;
use Xammie\Mailbook\Facades\Mailbook;

Mailbook::add(WelcomeToMailbook::class)->label('Welcome to Mailbook');
Mailbook::add(Changelog::class);

Mailbook::category('Orders')->group(function () {
Mailbook::category('Orders')->group(function (): void {
Mailbook::add(OrderCreated::class);
Mailbook::add(OrderShipped::class)
->variant('Tracking link', fn (): OrderShipped => new OrderShipped(true))
->variant('Post', fn (): OrderShipped => new OrderShipped(false));
});

Mailbook::category('Account')->group(function () {
Mailbook::category('Account')->group(function (): void {
Mailbook::add(AccountCreated::class);
Mailbook::add(AccountDeleted::class);
});
2 changes: 2 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Illuminate\Support\Facades\Route;

Route::get('/', fn () => to_route('mailbook.dashboard'));

0 comments on commit 171426f

Please sign in to comment.