A free open source IT asset/license management system
Translate emails (#2652)
Andrés Núñez40f00665b39b
diff --git a/app/Console/Commands/SendExpirationAlerts.php b/app/Console/Commands/SendExpirationAlerts.phpindex 5c9f14644f..d25a3cb799 100644--- a/app/Console/Commands/SendExpirationAlerts.php+++ b/app/Console/Commands/SendExpirationAlerts.php@@ -66,7 +66,7 @@ class SendExpirationAlerts extends Command$asset_data['email_content'] .= '<td><a href="'.config('app.url').'/hardware/'.e($asset->id).'/view">';$asset_data['email_content'] .= $asset->showAssetName().'</a></td><td>'.e($asset->asset_tag).'</td>';$asset_data['email_content'] .= '<td>'.e($asset->warrantee_expires()).'</td>';- $asset_data['email_content'] .= '<td>'.$difference.' days</td>';+ $asset_data['email_content'] .= '<td>'.$difference.' '.trans('mail.days').'</td>';$asset_data['email_content'] .= '<td>'.($asset->supplier ? e($asset->supplier->name) : '').'</td>';$asset_data['email_content'] .= '<td>'.($asset->assigneduser ? e($asset->assigneduser->fullName()) : '').'</td>';$asset_data['email_content'] .= '</tr>';@@ -104,7 +104,7 @@ class SendExpirationAlerts extends Command\Mail::send('emails.expiring-assets-report', $asset_data, function ($m) {$m->to(explode(',', Setting::getSettings()->alert_email), Setting::getSettings()->site_name);$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));- $m->subject('Expiring Assets Report');+ $m->subject(trans('mail.Expiring_Assets_Report'));});}@@ -114,7 +114,7 @@ class SendExpirationAlerts extends Command\Mail::send('emails.expiring-licenses-report', $license_data, function ($m) {$m->to(explode(',', Setting::getSettings()->alert_email), Setting::getSettings()->site_name);$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));- $m->subject('Expiring Licenses Report');+ $m->subject(trans('mail.Expiring_Licenses_Report'));});}diff --git a/app/Console/Commands/SendInventoryAlerts.php b/app/Console/Commands/SendInventoryAlerts.phpindex 346222c430..1822733b22 100644--- a/app/Console/Commands/SendInventoryAlerts.php+++ b/app/Console/Commands/SendInventoryAlerts.php@@ -51,7 +51,7 @@ class SendInventoryAlerts extends Command\Mail::send('emails.low-inventory', $data, function ($m) {$m->to(explode(',', Setting::getSettings()->alert_email), Setting::getSettings()->site_name);$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));- $m->subject('Low Inventory Report');+ $m->subject(trans('mail.Low_Inventory_Report'));});}diff --git a/app/Http/Controllers/AccessoriesController.php b/app/Http/Controllers/AccessoriesController.phpindex 9a594ccc4a..4cba6699a6 100755--- a/app/Http/Controllers/AccessoriesController.php+++ b/app/Http/Controllers/AccessoriesController.php@@ -366,7 +366,7 @@ class AccessoriesController extends ControllerMail::send('emails.accept-accessory', $data, function ($m) use ($user) {$m->to($user->email, $user->first_name . ' ' . $user->last_name);$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));- $m->subject('Confirm accessory delivery');+ $m->subject(trans('mail.Confirm_accessory_delivery'));});}@@ -485,7 +485,7 @@ class AccessoriesController extends ControllerMail::send('emails.checkin-asset', $data, function ($m) use ($user) {$m->to($user->email, $user->first_name . ' ' . $user->last_name);$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));- $m->subject('Confirm Accessory Checkin');+ $m->subject(trans('mail.Confirm_Accessory_Checkin'));});}diff --git a/app/Http/Controllers/AssetsController.php b/app/Http/Controllers/AssetsController.phpindex c8debd5a4e..5fd2c9e44d 100755--- a/app/Http/Controllers/AssetsController.php+++ b/app/Http/Controllers/AssetsController.php@@ -687,7 +687,7 @@ class AssetsController extends ControllerMail::send('emails.checkin-asset', $data, function ($m) use ($user) {$m->to($user->email, $user->first_name . ' ' . $user->last_name);$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));- $m->subject('Confirm Asset Checkin');+ $m->subject(trans('mail.Confirm_Asset_Checkin'));});}diff --git a/app/Http/Controllers/Auth/PasswordController.php b/app/Http/Controllers/Auth/PasswordController.phpindex 6f3636d0b5..e39a114cd7 100644--- a/app/Http/Controllers/Auth/PasswordController.php+++ b/app/Http/Controllers/Auth/PasswordController.php@@ -37,4 +37,13 @@ class PasswordController extends Controller{$this->middleware('guest');}++ /**+ * Get the e-mail subject line to be used for the reset link email.+ * Overriding method "getEmailSubject()" from trait "use ResetsPasswords"+ * @return string+ */+ public function getEmailSubject(){+ return property_exists($this, 'subject') ? $this->subject : \Lang::get('mail.reset_link');+ }}diff --git a/app/Http/Controllers/ConsumablesController.php b/app/Http/Controllers/ConsumablesController.phpindex b6d57282b4..3812004c00 100644--- a/app/Http/Controllers/ConsumablesController.php+++ b/app/Http/Controllers/ConsumablesController.php@@ -366,7 +366,7 @@ class ConsumablesController extends ControllerMail::send('emails.accept-asset', $data, function ($m) use ($user) {$m->to($user->email, $user->first_name . ' ' . $user->last_name);$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));- $m->subject('Confirm consumable delivery');+ $m->subject(trans('mail.Confirm_consumable_delivery'));});}diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.phpindex fc45eb8898..d3e8188225 100755--- a/app/Http/Controllers/SettingsController.php+++ b/app/Http/Controllers/SettingsController.php@@ -148,7 +148,7 @@ class SettingsController extends ControllerMail::send('emails.test', [], function ($m) {$m->to(config('mail.from.address'), config('mail.from.name'));$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));- $m->subject('Test Email from Snipe-IT');+ $m->subject(trans('mail.test_email'));});return 'success';} catch (Exception $e) {@@ -201,7 +201,7 @@ class SettingsController extends ControllerMail::send(['text' => 'emails.firstadmin'], $data, function ($m) use ($data) {$m->to($data['email'], $data['first_name']);$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));- $m->subject('Your Snipe-IT credentials');+ $m->subject(trans('mail.your_credentials'));});}diff --git a/app/Http/Controllers/UsersController.php b/app/Http/Controllers/UsersController.phpindex 34797d3fa2..ac6032cc72 100755--- a/app/Http/Controllers/UsersController.php+++ b/app/Http/Controllers/UsersController.php@@ -158,7 +158,7 @@ class UsersController extends ControllerMail::send('emails.send-login', $data, function ($m) use ($user) {$m->to($user->email, $user->first_name . ' ' . $user->last_name);$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));- $m->subject('Welcome ' . $user->first_name);+ $m->subject(trans('mail.welcome', ['name' => $user->first_name]));});}return redirect::route('users')->with('success', trans('admin/users/message.success.create'));@@ -211,7 +211,7 @@ class UsersController extends ControllerMail::send('emails.send-login', $data, function ($m) use ($user) {$m->to($user->email, $user->first_name . ' ' . $user->last_name);$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));- $m->subject('Welcome ' . $user->first_name);+ $m->subject(trans('mail.welcome', ['name' => $user->first_name]));});}@@ -835,7 +835,7 @@ class UsersController extends ControllerMail::send('emails.send-login', $data, function ($m) use ($newuser) {$m->to($newuser['email'], $newuser['first_name'] . ' ' . $newuser['last_name']);$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));- $m->subject('Welcome ' . $newuser['first_name']);+ $m->subject(trans('mail.welcome', ['name' => $newuser['first_name']]));});}}diff --git a/app/Http/Controllers/ViewAssetsController.php b/app/Http/Controllers/ViewAssetsController.phpindex c2d2c4cf6d..8447ec56ce 100755--- a/app/Http/Controllers/ViewAssetsController.php+++ b/app/Http/Controllers/ViewAssetsController.php@@ -127,7 +127,7 @@ class ViewAssetsController extends ControllerMail::send('emails.asset-canceled', $data, function ($m) use ($user, $settings) {$m->to(explode(',', $settings->alert_email), $settings->site_name);$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));- $m->subject('Item Request Canceled');+ $m->subject(trans('mail.Item_Request_Canceled'));});}@@ -161,7 +161,7 @@ class ViewAssetsController extends ControllerMail::send('emails.asset-requested', $data, function ($m) use ($user, $settings) {$m->to(explode(',', $settings->alert_email), $settings->site_name);$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));- $m->subject('Item Requested');+ $m->subject(trans('mail.Item_Requested'));});}@@ -225,7 +225,7 @@ class ViewAssetsController extends ControllerMail::send('emails.asset-requested', $data, function ($m) use ($user, $settings) {$m->to(explode(',', $settings->alert_email), $settings->site_name);$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));- $m->subject('Asset Requested');+ $m->subject(trans('mail.asset_requested'));});}diff --git a/app/Models/Asset.php b/app/Models/Asset.phpindex 6447abb2cc..5b11b71bd7 100644--- a/app/Models/Asset.php+++ b/app/Models/Asset.php@@ -153,7 +153,7 @@ class Asset extends Depreciable\Mail::send('emails.accept-asset', $data, function ($m) use ($user) {$m->to($user->email, $user->first_name . ' ' . $user->last_name);$m->replyTo(config('mail.reply_to.address'), config('mail.reply_to.name'));- $m->subject('Confirm asset delivery');+ $m->subject(trans('mail.Confirm_asset_delivery'));});}diff --git a/config/app.php b/config/app.phpold mode 100644new mode 100755diff --git a/config/database.php b/config/database.phpold mode 100644new mode 100755diff --git a/config/mail.php b/config/mail.phpold mode 100644new mode 100755diff --git a/resources/lang/en/mail.php b/resources/lang/en/mail.phpnew file mode 100644index 0000000000..c9a4fe182d--- /dev/null+++ b/resources/lang/en/mail.php@@ -0,0 +1,74 @@+<?php++return array(+ 'a_user_canceled' => 'A user has canceled an item request on the website',+ 'a_user_requested' => 'A user has requested an item on the website',+ 'accessory_name' => 'Accessory Name:',+ 'additional_notes' => 'Additional Notes:',+ 'admin_has_created' => 'An administrator has created an account for you on the :web website.',+ 'asset' => 'Asset:',+ 'asset_name' => 'Asset Name:',+ 'asset_requested' => 'Asset requested',+ 'asset_tag' => 'Asset Tag:',+ 'assets_warrantee_expiring' => '{1} asset with warrantee expiring in the next 60 days.|[2,Inf] assets with warrantees+ expiring in the next 60 days.',+ 'assigned_to' => 'Assigned To',+ 'best_regards' => 'Best regards,',+ 'canceled' => 'Canceled:',+ 'checkin_date' => 'Checkin Date:',+ 'checkout_date' => 'Checkout Date:',+ 'click_to_confirm' => 'Please click on the following link to confirm your :web account:',+ 'click_on_the_link_accessory' => 'Please click on the link at the bottom to confirm that you have received the accessory.',+ 'click_on_the_link_asset' => 'Please click on the link at the bottom to confirm that you have received the asset.',+ 'Confirm_Asset_Checkin' => 'Confirm Asset Checkin.',+ 'Confirm_Accessory_Checkin' => 'Confirm Accessory Checkin.',+ 'Confirm_accessory_delivery' => 'Confirm accessory delivery.',+ 'Confirm_asset_delivery' => 'Confirm asset delivery.',+ 'Confirm_consumable_delivery' => 'Confirm consumable delivery.',+ 'current_QTY' => 'Current QTY',+ 'Days' => 'Days',+ 'days' => 'Days',+ 'expecting_checkin_date' => 'Expected Checkin Date:',+ 'expires' => 'Expires',+ 'Expiring_Assets_Report' => 'Expiring Assets Report.',+ 'Expiring_Licenses_Report' => 'Expiring Licenses Report.',+ 'hello' => 'Hello',+ 'hi' => 'Hi',+ 'i_have_read' => 'I have read and agree to the terms of use, and have received this item.',+ 'item' => 'Item:',+ 'items_below_minimum' => '{1} item that is below minimum inventory or will soon be low.|[2,Inf] items that are below minimum+ inventory or will soon be low.',+ 'Item_Request_Canceled' => 'Item Request Canceled',+ 'Item_Requested' => 'Item Requested',+ 'licenses_expiring' => '{1} license expiring next 60 days.|[2,Inf] licenses expiring next 60 days.',+ 'link_to_update_password' => 'Please click on the following link to update your :web password:',+ 'login_first_admin' => 'Login to your new Snipe-IT installation using the credentials below:',+ 'login' => 'Login:',+ 'Low_Inventory_Report' => 'Low Inventory Report',+ 'min_QTY' => 'Min QTY',+ 'name' => 'Name',+ 'new_item_checked' => 'A new item has been checked out under your name, details are below.',+ 'password' => 'Password:',+ 'password_reset' => 'Password Reset',++ 'read_the_terms' => 'Please read the terms of use below.',+ 'read_the_terms_and_click' => 'Please read the terms of use below, and click on the link at the bottom to confirm that you read+ and agree to the terms of use, and have received the asset.',+ 'requested' => 'Requested:',+ 'reset_link' => 'Your Password Reset Link',+ 'reset_password' => 'Click here to reset your password:',+ 'serial' => 'Serial:',+ 'supplier' => 'Supplier',+ 'tag' => 'Tag',+ 'test_email' => 'Test Email from Snipe-IT',+ 'test_mail_text' => 'This is a test from the Snipe-IT Asset Management System. If you got this, mail is working :)',+ 'the_following_item' => 'The following item has been checked in: ',+ 'There_are' => '{1} There is|[2,Inf] There are',+ 'to_reset' => 'To reset your :web password, complete this form:',+ 'type' => 'Type',+ 'user' => 'User:',+ 'username' => 'Username:',+ 'welcome' => 'Welcome :name',+ 'welcome_to' => 'Welcome to :web!',+ 'your_credentials' => 'Your Snipe-IT credentials',+);diff --git a/resources/views/auth/emails/password.blade.php b/resources/views/auth/emails/password.blade.phpindex 1b53830a80..590806157d 100644--- a/resources/views/auth/emails/password.blade.php+++ b/resources/views/auth/emails/password.blade.php@@ -1 +1 @@-Click here to reset your password: <a href="{{ $link = url('password/reset', $token).'?email='.urlencode($user->getEmailForPasswordReset()) }}"> {{ $link }} </a>+{{ trans('mail.reset_password') }} <a href="{{ $link = url('password/reset', $token).'?email='.urlencode($user->getEmailForPasswordReset()) }}"> {{ $link }} </a>diff --git a/resources/views/emails/accept-accessory.blade.php b/resources/views/emails/accept-accessory.blade.phpindex bf5d486587..371909a5ee 100644--- a/resources/views/emails/accept-accessory.blade.php+++ b/resources/views/emails/accept-accessory.blade.php@@ -1,15 +1,15 @@@extends('emails/layouts/default')@section('content')-<p>Hello {{ $first_name }},</p>+<p>{{ trans('mail.hello') }} {{ $first_name }},</p>-<p>A new item has been checked out under your name, details are below.</p>+<p>{{ trans('mail.new_item_checked') }}</p><table><tr><td>- Accessory Name:+ {{ trans('mail.accessory_name') }}</td><td><strong>{{ $item_name }}</strong>@@ -17,7 +17,7 @@</tr><tr><td>- Checkout Date:+ {{ trans('mail.checkout_date') }}</td><td><strong>{{ $checkout_date }}</strong>@@ -26,7 +26,7 @@@if ($note)<tr><td>- Additional Notes:+ {{ trans('mail.additional_notes') }}</td><td><strong>{{ $note }}</strong>@@ -34,18 +34,18 @@</tr>@endif</table>-+<p>@if (($require_acceptance==1) && ($eula!=''))- Please read the terms of use below, and click on the link at the bottom to confirm that you read and agree to the terms of use, and have received the asset.+ {{ trans('mail.read_the_terms_and_click') }}@elseif (($require_acceptance==1) && ($eula==''))- Please click on the link at the bottom to confirm that you have received the accessory.+ {{ trans('mail.click_on_the_link_accessory') }}@elseif (($require_acceptance==0) && ($eula!=''))- Please read the terms of use below.+ {{ trans('mail.read_the_terms') }}@endif@@ -54,7 +54,7 @@<p><blockquote>{!! $eula !!}</blockquote></p>@if ($require_acceptance==1)-<p><strong><a href="{{ config('app.url') }}/account/accept-asset/{{ $log_id }}">I have read and agree to the terms of use, and have received this item.</a></strong></p>+<p><strong><a href="{{ config('app.url') }}/account/accept-asset/{{ $log_id }}">{{ trans('mail.i_have_read') }}</a></strong></p>@endif<p>{{ \App\Models\Setting::getSettings()->site_name }}</p>diff --git a/resources/views/emails/accept-asset.blade.php b/resources/views/emails/accept-asset.blade.phpindex 859f12a4da..a6b78b4da7 100755--- a/resources/views/emails/accept-asset.blade.php+++ b/resources/views/emails/accept-asset.blade.php@@ -1,15 +1,15 @@@extends('emails/layouts/default')@section('content')- <p>Hello {{ $first_name }},</p>+ <p>{{ trans('mail.hello') }} {{ $first_name }},</p>- <p>A new item has been checked out under your name, details are below.</p>+ <p>{{ trans('mail.new_item_checked') }}</p><table><tr><td>- Asset Name:+ {{ trans('mail.asset_name') }}</td><td><strong>{{ $item_name }}</strong>@@ -18,7 +18,7 @@@if (isset($item_tag))<tr><td>- Asset Tag:+ {{ trans('mail.asset_tag') }}</td><td><strong>{{ $item_tag }}</strong>@@ -28,7 +28,7 @@@if (isset($item_serial))<tr><td>- Serial:+ {{ trans('mail.serial') }}</td><td><strong>{{ $item_serial }}</strong>@@ -37,7 +37,7 @@@endif<tr><td>- Checkout Date:+ {{ trans('mail.checkout_date') }}</td><td><strong>{{ $checkout_date }}</strong>@@ -46,7 +46,7 @@@if (isset($expected_checkin))<tr><td>- Expected Checkin Date:+ {{ trans('mail.expecting_checkin_date') }}</td><td><strong>{{ $expected_checkin }}</strong>@@ -56,7 +56,7 @@@if (isset($note))<tr><td>- Additional Notes:+ {{ trans('mail.additional_notes') }}</td><td><strong>{{ $note }}</strong>@@ -64,27 +64,27 @@</tr>@endif</table>-+ <p>@if (($require_acceptance==1) && ($eula!=''))- Please read the terms of use below, and click on the link at the bottom to confirm that you read and agree to the terms of use, and have received the asset.+ {{ trans('mail.read_the_terms_and_click') }}@elseif (($require_acceptance==1) && ($eula==''))- Please click on the link at the bottom to confirm that you have received the asset.+ {{ trans('mail.click_on_the_link_asset') }}@elseif (($require_acceptance==0) && ($eula!=''))- Please read the terms of use below.+ {{ trans('mail.read_the_terms') }}- @endif+ @endif</p><p><blockquote>{!! $eula !!}</blockquote></p>@if ($require_acceptance==1)- <p><strong><a href="{{ config('app.url') }}/account/accept-asset/{{ $log_id }}">I have read and agree to the terms of use, and have received this item.</a></strong></p>+ <p><strong><a href="{{ config('app.url') }}/account/accept-asset/{{ $log_id }}">{{ trans('mail.i_have_read') }}</a></strong></p>@endif<p>{{ \App\Models\Setting::getSettings()->site_name }}</p>diff --git a/resources/views/emails/asset-canceled.blade.php b/resources/views/emails/asset-canceled.blade.phpindex fd1baf3b70..3cba49dd6e 100644--- a/resources/views/emails/asset-canceled.blade.php+++ b/resources/views/emails/asset-canceled.blade.php@@ -2,11 +2,11 @@@section('content')-<p>A user has canceled an item request on the <a href="{{ config('app.url') }}">{{ \App\Models\Setting::getSettings()->site_name }} website</a>. </p>+<p>{{ trans('mail.a_user_canceled') }} <a href="{{ config('app.url') }}"> {{ \App\Models\Setting::getSettings()->site_name }}</a>. </p>-<p>User: <a href="{{ config('app.url') }}/admin/users/{{ $user_id }}/view">{{ $requested_by }}</a><br>-Item: <a href="{{ $item_url }}">{{ $item_name }}</a> ({{ $item_type }}) <br>-Canceled: {{ $requested_date }}+<p>{{ trans('mail.user') }} <a href="{{ config('app.url') }}/admin/users/{{ $user_id }}/view">{{ $requested_by }}</a><br>+ {{ trans('mail.item') }} <a href="{{ $item_url }}">{{ $item_name }}</a> ({{ $item_type }}) <br>+ {{ trans('mail.canceled') }} {{ $requested_date }}</p>@stopdiff --git a/resources/views/emails/asset-requested.blade.php b/resources/views/emails/asset-requested.blade.phpindex 9b7d03a23c..5fd51b5ed6 100644--- a/resources/views/emails/asset-requested.blade.php+++ b/resources/views/emails/asset-requested.blade.php@@ -2,14 +2,13 @@@section('content')-<p>A user has requested an item on the <a href="{{ config('app.url') }}">{{ \App\Models\Setting::getSettings()->site_name }} website</a>. </p>+<p>{{ trans('mail.a_user_requested') }} <a href="{{ config('app.url') }}"> {{ \App\Models\Setting::getSettings()->site_name }}</a>. </p>-<p>User: <a href="{{ config('app.url') }}/admin/users/{{ $user_id }}/view">{{ $requested_by }}</a><br>-Item: <a href="{{ $item_url }}">{{ $item_name }}</a> ({{ $item_type }}) <br>-Requested: {{ $requested_date }}+<p>{{ trans('mail.user') }} <a href="{{ config('app.url') }}/admin/users/{{ $user_id }}/view">{{ $requested_by }}</a><br>+ {{ trans('mail.item') }} <a href="{{ $item_url }}">{{ $item_name }}</a> ({{ $item_type }}) <br>+ {{ trans('mail.requested') }} {{ $requested_date }}@if ($item_quantity > 1)-Quantity: {{ $item_quantity}}+{{ trans('mail.quantity') }} {{ $item_quantity}}@endif-</p>@stopdiff --git a/resources/views/emails/auth/reminder.blade.php b/resources/views/emails/auth/reminder.blade.phpindex 5f738e972b..4af4e44b5b 100755--- a/resources/views/emails/auth/reminder.blade.php+++ b/resources/views/emails/auth/reminder.blade.php@@ -4,10 +4,10 @@<meta charset="utf-8"></head><body>- <h2>Password Reset</h2>+ <h2>{{ trans('mail.password_reset') }}</h2><div>- To reset your {{ \App\Models\Setting::getSettings()->site_name }} password, complete this form: {{ URL::to('password/reset', array($token)) }}.+ {{ trans('mail.to_reset', ['web' => \App\Models\Setting::getSettings()->site_name]) }} {{ URL::to('password/reset', array($token)) }}.</div></body></html>diff --git a/resources/views/emails/checkin-asset.blade.php b/resources/views/emails/checkin-asset.blade.phpindex 6819a73f7c..c3b943daf2 100644--- a/resources/views/emails/checkin-asset.blade.php+++ b/resources/views/emails/checkin-asset.blade.php@@ -1,15 +1,15 @@@extends('emails/layouts/default')@section('content')-<p>Hello {{ $first_name }},</p>+<p>{{ trans('mail.hello') }} {{ $first_name }},</p>-<p>The following item has been checked in:+<p>{{ trans('mail.the_following_item') }}<table><tr><td style="background-color:#ccc">- Asset Name:+ {{ trans('mail.asset_name') }}</td><td><strong>{{ $item_name }}</strong>@@ -18,7 +18,7 @@@if ($item_tag)<tr><td style="background-color:#ccc">- Asset Tag:+ {{ trans('mail.asset_tag') }}</td><td><strong>{{ $item_tag }}</strong>@@ -27,7 +27,7 @@@endif<tr><td style="background-color:#ccc">- Checkin Date:+ {{ trans('mail.checkin_date') }}</td><td><strong>{{ $checkin_date }}</strong>@@ -36,7 +36,7 @@@if ($note)<tr><td style="background-color:#ccc">- Additional Notes:+ {{ trans('mail.additional_notes') }}</td><td><strong>{{ $note }}</strong>diff --git a/resources/views/emails/expiring-assets-report.blade.php b/resources/views/emails/expiring-assets-report.blade.phpindex 712c961251..cd331bd29b 100644--- a/resources/views/emails/expiring-assets-report.blade.php+++ b/resources/views/emails/expiring-assets-report.blade.php@@ -2,17 +2,16 @@@section('content')-<p>There are {{ $count }} asset(s) with warrantees expiring in the next 60 days.</p>-+ <p>{{ trans_choice('mail.There_are',$count) }} {{ $count }} {{ trans_choice('mail.assets_warrantee_expiring',$count) }}</p><table style="border: 1px solid black; padding: 5px;" width="100%" cellspacing="0" cellpadding="3"><tr>- <td><strong>Name</strong></td>- <td><strong>Tag</strong></td>- <td><strong>Expires</strong></td>- <td><strong>Days</strong></td>- <td><strong>Supplier</strong></td>- <td><strong>Assigned To</strong></td>+ <td><strong>{{ trans('mail.name') }}</strong></td>+ <td><strong>{{ trans('mail.tag') }}</strong></td>+ <td><strong>{{ trans('mail.expires') }}</strong></td>+ <td><strong>{{ trans('mail.Days') }}</strong></td>+ <td><strong>{{ trans('mail.supplier') }}</strong></td>+ <td><strong>{{ trans('mail.assigned_to') }}</strong></td></tr>{!! $email_content !!}diff --git a/resources/views/emails/expiring-licenses-report.blade.php b/resources/views/emails/expiring-licenses-report.blade.phpindex 0b4bace5db..7b8becd826 100755--- a/resources/views/emails/expiring-licenses-report.blade.php+++ b/resources/views/emails/expiring-licenses-report.blade.php@@ -2,14 +2,13 @@@section('content')-<p>There are {{ $count }} license(s) expiring next 60 days.</p>-+ <p>{{ trans_choice('mail.There_are',$count) }} {{ $count }} {{ trans_choice('mail.licenses_expiring',$count) }}</p><table style="border: 1px solid black; padding: 5px;" width="100%" cellspacing="0" cellpadding="3"><tr>- <td><strong>Name</strong></td>- <td><strong>Expires</strong></td>- <td><strong>Days</strong></td>+ <td><strong>{{ trans('mail.name') }}</strong></td>+ <td><strong>{{ trans('mail.expires') }}</strong></td>+ <td><strong>{{ trans('mail.Days') }}</strong></td></tr>{!! $email_content !!}diff --git a/resources/views/emails/firstadmin.blade.php b/resources/views/emails/firstadmin.blade.phpindex 70710e5036..16f610de28 100644--- a/resources/views/emails/firstadmin.blade.php+++ b/resources/views/emails/firstadmin.blade.php@@ -1,7 +1,7 @@-Hi {{ $first_name }},+{{ trans('mail.hi') }} {{ $first_name }},-Login to your new Snipe-IT installation using the credentials below:+{{ trans('mail.login_first_admin') }}URL: {{ config('app.url') }}-Username: {{ $username }}-Password: {{ $password }}+{{ trans('mail.username') }} {{ $username }}+{{ trans('mail.password') }} {{ $password }}diff --git a/resources/views/emails/forgot-password.blade.php b/resources/views/emails/forgot-password.blade.phpindex 42e193323d..d399424108 100755--- a/resources/views/emails/forgot-password.blade.php+++ b/resources/views/emails/forgot-password.blade.php@@ -1,13 +1,13 @@@extends('emails/layouts/default')@section('content')-<p>Hello {{ $user->first_name }},</p>+<p>{{ trans('mail.hello') }} {{ $user->first_name }},</p>-<p>Please click on the following link to update your {{ \App\Models\Setting::getSettings()->site_name }} password:</p>+<p>{{ trans('mail.link_to_update_password', ['web' => \App\Models\Setting::getSettings()->site_name]) }} </p><p><a href="{{ $forgotPasswordUrl }}">{{ $forgotPasswordUrl }}</a></p>-<p>Best regards,</p>+<p>{{ trans('mail.best_regards') }}</p><p>{{ \App\Models\Setting::getSettings()->site_name }}</p>@stopdiff --git a/resources/views/emails/low-inventory.blade.php b/resources/views/emails/low-inventory.blade.phpindex d775f546f1..7707c37cc3 100644--- a/resources/views/emails/low-inventory.blade.php+++ b/resources/views/emails/low-inventory.blade.php@@ -2,29 +2,30 @@@section('content')-<p>There are {{ $count }} items that are below minimum inventory or will soon be low.</p>---<table style="border: 1px solid black; padding: 5px;" width="100%" cellspacing="0" cellpadding="3">- <tr>- <td><strong>Name</strong></td>- <td><strong>Type</strong></td>- <td><strong>Current QTY</strong></td>- <td><strong>Min QTY</strong></td>- </tr>-- @for($i=0; $count > $i; $i++)- <tr>- <td><a href="{{ config('app.url') }}/admin/{{ $data[$i]['type'] }}/{{ $data[$i]['id'] }}/view">{{ $data[$i]['name'] }}</a></td>- <td>{{ $data[$i]['type'] }}</td>- <td>{{ $data[$i]['remaining'] }}</td>- <td>{{ $data[$i]['min_amt'] }}</td>- </tr>-- @endfor---</table>+ <p>{{ trans_choice('mail.There_are',$count) }} {{ $count }} {{ trans_choice('mail.items_below_minimum',$count) }}</p>++ <table style="border: 1px solid black; padding: 5px;" width="100%" cellspacing="0" cellpadding="3">+ <tr>+ <td><strong>{{ trans('mail.name') }}</strong></td>+ <td><strong>{{ trans('mail.type') }}</strong></td>+ <td><strong>{{ trans('mail.current_QTY') }}</strong></td>+ <td><strong>{{ trans('mail.min_QTY') }}</strong></td>+ </tr>++ @for($i=0; $count > $i; $i++)+ <tr>+ <td>+ <a href="{{ config('app.url') }}/admin/{{ $data[$i]['type'] }}/{{ $data[$i]['id'] }}/view">{{ $data[$i]['name'] }}</a>+ </td>+ <td>{{ $data[$i]['type'] }}</td>+ <td>{{ $data[$i]['remaining'] }}</td>+ <td>{{ $data[$i]['min_amt'] }}</td>+ </tr>++ @endfor+++ </table>@stopdiff --git a/resources/views/emails/register-activate.blade.php b/resources/views/emails/register-activate.blade.phpindex 1f5b32f1ca..dab10f6d1a 100755--- a/resources/views/emails/register-activate.blade.php+++ b/resources/views/emails/register-activate.blade.php@@ -1,13 +1,13 @@@extends('emails/layouts/default')@section('content')-<p>Hello {{ $user->first_name }},</p>+<p>{{ trans('mail.hello') }} {{ $user->first_name }},</p>-<p>Welcome to {{ \App\Models\Setting::getSettings()->site_name }}! Please click on the following link to confirm your {{ \App\Models\Setting::getSettings()->site_name }} account:</p>+<p>{{ trans('mail.welcome_to', ['web' => \App\Models\Setting::getSettings()->site_name]) }} {{ trans('mail.click_to_confirm', ['web' => \App\Models\Setting::getSettings()->site_name]) }}</p><p><a href="{{ $activationUrl }}">{{ $activationUrl }}</a></p>-<p>Best regards,</p>+<p>{{ trans('mail.best_regards') }}</p><p>{{ \App\Models\Setting::getSettings()->site_name }}</p>@stopdiff --git a/resources/views/emails/send-login.blade.php b/resources/views/emails/send-login.blade.phpindex 4e5c69e794..c4b925054a 100644--- a/resources/views/emails/send-login.blade.php+++ b/resources/views/emails/send-login.blade.php@@ -1,16 +1,16 @@@extends('emails/layouts/default')@section('content')-<p>Hello {{ $first_name }},</p>+<p>{{ trans('mail.hello') }} {{ $first_name }},</p>-<p>An administrator has created an account for you on the {{ \App\Models\Setting::getSettings()->site_name }} website. </p>+<p>{{ trans('mail.admin_has_created', ['web' => \App\Models\Setting::getSettings()->site_name]) }} </p><p>URL: <a href="{{ config('app.url') }}">{{ config('app.url') }}</a><br>-Login: {{ $username }} <br>-Password: {{ $password }}+{{ trans('mail.login') }} {{ $username }} <br>+{{ trans('mail.password') }} {{ $password }}</p>-<p>Best regards,</p>+<p>{{ trans('mail.best_regards') }}</p><p>{{ \App\Models\Setting::getSettings()->site_name }}</p>@stopdiff --git a/resources/views/emails/test.blade.php b/resources/views/emails/test.blade.phpindex ae2148252a..07ee94dfb1 100644--- a/resources/views/emails/test.blade.php+++ b/resources/views/emails/test.blade.php@@ -1 +1 @@-This is a test from the Snipe-IT Asset Management System. If you got this, mail is working :)+{{ trans('mail.test_mail_text') }}