mirror of
https://github.com/brunofontes/shareit.git
synced 2025-11-15 07:50:54 -03:00
Added PTB Translation of emails and some pages
Now the main page, item page and e-mails are translated into Brazilian Portuguese
This commit is contained in:
@@ -32,7 +32,11 @@ class ItemAvailable extends Mailable
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
return $this->subject($this->item->name . ' is available!')
|
||||
->markdown('emails.itemAvailable');
|
||||
return $this->subject(
|
||||
\Lang::getFromJson(
|
||||
':itemname is available!',
|
||||
['itemname' => $this->item->name]
|
||||
)
|
||||
)->markdown('emails.itemAvailable');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,14 @@ class UserWaiting extends Mailable
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
return $this->subject($this->waitingUser . ' wants to use ' . $this->item->name)
|
||||
->markdown('emails.userWaiting');
|
||||
return $this->subject(
|
||||
\Lang::getFromJson(
|
||||
':waitinguser wants to use :itemname',
|
||||
[
|
||||
'waitinguser' => $this->waitingUser,
|
||||
'itemname' => $this->item->name
|
||||
]
|
||||
)
|
||||
)->markdown('emails.userWaiting');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use \Lang;
|
||||
use \App\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
@@ -30,6 +31,6 @@ class Welcome extends Mailable
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
return $this->markdown('emails.welcome');
|
||||
return $this->subject(Lang::getFromJson('Welcome'))->markdown('emails.welcome');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user