From 0b4a5b7c5732fc213143ff30835ed29df3e21893 Mon Sep 17 00:00:00 2001 From: Matthias Niess Date: Wed, 25 Apr 2018 20:21:05 +0200 Subject: [PATCH] [5.6] i18n of the default notification email view (#23903) * i18n of the default notification email view This uses json translations through the blade directive to allow easy translations of mail notifications. * fix whitespace problems --- .../resources/views/email.blade.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Illuminate/Notifications/resources/views/email.blade.php b/src/Illuminate/Notifications/resources/views/email.blade.php index abfaa88e3630..fe38895320d1 100644 --- a/src/Illuminate/Notifications/resources/views/email.blade.php +++ b/src/Illuminate/Notifications/resources/views/email.blade.php @@ -4,9 +4,9 @@ # {{ $greeting }} @else @if ($level == 'error') -# Whoops! +# @lang('Whoops!') @else -# Hello! +# @lang('Hello!') @endif @endif @@ -45,14 +45,20 @@ @if (! empty($salutation)) {{ $salutation }} @else -Regards,
{{ config('app.name') }} +@lang('Regards'),
{{ config('app.name') }} @endif {{-- Subcopy --}} @isset($actionText) @component('mail::subcopy') -If you’re having trouble clicking the "{{ $actionText }}" button, copy and paste the URL below -into your web browser: [{{ $actionUrl }}]({{ $actionUrl }}) +@lang( + "If you’re having trouble clicking the \":actionText\" button, copy and paste the URL below\n". + 'into your web browser: [:actionURL](:actionURL)', + [ + 'actionText' => $actionText, + 'actionURL' => $actionUrl + ] +) @endcomponent @endisset @endcomponent