Skip to content

Commit f202817

Browse files
committed
Use translation strings
1 parent 7df6365 commit f202817

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

app/Mail/CheckoutAssetMail.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function content(): Content
9898
'accept_url' => $accept_url,
9999
'last_checkout' => $this->last_checkout,
100100
'expected_checkin' => $this->expected_checkin,
101-
'opening_line' => $this->openingLine(),
101+
'introduction_line' => $this->introductionLine(),
102102
],
103103
);
104104
}
@@ -119,21 +119,21 @@ private function getSubject(): string
119119
return trans('mail.Asset_Checkout_Notification');
120120
}
121121

122-
return 'Reminder: ' . trans('mail.unaccepted_asset_reminder');
122+
return trans('mail.unaccepted_asset_reminder');
123123
}
124124

125-
private function openingLine(): string
125+
private function introductionLine(): string
126126
{
127127
if ($this->firstTimeSending && $this->requiresAcceptance()) {
128-
return 'A new item has been checked out under your name that requires acceptance, details are below.';
128+
return trans('mail.new_item_checked_with_acceptance');
129129
}
130130

131131
if ($this->firstTimeSending && !$this->requiresAcceptance()) {
132-
return 'A new item has been checked out under your name, details are below.';
132+
return trans('mail.new_item_checked');
133133
}
134134

135135
if (!$this->firstTimeSending && $this->requiresAcceptance()) {
136-
return 'An item was recently checked out under your name that requires acceptance, details are below.';
136+
return trans('mail.recent_item_checked');
137137
}
138138

139139
// we shouldn't get here but let's send a default message just in case

resources/lang/en-US/mail.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666
'min_QTY' => 'Min QTY',
6767
'name' => 'Name',
6868
'new_item_checked' => 'A new item has been checked out under your name, details are below.',
69+
'new_item_checked_with_acceptance' => 'A new item has been checked out under your name that requires acceptance, details are below.',
70+
'recent_item_checked' => 'An item was recently checked out under your name that requires acceptance, details are below.',
6971
'notes' => 'Notes',
7072
'password' => 'Password',
7173
'password_reset' => 'Password Reset',
@@ -88,7 +90,7 @@
8890
'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.',
8991
'user' => 'User',
9092
'username' => 'Username',
91-
'unaccepted_asset_reminder' => 'You have Unaccepted Assets.',
93+
'unaccepted_asset_reminder' => 'Reminder: You have Unaccepted Assets.',
9294
'welcome' => 'Welcome :name',
9395
'welcome_to' => 'Welcome to :web!',
9496
'your_assets' => 'View Your Assets',

resources/views/mail/markdown/checkout-asset.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@component('mail::message')
22
# {{ trans('mail.hello') }} {{ $target->present()->fullName() }},
33

4-
{{ $opening_line }}
4+
{{ $introduction_line }}
55

66
@if (($snipeSettings->show_images_in_email =='1') && $item->getImageUrl())
77
<center><img src="{{ $item->getImageUrl() }}" alt="Asset" style="max-width: 570px;"></center>

0 commit comments

Comments
 (0)