From 6fc769a4d5e4ebfbf8ffb5dd6b3d0bb59c780b18 Mon Sep 17 00:00:00 2001 From: dihedral Date: Wed, 10 Mar 2021 12:24:22 +0100 Subject: [PATCH 1/4] move salutation in blade templates from @lang to trans() --- resources/lang/de-DE/notifications.php | 3 +++ resources/lang/en/notifications.php | 3 +++ resources/views/notifications/component/update.blade.php | 2 +- resources/views/notifications/incident/new.blade.php | 2 +- resources/views/notifications/incident/update.blade.php | 2 +- resources/views/notifications/schedule/new.blade.php | 2 +- resources/views/vendor/notifications/email.blade.php | 2 +- 7 files changed, 11 insertions(+), 5 deletions(-) diff --git a/resources/lang/de-DE/notifications.php b/resources/lang/de-DE/notifications.php index 62870211e549..6df497a20113 100644 --- a/resources/lang/de-DE/notifications.php +++ b/resources/lang/de-DE/notifications.php @@ -10,6 +10,9 @@ */ return [ + 'common' => [ + 'salutation' => 'Viele Grüße,', + ], 'component' => [ 'status_update' => [ 'mail' => [ diff --git a/resources/lang/en/notifications.php b/resources/lang/en/notifications.php index 4d98ec751ca6..18567da5e6e3 100644 --- a/resources/lang/en/notifications.php +++ b/resources/lang/en/notifications.php @@ -10,6 +10,9 @@ */ return [ + 'common' => [ + 'salutation' => 'Thanks,', + ], 'component' => [ 'status_update' => [ 'mail' => [ diff --git a/resources/views/notifications/component/update.blade.php b/resources/views/notifications/component/update.blade.php index a5515ae09c7b..3f72484c15cc 100644 --- a/resources/views/notifications/component/update.blade.php +++ b/resources/views/notifications/component/update.blade.php @@ -3,7 +3,7 @@ {{ $content }} -@lang('Thanks,')
+{{ trans('notifications.common.salutation') }}
{{ Config::get('setting.app_name') }} @include('notifications.partials.subscription') diff --git a/resources/views/notifications/incident/new.blade.php b/resources/views/notifications/incident/new.blade.php index 7dbcad641375..d8b696774dd6 100644 --- a/resources/views/notifications/incident/new.blade.php +++ b/resources/views/notifications/incident/new.blade.php @@ -7,7 +7,7 @@ {{ $actionText }} @endcomponent -@lang('Thanks,')
+{{ trans('notifications.common.salutation') }}
{{ Config::get('setting.app_name') }} @include('notifications.partials.subscription') diff --git a/resources/views/notifications/incident/update.blade.php b/resources/views/notifications/incident/update.blade.php index 12c9b63bf44b..8978cfa2a460 100644 --- a/resources/views/notifications/incident/update.blade.php +++ b/resources/views/notifications/incident/update.blade.php @@ -7,7 +7,7 @@ {{ $actionText }} @endcomponent -@lang('Thanks,')
+{{ trans('notifications.common.salutation') }}
{{ Config::get('setting.app_name') }} @include('notifications.partials.subscription') diff --git a/resources/views/notifications/schedule/new.blade.php b/resources/views/notifications/schedule/new.blade.php index 7a5872de1794..912110bd125c 100644 --- a/resources/views/notifications/schedule/new.blade.php +++ b/resources/views/notifications/schedule/new.blade.php @@ -3,7 +3,7 @@ {{ $content }} -@lang('Thanks,')
+{{ trans('notifications.common.salutation') }}
{{ Config::get('setting.app_name') }} @include('notifications.partials.subscription') diff --git a/resources/views/vendor/notifications/email.blade.php b/resources/views/vendor/notifications/email.blade.php index 20b385e9954f..46e920b779d7 100644 --- a/resources/views/vendor/notifications/email.blade.php +++ b/resources/views/vendor/notifications/email.blade.php @@ -43,7 +43,7 @@ @if (! empty($salutation)) {{ $salutation }} @else -@lang('Regards'),
{{ setting('app_name', config('app.name')) }} +{{ trans('notifications.common.salutation') }}
{{ setting('app_name', config('app.name')) }} @endif {!! Config::get('setting.mail_signature') !!} From 3adae2fad22d73b175aae5aad65a5f610f3e0488 Mon Sep 17 00:00:00 2001 From: dihedral Date: Wed, 10 Mar 2021 12:26:41 +0100 Subject: [PATCH 2/4] move email footer text for alternative link in blade templates from @lang to trans() --- resources/lang/de-DE/notifications.php | 3 ++- resources/lang/en/notifications.php | 3 ++- resources/views/vendor/notifications/email.blade.php | 8 ++------ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/resources/lang/de-DE/notifications.php b/resources/lang/de-DE/notifications.php index 6df497a20113..16c5393f55e6 100644 --- a/resources/lang/de-DE/notifications.php +++ b/resources/lang/de-DE/notifications.php @@ -11,7 +11,8 @@ return [ 'common' => [ - 'salutation' => 'Viele Grüße,', + 'salutation' => 'Viele Grüße,', + 'alternative_link' => 'Sollten Sie Probleme mit der ":actionText" Schaltfläche haben, können Sie auch die folgende URL in Ihren Browser kopieren: :actionURL', ], 'component' => [ 'status_update' => [ diff --git a/resources/lang/en/notifications.php b/resources/lang/en/notifications.php index 18567da5e6e3..9f0470654cba 100644 --- a/resources/lang/en/notifications.php +++ b/resources/lang/en/notifications.php @@ -11,7 +11,8 @@ return [ 'common' => [ - 'salutation' => 'Thanks,', + 'salutation' => 'Thanks,', + 'alternative_link' => 'If you\'re having trouble clicking the ":actionText" button, copy and paste the URL below into your web browser: :actionURL', ], 'component' => [ 'status_update' => [ diff --git a/resources/views/vendor/notifications/email.blade.php b/resources/views/vendor/notifications/email.blade.php index 46e920b779d7..86965017f2cc 100644 --- a/resources/views/vendor/notifications/email.blade.php +++ b/resources/views/vendor/notifications/email.blade.php @@ -51,14 +51,10 @@ {{-- Subcopy --}} @isset($actionText) @component('mail::subcopy') -@lang( - "If you’re having trouble clicking the \":actionText\" button, copy and paste the URL below\n". - 'into your web browser: [:actionURL](:actionURL)', - [ +{{ trans('notifications.common.alternative_link', [ 'actionText' => $actionText, 'actionURL' => $actionUrl, - ] -) + ]) }} @endcomponent @endisset @endcomponent From bc453c718c5bdf4d8ece7dabbb14f2713a72e1ac Mon Sep 17 00:00:00 2001 From: dihedral Date: Wed, 10 Mar 2021 12:31:52 +0100 Subject: [PATCH 3/4] move email copyright notice in blade templates from @lang to trans() --- resources/lang/de-DE/notifications.php | 1 + resources/lang/en/notifications.php | 1 + resources/views/vendor/mail/html/message.blade.php | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/lang/de-DE/notifications.php b/resources/lang/de-DE/notifications.php index 16c5393f55e6..28abc8e5fd33 100644 --- a/resources/lang/de-DE/notifications.php +++ b/resources/lang/de-DE/notifications.php @@ -13,6 +13,7 @@ 'common' => [ 'salutation' => 'Viele Grüße,', 'alternative_link' => 'Sollten Sie Probleme mit der ":actionText" Schaltfläche haben, können Sie auch die folgende URL in Ihren Browser kopieren: :actionURL', + 'copyright_notice' => 'Alle Rechte vorbehalten.', ], 'component' => [ 'status_update' => [ diff --git a/resources/lang/en/notifications.php b/resources/lang/en/notifications.php index 9f0470654cba..efd9e0e58b3a 100644 --- a/resources/lang/en/notifications.php +++ b/resources/lang/en/notifications.php @@ -13,6 +13,7 @@ 'common' => [ 'salutation' => 'Thanks,', 'alternative_link' => 'If you\'re having trouble clicking the ":actionText" button, copy and paste the URL below into your web browser: :actionURL', + 'copyright_notice' => 'All rights reserved.', ], 'component' => [ 'status_update' => [ diff --git a/resources/views/vendor/mail/html/message.blade.php b/resources/views/vendor/mail/html/message.blade.php index 5d10c04162e8..8b0546b7c8eb 100644 --- a/resources/views/vendor/mail/html/message.blade.php +++ b/resources/views/vendor/mail/html/message.blade.php @@ -21,7 +21,7 @@ {{-- Footer --}} @slot('footer') @component('mail::footer') - © {{ date('Y') }} {{ setting('app_name', config('app.name')) }}. @lang('All rights reserved.') + © {{ date('Y') }} {{ setting('app_name', config('app.name')) }}. {{ trans('notifications.common.copyright_notice') }} @endcomponent @endslot @endcomponent From ba6f837ec323007973faa552ab096bd07796af5c Mon Sep 17 00:00:00 2001 From: dihedral Date: Wed, 10 Mar 2021 12:33:07 +0100 Subject: [PATCH 4/4] move email copyright notice in blade templates from @lang to trans() --- resources/views/vendor/mail/markdown/message.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/vendor/mail/markdown/message.blade.php b/resources/views/vendor/mail/markdown/message.blade.php index 5d10c04162e8..8b0546b7c8eb 100644 --- a/resources/views/vendor/mail/markdown/message.blade.php +++ b/resources/views/vendor/mail/markdown/message.blade.php @@ -21,7 +21,7 @@ {{-- Footer --}} @slot('footer') @component('mail::footer') - © {{ date('Y') }} {{ setting('app_name', config('app.name')) }}. @lang('All rights reserved.') + © {{ date('Y') }} {{ setting('app_name', config('app.name')) }}. {{ trans('notifications.common.copyright_notice') }} @endcomponent @endslot @endcomponent