split out email files

This commit is contained in:
Nabeel Shahzad 2018-05-21 11:25:51 -05:00
parent 9173558a0b
commit 072a7ffe12
8 changed files with 161 additions and 153 deletions

View File

@ -46,4 +46,8 @@ return [
'submit' => 'Submit',
'edit' => 'Edit',
'close' => 'Close',
'whoops' => 'Whoops',
'hello' => 'Hello',
'regards' => 'Regards',
'rightsreserved' => 'All Rights Reserved',
];

View File

@ -0,0 +1,10 @@
<?php
/**
*
*/
return [
'buttontroubles' =>
'If youre having trouble clicking the ":actiontext" button, ' .
'copy and paste the URL below into your web browser:',
];

View File

@ -6,14 +6,4 @@ return [
'nodownloads' => 'There are no downloads!',
],
'emails' => [
'whoops' => 'Whoops',
'hello' => 'Hello',
'regards' => 'Regards',
'buttontroubles' => [
'If youre having trouble clicking the ":actiontext" button,',
'copy and paste the URL below into your web browser:',
],
'allrightsreserved' => 'All Rights Reserved',
],
];

View File

@ -47,4 +47,8 @@ return [
'submit' => 'Invia',
'edit' => 'Modifica',
'close' => 'Chiudi',
'whoops' => 'Ops',
'hello' => 'Ciao',
'regards' => 'Saluti',
'rightsreserved' => 'Tutti i Diritti Riservati',
];

View File

@ -0,0 +1,10 @@
<?php
/**
*
*/
return [
'buttontroubles' =>
'Se hai problemi a cliccare il bottone ":actiontext", ' .
'copia e incolla l\'URL qui sotto nel tuo browser:',
];

View File

@ -1,21 +1,7 @@
<?php
return [
'emails' => [
'whoops' => 'Ops',
'hello' => 'Ciao',
'regards' => 'Saluti',
'buttontroubles' => [
'Se hai problemi a cliccare il bottone ":actiontext",',
'copia e incolla l\'URL qui sotto nel tuo browser:',
],
'allrightsreserved' => 'Tutti i Diritti Riservati',
],
'downloads' => [
'nodownloads' => 'Non ci sono downloads!',
],
];

View File

@ -3,7 +3,7 @@
if (! empty($greeting)) {
echo $greeting, "\n\n";
} else {
echo $level == 'error' ? trans('frontend.emails.whoops').'!' : trans('frontend.emails.hello').',', "\n\n";
echo $level == 'error' ? __('common.whoops').'!' : __('common.hello').',', "\n\n";
}
if (! empty($introLines)) {
@ -18,5 +18,5 @@ if (! empty($outroLines)) {
echo implode("\n", $outroLines), "\n\n";
}
echo trans('frontend.emails.regards).',', "\n";
echo __('common.regards).',', "\n";
echo config('app.name'), "\n";

View File

@ -70,7 +70,8 @@ $style = [
<!-- Logo -->
<tr>
<td style="{{ $style['email-masthead'] }}">
<a style="{{ $fontFamily }} {{ $style['email-masthead_name'] }}" href="{{ url('/') }}" target="_blank">
<a style="{{ $fontFamily }} {{ $style['email-masthead_name'] }}"
href="{{ url('/') }}" target="_blank">
{{ config('app.name') }}
</a>
</td>
@ -79,15 +80,16 @@ $style = [
<!-- Email Body -->
<tr>
<td style="{{ $style['email-body'] }}" width="100%">
<table style="{{ $style['email-body_inner'] }}" align="center" width="570" cellpadding="0" cellspacing="0">
<table style="{{ $style['email-body_inner'] }}" align="center" width="570"
cellpadding="0" cellspacing="0">
<tr>
<td style="{{ $fontFamily }} {{ $style['email-body_cell'] }}">
<!-- Greeting -->
<h1 style="{{ $style['header-1'] }}">
@if ($level == 'error')
@lang('frontend.emails.whoops')!
@if ($level === 'error')
@lang('common.whoops')!
@else
@lang('frontend.emails.hello'),
@lang('common.hello'),
@endif
</h1>
@ -100,7 +102,8 @@ $style = [
<!-- Action Button -->
@if (isset($actionText))
<table style="{{ $style['body_action'] }}" align="center" width="100%" cellpadding="0" cellspacing="0">
<table style="{{ $style['body_action'] }}" align="center"
width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<?php
@ -136,7 +139,8 @@ $style = [
<!-- Salutation -->
<p style="{{ $style['paragraph'] }}">
@lang('frontend.emails.regards'),<br>{{ config('app.name') }}
@lang('common.regards')
,<br>{{ config('app.name') }}
</p>
<!-- Sub Copy -->
@ -145,13 +149,11 @@ $style = [
<tr>
<td style="{{ $fontFamily }}">
<p style="{{ $style['paragraph-sub'] }}">
@foreach(trans('frontend.emails.buttontroubles' as $line)
{{ str_replace(':actiontext', $actionText, $line) }}
@endforeach
@lang('email.buttontroubles')
</p>
<p style="{{ $style['paragraph-sub'] }}">
<a style="{{ $style['anchor'] }}" href="{{ $actionUrl }}" target="_blank">
<a style="{{ $style['anchor'] }}"
href="{{ $actionUrl }}" target="_blank">
{{ $actionUrl }}
</a>
</p>
@ -168,13 +170,15 @@ $style = [
<!-- Footer -->
<tr>
<td>
<table style="{{ $style['email-footer'] }}" align="center" width="570" cellpadding="0" cellspacing="0">
<table style="{{ $style['email-footer'] }}" align="center" width="570"
cellpadding="0" cellspacing="0">
<tr>
<td style="{{ $fontFamily }} {{ $style['email-footer_cell'] }}">
<p style="{{ $style['paragraph-sub'] }}">
&copy; {{ date('Y') }}
<a style="{{ $style['anchor'] }}" href="{{ url('/') }}" target="_blank">{{ config('app.name') }}</a>.
@lang(frontend.emails.allrightsreserved')
<a style="{{ $style['anchor'] }}" href="{{ url('/') }}"
target="_blank">{{ config('app.name') }}</a>.
@lang('common.rightsreserved')
</p>
</td>
</tr>