Reformat error and auth translations

This commit is contained in:
Nabeel Shahzad
2018-05-18 14:42:47 -05:00
parent fb6fc118e3
commit 1a3065b1ca
5 changed files with 99 additions and 57 deletions

View File

@@ -0,0 +1,23 @@
<?php
/**
*
*/
return [
'401' => [
'title' => 'Unauthorized Access',
'message' =>
'Well, this is embarrassing, you are not authorized to access or perform this function. '.
'Click <a href=":link">here</a> to go back to the home page.',
],
'404' => [
'title' => 'Page Not Found',
'message' =>
'Well, this is embarrassing, the page you requested does not exist.'.
'Click <a href=":link">here</a> to go back to the home page.',
],
'503' => [
'title' => 'Internal Error',
'message' => 'An Error Occured',
],
];

View File

@@ -0,0 +1,23 @@
<?php
/**
*
*/
return [
'401' => [
'title' => 'Non Autorizzato',
'message' =>
'Beh, è imbarazzante, non sei autorizzato ad accedere o ad eseguire questa funzionalità. '.
'Clicca <a href=":link">qui</a> per tornare alla home page.',
],
'404' => [
'title' => 'Page Not Found',
'message' =>
'Beh, è imbarazzante, la pagina che hai richiesto non esiste.'.
'Clicca <a href=":link">qui</a> per tornare alla home page.',
],
'503' => [
'title' => 'Internal Error',
'message' => 'Torniamo subito.',
],
];

View File

@@ -1,13 +1,11 @@
@extends('app')
@section('title', __trans('frontend.errors.401title'))
@section('title', __('errors.401.title'))
@section('content')
<div class="container registered-page">
<h3>@lang('frontend.errors.401header')</h3>
<p>
@foreach(trans('frontend.errors.401message') as $line)
{!! str_replace(':link', config('app.url'), $line).'<br />' !!}
@endforeach
</p>
</div>
<div class="container registered-page">
<h3>@lang('errors.401.title')</h3>
<p>
{!! str_replace(':link', config('app.url'), __('errors.401.message')).'<br />' !!}
</p>
</div>
@endsection

View File

@@ -1,14 +1,12 @@
@extends('app')
@section('title', trans('frontend.errors.404title'))
@section('title', __('errors.404.title'))
@section('content')
<div class="container registered-page">
<h3>@lang('frontend.errors.404header')</h3>
<p>
@foreach(trans('frontend.errors.404message') as $line)
{!! str_replace(':link', config('app.url'), $line).'<br />' !!}
@endforeach
{{ $exception->getMessage() }}
</p>
</div>
<div class="container registered-page">
<h3>@lang('errors.404.title')</h3>
<p>
{!! str_replace(':link', config('app.url'), __('errors.404.message')).'<br />' !!}
{{ $exception->getMessage() }}
</p>
</div>
@endsection

View File

@@ -1,47 +1,47 @@
<!DOCTYPE html>
<html>
<head>
<title>@lang('frontend.errors.503message')</title>
<head>
<title>@lang('errors.503.title')</title>
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
<style>
html, body {
height: 100%;
}
<style>
html, body {
height: 100%;
}
body {
margin: 0;
padding: 0;
width: 100%;
color: #B0BEC5;
display: table;
font-weight: 100;
font-family: 'Lato', sans-serif;
}
body {
margin: 0;
padding: 0;
width: 100%;
color: #B0BEC5;
display: table;
font-weight: 100;
font-family: 'Lato', sans-serif;
}
.container {
text-align: center;
display: table-cell;
vertical-align: middle;
}
.container {
text-align: center;
display: table-cell;
vertical-align: middle;
}
.content {
text-align: center;
display: inline-block;
}
.content {
text-align: center;
display: inline-block;
}
.title {
font-size: 72px;
margin-bottom: 40px;
}
</style>
</head>
<body>
<div class="container">
<div class="content">
<div class="title">@lang('frontend.errors.503message')</div>
</div>
</div>
</body>
.title {
font-size: 72px;
margin-bottom: 40px;
}
</style>
</head>
<body>
<div class="container">
<div class="content">
<div class="title">@lang('errors.503.message')</div>
</div>
</div>
</body>
</html>