diff --git a/app/Events/Socket/DownloadAvailable.php b/app/Events/Socket/DownloadAvailable.php index d2825b8066..5e258b8073 100644 --- a/app/Events/Socket/DownloadAvailable.php +++ b/app/Events/Socket/DownloadAvailable.php @@ -29,7 +29,6 @@ class DownloadAvailable implements ShouldBroadcast public function __construct(public string $url, public string $message, public User $user) { - } public function broadcastOn() @@ -43,7 +42,7 @@ class DownloadAvailable implements ShouldBroadcast { ctrans('texts.document_download_subject'); - + return [ 'message' => $this->message, 'url' => $this->url, diff --git a/app/Jobs/Invoice/ZipInvoices.php b/app/Jobs/Invoice/ZipInvoices.php index 142b853dbb..ae26fcc90a 100644 --- a/app/Jobs/Invoice/ZipInvoices.php +++ b/app/Jobs/Invoice/ZipInvoices.php @@ -112,9 +112,10 @@ class ZipInvoices implements ShouldQueue UnlinkFile::dispatch(config('filesystems.default'), $path.$file_name)->delay(now()->addHours(1)); - $message = count($this->invoices). " ". ctrans('texts.invoices'). " " . ctrans('texts.download_files'); + $message = count($this->invoices). " ". ctrans('texts.invoices'); + $message = ctrans('texts.download_ready', ['message' => $message]); - broadcast(new DownloadAvailable($storage_url, $message, $this->company->locale(), $this->user)); + broadcast(new DownloadAvailable($storage_url, $message, $this->user)); } catch (\PhpZip\Exception\ZipException $e) { nlog('could not make zip => '.$e->getMessage()); diff --git a/lang/en/texts.php b/lang/en/texts.php index be96601400..4aaaef9eef 100644 --- a/lang/en/texts.php +++ b/lang/en/texts.php @@ -5474,6 +5474,7 @@ $lang = array( 'delete_identifier' => 'Delete identifier', 'delete_identifier_description' => 'Deleting this identifier will remove it from the system. Make sure this is the desired action before proceeding.', 'einvoice_something_went_wrong' => 'Oops! Something went wrong. Contact us at contact@invoiceninja.com for more information.', + 'download_ready' => 'Your Download is now ready! [ :message ]', ); return $lang;