Skip to content

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

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions resources/lang/en-US/mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
'i_have_read' => 'I have read and agree to the terms of use, and have received this item.',
'inventory_report' => 'Inventory Report',
'item' => 'Item',
'item_checked_reminder' => 'This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.',
'item_checked_reminder' => 'This is a reminder that you currently have :count item checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.|This is a reminder that you currently have :count items checked out to you that you have not accepted or declined. Please click the link below to confirm your decision.',
'license_expiring_alert' => 'There is :count license expiring in the next :threshold days.|There are :count licenses expiring in the next :threshold days.',
'link_to_update_password' => 'Please click on the following link to update your :web password:',
'login' => 'Login',
Expand Down Expand Up @@ -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).',
Copy link
Member

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

Copy link
Member Author

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...

'welcome' => 'Welcome :name',
'welcome_to' => 'Welcome to :web!',
'your_assets' => 'View Your Assets',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@component('mail::message')
# {{ trans('mail.hello') }} {{ $assigned_to}},
# {{ trans('mail.hello') }} {{ $assigned_to }},

{{trans('mail.item_checked_reminder', ['count' => $count])}}
[{{ trans('general.click_here')}}]({{$accept_url}})
{{ trans_choice('mail.item_checked_reminder', $count) }}
[{{ trans('general.click_here')}}]({{ $accept_url }})

{{ trans('mail.best_regards') }}

Expand Down
Loading