mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #5637 from turbo124/v5-develop
Fixes for custom translation strings.
This commit is contained in:
commit
2109b8be52
@ -91,8 +91,16 @@ class CreateEntityPdf implements ShouldQueue
|
|||||||
|
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
/* Set the locale*/
|
||||||
App::setLocale($this->contact->preferredLocale());
|
App::setLocale($this->contact->preferredLocale());
|
||||||
|
|
||||||
|
/* Forget the singleton*/
|
||||||
App::forgetInstance('translator');
|
App::forgetInstance('translator');
|
||||||
|
|
||||||
|
/* Init a new copy of the translator*/
|
||||||
|
$t = app('translator');
|
||||||
|
|
||||||
|
/* Set customized translations _NOW_ */
|
||||||
Lang::replace(Ninja::transformTranslations($this->entity->client->getMergedSettings()));
|
Lang::replace(Ninja::transformTranslations($this->entity->client->getMergedSettings()));
|
||||||
|
|
||||||
$this->entity->service()->deletePdf();
|
$this->entity->service()->deletePdf();
|
||||||
|
@ -23,6 +23,8 @@ class SchedulerCheck implements ShouldQueue
|
|||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
|
public $tries = 1;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -45,14 +47,18 @@ class SchedulerCheck implements ShouldQueue
|
|||||||
Artisan::call('migrate', ['--force' => true]);
|
Artisan::call('migrate', ['--force' => true]);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
nlog("I wasn't able to migrate the data.");
|
nlog("I wasn't able to migrate the data.");
|
||||||
|
nlog($e->getMessage());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Artisan::call('optimize');
|
Artisan::call('clear-compiled');
|
||||||
|
Artisan::call('cache:clear');
|
||||||
|
Artisan::call('route:clear');
|
||||||
|
Artisan::call('config:cache');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
nlog($e->getMessage());
|
|
||||||
nlog("I wasn't able to optimize.");
|
nlog("I wasn't able to optimize.");
|
||||||
|
nlog($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -60,6 +66,7 @@ class SchedulerCheck implements ShouldQueue
|
|||||||
Artisan::call('view:clear');
|
Artisan::call('view:clear');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
nlog("I wasn't able to clear the views.");
|
nlog("I wasn't able to clear the views.");
|
||||||
|
nlog($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user