A free open source IT asset/license management system
Use translation strings
Marcus Mooref2028178526d
diff --git a/app/Mail/CheckoutAssetMail.php b/app/Mail/CheckoutAssetMail.phpindex a810ab8c82..7ac20861ed 100644--- a/app/Mail/CheckoutAssetMail.php+++ b/app/Mail/CheckoutAssetMail.php@@ -98,7 +98,7 @@ class CheckoutAssetMail extends Mailable'accept_url' => $accept_url,'last_checkout' => $this->last_checkout,'expected_checkin' => $this->expected_checkin,- 'opening_line' => $this->openingLine(),+ 'introduction_line' => $this->introductionLine(),],);}@@ -119,21 +119,21 @@ class CheckoutAssetMail extends Mailablereturn trans('mail.Asset_Checkout_Notification');}- return 'Reminder: ' . trans('mail.unaccepted_asset_reminder');+ return trans('mail.unaccepted_asset_reminder');}- private function openingLine(): string+ private function introductionLine(): string{if ($this->firstTimeSending && $this->requiresAcceptance()) {- return 'A new item has been checked out under your name that requires acceptance, details are below.';+ return trans('mail.new_item_checked_with_acceptance');}if ($this->firstTimeSending && !$this->requiresAcceptance()) {- return 'A new item has been checked out under your name, details are below.';+ return trans('mail.new_item_checked');}if (!$this->firstTimeSending && $this->requiresAcceptance()) {- return 'An item was recently checked out under your name that requires acceptance, details are below.';+ return trans('mail.recent_item_checked');}// we shouldn't get here but let's send a default message just in casediff --git a/resources/lang/en-US/mail.php b/resources/lang/en-US/mail.phpindex 7663a0167b..797f735a2b 100644--- a/resources/lang/en-US/mail.php+++ b/resources/lang/en-US/mail.php@@ -66,6 +66,8 @@ return ['min_QTY' => 'Min QTY','name' => 'Name','new_item_checked' => 'A new item has been checked out under your name, details are below.',+ 'new_item_checked_with_acceptance' => 'A new item has been checked out under your name that requires acceptance, details are below.',+ 'recent_item_checked' => 'An item was recently checked out under your name that requires acceptance, details are below.','notes' => 'Notes','password' => 'Password','password_reset' => 'Password Reset',@@ -88,7 +90,7 @@ return ['upcoming-audits' => 'There is :count asset that is coming up for audit within :threshold days.|There are :count assets that are coming up for audit within :threshold days.','user' => 'User','username' => 'Username',- 'unaccepted_asset_reminder' => 'You have Unaccepted Assets.',+ 'unaccepted_asset_reminder' => 'Reminder: You have Unaccepted Assets.','welcome' => 'Welcome :name','welcome_to' => 'Welcome to :web!','your_assets' => 'View Your Assets',diff --git a/resources/views/mail/markdown/checkout-asset.blade.php b/resources/views/mail/markdown/checkout-asset.blade.phpindex 8cb7101abe..1bcbe462ba 100644--- a/resources/views/mail/markdown/checkout-asset.blade.php+++ b/resources/views/mail/markdown/checkout-asset.blade.php@@ -1,7 +1,7 @@@component('mail::message')# {{ trans('mail.hello') }} {{ $target->present()->fullName() }},-{{ $opening_line }}+{{ $introduction_line }}@if (($snipeSettings->show_images_in_email =='1') && $item->getImageUrl())<center><img src="{{ $item->getImageUrl() }}" alt="Asset" style="max-width: 570px;"></center>