-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Fixed: Trans Choice in Unaccepted Asset Email #16237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
PR Summary
|
resources/lang/en-US/mail.php
Outdated
@@ -88,7 +88,7 @@ | |||
'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' => 'You have Unaccepted Asset(s).', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This weeks awkward to me - I think we'd want to trans_choice the subject here as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, yea, I figured that this would catch your attention.
I am unsure how to get that to actually work. The email text is in markdown, but the actual email title is built different. its running off a function public function envelope(): Envelope
line 30 in UnacceptedAssetReminderMail.php
There is probably a pretty tricky way to get it to work tho...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple things to update. I think the merge conflict will go away if you remove the changes to web.php
.
$this->count = $count; | ||
$from = new Address(config('mail.from.address'), config('mail.from.name')); | ||
$subject = trans_choice('mail.unaccepted_asset_reminder', $count); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think $this->count = $count;
should be removed and $count
should be $this->count
on line 34.
routes/web.php
Outdated
Route::get('/mailable', function (){ | ||
$checkout_info = []; | ||
$acceptance = CheckoutAcceptance::first(); | ||
//dd($acceptance); | ||
$count = []; | ||
|
||
$checkout_info['acceptance'] = $acceptance; | ||
|
||
return new App\Mail\UnacceptedAssetReminderMail($checkout_info,2); | ||
}); | ||
|
||
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was for testing and needs to be removed.
Fixed an issue where the body of an email did not pluralize
items
when multiple items were unaccepted.