A free open source IT asset/license management system
Enable translations of checkin notifications (#8235)
Dampfklon4ef11c463c78
diff --git a/app/Notifications/CheckinAccessoryNotification.php b/app/Notifications/CheckinAccessoryNotification.phpindex cc712e271d..ba7c3b2011 100644--- a/app/Notifications/CheckinAccessoryNotification.php+++ b/app/Notifications/CheckinAccessoryNotification.php@@ -111,7 +111,7 @@ class CheckinAccessoryNotification extends Notification];return (new SlackMessage)- ->content(':arrow_down: :keyboard: Accessory Checked In')+ ->content(':arrow_down: :keyboard: '.trans('mail.Accessory_Checkin_Notification'))->from($botname)->attachment(function ($attachment) use ($item, $note, $admin, $fields) {$attachment->title(htmlspecialchars_decode($item->present()->name), $item->present()->viewUrl())@@ -135,7 +135,7 @@ class CheckinAccessoryNotification extends Notification'note' => $this->note,'target' => $this->target,])- ->subject('Accessory checked in');+ ->subject(trans('mail.Accessory_Checkin_Notification'));}}diff --git a/app/Notifications/CheckinAssetNotification.php b/app/Notifications/CheckinAssetNotification.phpindex 0b0c29d7b5..e0f1e66f3a 100644--- a/app/Notifications/CheckinAssetNotification.php+++ b/app/Notifications/CheckinAssetNotification.php@@ -79,7 +79,7 @@ class CheckinAssetNotification extends Notification];return (new SlackMessage)- ->content(':arrow_down: :computer: Asset Checked In')+ ->content(':arrow_down: :computer: '.trans('mail.Asset_Checkin_Notification'))->from($botname)->attachment(function ($attachment) use ($item, $note, $admin, $fields) {$attachment->title(htmlspecialchars_decode($item->present()->name), $item->present()->viewUrl())@@ -113,7 +113,7 @@ class CheckinAssetNotification extends Notification'fields' => $fields,'expected_checkin' => $this->expected_checkin,])- ->subject('Asset checked in');+ ->subject(trans('mail.Asset_Checkin_Notification'));return $message;diff --git a/app/Notifications/CheckinLicenseSeatNotification.php b/app/Notifications/CheckinLicenseSeatNotification.phpindex f9d4914c37..a3bfb039e2 100644--- a/app/Notifications/CheckinLicenseSeatNotification.php+++ b/app/Notifications/CheckinLicenseSeatNotification.php@@ -83,7 +83,7 @@ class CheckinLicenseSeatNotification extends Notificationreturn (new SlackMessage)- ->content(':arrow_down: :floppy_disk: License Checked In')+ ->content(':arrow_down: :floppy_disk: '.trans('mail.License_Checkin_Notification'))->from($botname)->attachment(function ($attachment) use ($item, $note, $admin, $fields) {$attachment->title(htmlspecialchars_decode($item->present()->name), $item->present()->viewUrl())@@ -106,7 +106,7 @@ class CheckinLicenseSeatNotification extends Notification'note' => $this->note,'target' => $this->target,])- ->subject('License checked in');+ ->subject(trans('mail.License_Checkin_Notification'));}diff --git a/app/Notifications/ExpectedCheckinAdminNotification.php b/app/Notifications/ExpectedCheckinAdminNotification.phpindex c90c2fa3e1..7f29a915f5 100644--- a/app/Notifications/ExpectedCheckinAdminNotification.php+++ b/app/Notifications/ExpectedCheckinAdminNotification.php@@ -48,7 +48,7 @@ class ExpectedCheckinAdminNotification extends Notification['assets' => $this->assets,])- ->subject('Expected asset checkin report');+ ->subject(trans('mail.Expected_Checkin_Report'));return $message;diff --git a/resources/lang/en/mail.php b/resources/lang/en/mail.phpindex f8c781c8e8..837d71fa61 100644--- a/resources/lang/en/mail.php+++ b/resources/lang/en/mail.php@@ -70,5 +70,8 @@ return array('welcome' => 'Welcome :name','welcome_to' => 'Welcome to :web!','your_credentials' => 'Your Snipe-IT credentials',-+ 'Accessory_Checkin_Notification' => 'Accessory checked in',+ 'Asset_Checkin_Notification' => 'Asset checked in',+ 'License_Checkin_Notification' => 'License checked in',+ 'Expected_Checkin_Report' => 'Expected asset checkin report');