Enable translations of checkin notifications (#8235)

This commit is contained in:
Dampfklon 2020-11-13 00:05:57 +01:00 committed by GitHub
parent 5fb31a5a3f
commit 4ef11c463c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 8 deletions

View file

@ -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'));
}
}

View file

@ -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;

View file

@ -83,7 +83,7 @@ class CheckinLicenseSeatNotification extends Notification
return (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'));
}

View file

@ -48,7 +48,7 @@ class ExpectedCheckinAdminNotification extends Notification
[
'assets' => $this->assets,
])
->subject('Expected asset checkin report');
->subject(trans('mail.Expected_Checkin_Report'));
return $message;

View file

@ -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'
);