From 81c148fc4d45d33e254f8e435f305e2063a07a43 Mon Sep 17 00:00:00 2001 From: lordwilbur Date: Fri, 18 May 2018 16:02:49 +0200 Subject: [PATCH] More translations --- resources/lang/en/frontend.php | 27 +++++++++++++++++++ resources/lang/it/frontend.php | 27 +++++++++++++++++++ .../layouts/default/errors/401.blade.php | 9 ++++--- .../layouts/default/errors/404.blade.php | 9 ++++--- .../layouts/default/errors/503.blade.php | 4 +-- .../notifications/email-plain.blade.php | 4 +-- .../default/notifications/email.blade.php | 13 ++++----- 7 files changed, 75 insertions(+), 18 deletions(-) diff --git a/resources/lang/en/frontend.php b/resources/lang/en/frontend.php index 90dde23f..da71fb10 100644 --- a/resources/lang/en/frontend.php +++ b/resources/lang/en/frontend.php @@ -87,6 +87,33 @@ return [ 'nodownloads' => 'There are no downloads!', ], + 'emails' => [ + 'whoops' => 'Whoops', + 'hello' => 'Hello', + 'regards' => 'Regards', + 'buttontroubles' => [ + 'If you’re having trouble clicking the ":actiontext" button,', + 'copy and paste the URL below into your web browser:', + ], + 'allrightsreserved' => 'All Rights Reserved', + ], + + 'errors' => [ + '401title' => 'Not Authorized', + '401header' => 'Unauthorized Access', + '401message' => [ + 'Well, this is embarrassing, you are not authorized to access or perform this function.', + 'Click here to go back to the home page.', + ], + '404title' => 'Not Found', + '404header' => 'Page Not Found', + '404message' => [ + 'Well, this is embarrassing, the page you requested does not exist.', + 'Click here to go back to the home page.', + ], + '503message' => 'Be right back.', + ], + 'flights' => [ 'mybid' => 'My Bid|My Bids', 'search' => 'Search', diff --git a/resources/lang/it/frontend.php b/resources/lang/it/frontend.php index b56de95e..b0b77d11 100644 --- a/resources/lang/it/frontend.php +++ b/resources/lang/it/frontend.php @@ -83,6 +83,33 @@ return [ 'recentreports' => 'Rapporti Recenti', ], + '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', + ], + + 'errors' => [ + '401title' => 'Non Autorizzato', + '401header' => 'Accesso Non Autorizzato', + '401message' => [ + 'Beh, è imbarazzante, non sei autorizzato ad accedere o ad eseguire questa funzionalità.', + 'Clicca qui per tornare alla home page.', + ], + '404title' => 'Not Found', + '404header' => 'Page Not Found', + '404message' => [ + 'Beh, è imbarazzante, la pagina che hai richiesto non esiste.', + 'Clicca qui per tornare alla home page.', + ], + '503message' => 'Torniamo subito.', + ], + 'downloads' => [ 'nodownloads' => 'Non ci sono downloads!', ], diff --git a/resources/views/layouts/default/errors/401.blade.php b/resources/views/layouts/default/errors/401.blade.php index 4a42d710..6f4ff546 100644 --- a/resources/views/layouts/default/errors/401.blade.php +++ b/resources/views/layouts/default/errors/401.blade.php @@ -1,12 +1,13 @@ @extends('app') -@section('title', 'not authorized') +@section('title', __trans('frontend.errors.401title')) @section('content')
-

Unauthorized

+

@lang('frontend.errors.401header')

- Well, this is embarrassing, you are not authorized to access or perform this function. - Click here to go back to the home page. + @foreach(trans('frontend.errors.401message') as $line) + {!! str_replace(':link', config('app.url'), $line).'
' !!} + @endforeach

@endsection diff --git a/resources/views/layouts/default/errors/404.blade.php b/resources/views/layouts/default/errors/404.blade.php index 3ccf1fba..c2476fa4 100644 --- a/resources/views/layouts/default/errors/404.blade.php +++ b/resources/views/layouts/default/errors/404.blade.php @@ -1,12 +1,13 @@ @extends('app') -@section('title', 'not found') +@section('title', trans('frontend.errors.404title')) @section('content')
-

Page Not Found

+

@lang('frontend.errors.404header')

- Well, this is embarrassing, the page you requested does not exist. - Click here to go back to the home page. + @foreach(trans('frontend.errors.404message') as $line) + {!! str_replace(':link', config('app.url'), $line).'
' !!} + @endforeach {{ $exception->getMessage() }}

diff --git a/resources/views/layouts/default/errors/503.blade.php b/resources/views/layouts/default/errors/503.blade.php index eb76d26b..6464226e 100755 --- a/resources/views/layouts/default/errors/503.blade.php +++ b/resources/views/layouts/default/errors/503.blade.php @@ -1,7 +1,7 @@ - Be right back. + @lang('frontend.errors.503message') @@ -40,7 +40,7 @@
-
Be right back.
+
@lang('frontend.errors.503message')
diff --git a/resources/views/layouts/default/notifications/email-plain.blade.php b/resources/views/layouts/default/notifications/email-plain.blade.php index acefa652..f3df0403 100644 --- a/resources/views/layouts/default/notifications/email-plain.blade.php +++ b/resources/views/layouts/default/notifications/email-plain.blade.php @@ -3,7 +3,7 @@ if (! empty($greeting)) { echo $greeting, "\n\n"; } else { - echo $level == 'error' ? 'Whoops!' : 'Hello!', "\n\n"; + echo $level == 'error' ? trans('frontend.emails.whoops').'!' : trans('frontend.emails.hello').',', "\n\n"; } if (! empty($introLines)) { @@ -18,5 +18,5 @@ if (! empty($outroLines)) { echo implode("\n", $outroLines), "\n\n"; } -echo 'Regards,', "\n"; +echo trans('frontend.emails.regards).',', "\n"; echo config('app.name'), "\n"; diff --git a/resources/views/layouts/default/notifications/email.blade.php b/resources/views/layouts/default/notifications/email.blade.php index 65397fbb..8a19016d 100644 --- a/resources/views/layouts/default/notifications/email.blade.php +++ b/resources/views/layouts/default/notifications/email.blade.php @@ -85,9 +85,9 @@ $style = [

@if ($level == 'error') - Whoops! + @lang('frontend.emails.whoops')! @else - Hello! + @lang('frontend.emails.hello'), @endif

@@ -136,7 +136,7 @@ $style = [

- Regards,
{{ config('app.name') }} + @lang('frontend.emails.regards'),
{{ config('app.name') }}

@@ -145,8 +145,9 @@ $style = [

- If you’re having trouble clicking the "{{ $actionText }}" button, - copy and paste the URL below into your web browser: + @foreach(trans('frontend.emails.buttontroubles' as $line) + {{ str_replace(':actiontext', $actionText, $line) }} + @endforeach

@@ -173,7 +174,7 @@ $style = [

© {{ date('Y') }} {{ config('app.name') }}. - All rights reserved. + @lang(frontend.emails.allrightsreserved')