mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for localizing emails to company localization
This commit is contained in:
parent
4829b762dd
commit
0e01b376e4
@ -5,6 +5,7 @@ namespace App\Mail;
|
|||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Mail\Mailable;
|
use Illuminate\Mail\Mailable;
|
||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Support\Facades\App;
|
||||||
|
|
||||||
class ExistingMigration extends Mailable
|
class ExistingMigration extends Mailable
|
||||||
{
|
{
|
||||||
@ -35,6 +36,8 @@ class ExistingMigration extends Mailable
|
|||||||
*/
|
*/
|
||||||
public function build()
|
public function build()
|
||||||
{
|
{
|
||||||
|
App::setLocale($this->company->getLocale());
|
||||||
|
|
||||||
$this->settings = $this->company->settings;
|
$this->settings = $this->company->settings;
|
||||||
$this->logo = $this->company->present()->logo();
|
$this->logo = $this->company->present()->logo();
|
||||||
$this->company_name = $this->company->present()->name();
|
$this->company_name = $this->company->present()->name();
|
||||||
|
@ -39,6 +39,7 @@ class MigrationCompleted extends Mailable
|
|||||||
App::forgetInstance('translator');
|
App::forgetInstance('translator');
|
||||||
$t = app('translator');
|
$t = app('translator');
|
||||||
$t->replace(Ninja::transformTranslations($this->company->settings));
|
$t->replace(Ninja::transformTranslations($this->company->settings));
|
||||||
|
App::setLocale($this->company->getLocale());
|
||||||
|
|
||||||
$data['settings'] = $this->company->settings;
|
$data['settings'] = $this->company->settings;
|
||||||
$data['company'] = $this->company->fresh();
|
$data['company'] = $this->company->fresh();
|
||||||
|
@ -4,6 +4,7 @@ namespace App\Mail;
|
|||||||
|
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
use Illuminate\Mail\Mailable;
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Support\Facades\App;
|
||||||
|
|
||||||
class MigrationFailed extends Mailable
|
class MigrationFailed extends Mailable
|
||||||
{
|
{
|
||||||
@ -35,6 +36,8 @@ class MigrationFailed extends Mailable
|
|||||||
*/
|
*/
|
||||||
public function build()
|
public function build()
|
||||||
{
|
{
|
||||||
|
App::setLocale($this->company->getLocale());
|
||||||
|
|
||||||
return $this
|
return $this
|
||||||
->from(config('mail.from.address'), config('mail.from.name'))
|
->from(config('mail.from.address'), config('mail.from.name'))
|
||||||
->view('email.migration.failed', [
|
->view('email.migration.failed', [
|
||||||
|
@ -26,6 +26,7 @@ class MarkSent extends AbstractService
|
|||||||
public function __construct(Client $client, Invoice $invoice)
|
public function __construct(Client $client, Invoice $invoice)
|
||||||
{
|
{
|
||||||
$this->client = $client;
|
$this->client = $client;
|
||||||
|
|
||||||
$this->invoice = $invoice;
|
$this->invoice = $invoice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user