A free open source IT asset/license management system
Add some translations
Marcus Moore4167c6ea70ae
diff --git a/app/Mail/BulkAssetCheckoutMail.php b/app/Mail/BulkAssetCheckoutMail.phpindex 08a24e52d7..e3244aa1dd 100644--- a/app/Mail/BulkAssetCheckoutMail.php+++ b/app/Mail/BulkAssetCheckoutMail.php@@ -62,8 +62,7 @@ class BulkAssetCheckoutMail extends Mailableprivate function getSubject(): string{if ($this->assets->count() > 1) {- // @todo: translate- return 'Assets checked out';+ return ucfirst(trans('general.assets_checked_out_count'));}return trans('mail.Asset_Checkout_Notification', ['tag' => $this->assets->first()->asset_tag]);@@ -72,22 +71,10 @@ class BulkAssetCheckoutMail extends Mailableprivate function getIntroduction(): string{if ($this->target instanceof Location) {- if ($this->assets->count() === 1) {- // @todo: translate- return "An asset have been checked out to {$this->target->name}.";- }-- // @todo: translate- return "Assets have been checked out to {$this->target->name}.";- }-- if ($this->assets->count() > 1) {- // @todo: translate- return 'Assets have been checked out to you.';+ return trans_choice('mail.new_item_checked_location', $this->assets->count(), ['location' => $this->target->name]);}- // @todo: translate- return 'An asset has been checked out to you.';+ return trans_choice('mail.new_item_checked', $this->assets->count());}private function acceptanceUrl()@@ -145,14 +132,14 @@ class BulkAssetCheckoutMail extends Mailableif ($this->assets->count() > 1) {return [// todo: translate- 'One or more items require acceptance.',+ trans_choice('mail.items_checked_out_require_acceptance', $this->assets->count()),"**[✔ Click here to review the terms of use and accept the items]({$this->acceptanceUrl()})**",];}return [// todo: translate- 'The checked out item requires acceptance.',+ trans_choice('mail.items_checked_out_require_acceptance', $this->assets->count()),"**[✔ Click here to review the terms of use and accept the item]({$this->acceptanceUrl()})**",];}diff --git a/resources/lang/en-US/mail.php b/resources/lang/en-US/mail.phpindex 707390e4f0..92cce47145 100644--- a/resources/lang/en-US/mail.php+++ b/resources/lang/en-US/mail.php@@ -79,6 +79,7 @@ return ['new_item_checked' => 'A new item has been checked out under your name, details are below.|:count new items have been checked out under your name, details are below.','new_item_checked_with_acceptance' => 'A new item has been checked out under your name that requires acceptance, details are below.|:count new items have been checked out under your name that requires acceptance, details are below.','new_item_checked_location' => 'A new item has been checked out to :location, details are below.|:count new items have been checked out to :location, details are below.',+ 'items_checked_out_require_acceptance' => 'The checked out item requires acceptance.|One or more items require acceptance.','recent_item_checked' => 'An item was recently checked out under your name that requires acceptance, details are below.','notes' => 'Notes','password' => 'Password',diff --git a/resources/views/mail/markdown/bulk-asset-checkout-mail.blade.php b/resources/views/mail/markdown/bulk-asset-checkout-mail.blade.phpindex d1b9ce0f20..6023c2a9f6 100644--- a/resources/views/mail/markdown/bulk-asset-checkout-mail.blade.php+++ b/resources/views/mail/markdown/bulk-asset-checkout-mail.blade.php@@ -42,7 +42,7 @@| | || ------------- | ------------- |@foreach($assets as $asset)-| **Asset Tag** | <a href="{{ route('hardware.show', $asset->id) }}">{{ $asset->display_name }}</a><br><small>{{trans('mail.serial').': '.$asset->serial}}</small> |+| **{{ trans('general.asset_tag') }}** | <a href="{{ route('hardware.show', $asset->id) }}">{{ $asset->display_name }}</a><br><small>{{trans('mail.serial').': '.$asset->serial}}</small> |@if (isset($asset->model?->category))| **{{ trans('general.category') }}** | {{ $asset->model->category->name }} |@endif