frontend translation + other stuff

This commit is contained in:
lordwilbur
2018-05-21 09:54:18 -05:00
committed by Nabeel Shahzad
parent ba8a819c7d
commit a346b0df2e
54 changed files with 966 additions and 771 deletions
@@ -1,10 +1,10 @@
@extends('app')
@section('title', __('File Flight Report'))
@section('title', trans('frontend.pireps.fileflightreport'))
@section('content')
<div class="row">
<div class="col-md-12">
<h2>{{ __('New Flight Report') }}</h2>
<h2>@lang('frontend.pireps.newflightreport')</h2>
@include('flash::message')
{{ Form::open(['route' => 'frontend.pireps.store']) }}
@@ -1,9 +1,9 @@
@extends('app')
@section('title', __('Edit Flight Report'))
@section('title', trans('frontend.pireps.editflightreport'))
@section('content')
<div class="row">
<div class="col-md-12">
<h2>{{ __('Edit Flight Report') }}</h2>
<h2>@lang('frontend.pireps.editflightreport')</h2>
@include('flash::message')
{{ Form::model($pirep, [
'route' => ['frontend.pireps.update', $pirep->id],
@@ -1,7 +1,7 @@
@if($aircraft)
<div class="form-container">
<h6><i class="fas fa-ellipsis-h"></i>
&nbsp;{{ __('Fare', 2) }}
&nbsp;{{ trans_coice('frontend.pireps.fare', 2) }}
</h6>
<div class="form-container-body">
@foreach($aircraft->subfleet->fares as $fare)
@@ -12,7 +12,7 @@ flight reports that have been filed. You've been warned!
<div class="row">
<div class="col-sm-12">
@component('components.info')
{{ __('Once a PIREP has been accepted/rejected, certain fields go into read-only mode.') }}
@lang('frontend.pireps.fieldsreadonly')
@endcomponent
</div>
</div>
@@ -21,12 +21,12 @@ flight reports that have been filed. You've been warned!
<div class="col-8">
<div class="form-container">
<h6><i class="fas fa-info-circle"></i>
&nbsp;{{ __('Flight Informations') }}
&nbsp;@lang('frontend.pireps.flightinformations')
</h6>
<div class="form-container-body">
<div class="row">
<div class="col-sm-4">
{{ Form::label('airline_id', __('Airline')) }}
{{ Form::label('airline_id', trans('frontend.global.airline')) }}
@if(!empty($pirep) && $pirep->read_only)
<p>{{ $pirep->airline->name }}</p>
{{ Form::hidden('airline_id') }}
@@ -42,7 +42,7 @@ flight reports that have been filed. You've been warned!
@endif
</div>
<div class="col-sm-4">
{{ Form::label('flight_number', __('Flight Number/Code/Leg')) }}
{{ Form::label('flight_number', trans('frontend.pireps.flightident')) }}
@if(!empty($pirep) && $pirep->read_only)
<p>{{ $pirep->ident }}
{{ Form::hidden('flight_number') }}
@@ -52,19 +52,19 @@ flight reports that have been filed. You've been warned!
@else
<div class="input-group input-group-sm mb3">
{{ Form::text('flight_number', null, [
'placeholder' => __('Flight Number'),
'placeholder' => trans('frontend.global.flightnumber'),
'class' => 'form-control',
'readonly' => (!empty($pirep) && $pirep->read_only),
]) }}
&nbsp;
{{ Form::text('route_code', null, [
'placeholder' => __('Code (optional)'),
'placeholder' => trans('frontend.pireps.codeoptional'),
'class' => 'form-control',
'readonly' => (!empty($pirep) && $pirep->read_only),
]) }}
&nbsp;
{{ Form::text('route_leg', null, [
'placeholder' => __('Leg (optional)'),
'placeholder' => trans('frontend.pireps.legoptional'),
'class' => 'form-control',
'readonly' => (!empty($pirep) && $pirep->read_only),
]) }}
@@ -75,7 +75,7 @@ flight reports that have been filed. You've been warned!
@endif
</div>
<div class="col-lg-4">
{{ Form::label('flight_type', __('Flight Type')) }}
{{ Form::label('flight_type', trans('frontend.pireps.flighttype')) }}
@if(!empty($pirep) && $pirep->read_only)
<p>{{ \App\Models\Enums\FlightType::label($pirep->flight_type) }}</p>
{{ Form::hidden('flight_type') }}
@@ -96,10 +96,10 @@ flight reports that have been filed. You've been warned!
<div class="row">
<div class="col-3">
{{ Form::label('hours', __('Flight Time')) }}
{{ Form::label('hours', trans('frontend.global.flighttime')) }}
@if(!empty($pirep) && $pirep->read_only)
<p>
{{ $pirep->hours.' '.__trans_choice('Hour', $pirep->hours) }}, {{ $pirep->minutes.' '.__trans_choice('Minute', $pirep->minutes) }}
{{ $pirep->hours.' '.trans_choice('frontend.global.hour', $pirep->hours) }}, {{ $pirep->minutes.' '.trans_choice('frontend.global.minute', $pirep->minutes) }}
{{ Form::hidden('hours') }}
{{ Form::hidden('minutes') }}
</p>
@@ -107,14 +107,14 @@ flight reports that have been filed. You've been warned!
<div class="input-group input-group-sm" style="max-width: 200px;">
{{ Form::number('hours', null, [
'class' => 'form-control',
'placeholder' => __trans_choice('Hour', 2),
'placeholder' => trans_choice('frontend.global.hour', 2),
'min' => '0',
'readonly' => (!empty($pirep) && $pirep->read_only),
]) }}
{{ Form::number('minutes', null, [
'class' => 'form-control',
'placeholder' => __trans_choice('Minute', 2),
'placeholder' => trans_choice('frontend.global.minute', 2),
'min' => 0,
'readonly' => (!empty($pirep) && $pirep->read_only),
]) }}
@@ -126,27 +126,27 @@ flight reports that have been filed. You've been warned!
<div class="col-3">
{{--{{ Form::label('submitted_date', __('Date Flown')) }}
{{--{{ Form::label('submitted_date', trans('frontend.pireps.dateflown')) }}
{{ Form::text('submmitted_date', null, [
'placeholder' => __('Departure Date'),
'placeholder' => trans('frontend.pireps.departuredate'),
'class' => 'form-control',
'readonly' => $pirep->read_only]) }}--}}
</div>
<div class="col-3">
{{--{{ Form::label('departure_time', __('Departure Time')) }}
{{--{{ Form::label('departure_time', trans('frontend.pireps.departuretime')) }}
{{ Form::text('departure_time', null, [
'placeholder' => __('Departure TIme'),
'placeholder' => trans('frontend.pireps.departuretime'),
'class' => 'form-control',
'readonly' => $pirep->read_only]) }}--}}
</div>
<div class="col-3">
{{--{{ Form::label('arrival_time', __('Arrival Time')) }}
{{--{{ Form::label('arrival_time', trans('frontend.pireps.arrivaltime')) }}
{{ Form::text('arrival_time', null, [
'placeholder' => __('Arrival TIme'),
'placeholder' => trans('frontend.pireps.arrivaltime'),
'class' => 'form-control',
'readonly' => $pirep->read_only]) }}--}}
</div>
@@ -158,12 +158,12 @@ flight reports that have been filed. You've been warned!
<div class="form-container">
<h6><i class="fas fa-globe"></i>
&nbsp;{{ __('Departure/Arrival Informations') }}
&nbsp;@lang('frontend.pireps.deparrinformations')
</h6>
<div class="form-container-body">
<div class="row">
<div class="col-6">
{{ Form::label('dpt_airport_id', __('Departure Airport')) }}
{{ Form::label('dpt_airport_id', trans('frontend.global.departureairport')) }}
@if(!empty($pirep) && $pirep->read_only)
{{ $pirep->dpt_airport->name }}
(<a href="{{route('frontend.airports.show', [
@@ -183,7 +183,7 @@ flight reports that have been filed. You've been warned!
</div>
<div class="col-6">
{{ Form::label('arr_airport_id', __('Arrival Airport')) }}
{{ Form::label('arr_airport_id', trans('frontend.global.arrivalairport')) }}
@if(!empty($pirep) && $pirep->read_only)
{{ $pirep->arr_airport->name }}
(<a href="{{route('frontend.airports.show', [
@@ -207,12 +207,12 @@ flight reports that have been filed. You've been warned!
<div class="form-container">
<h6><i class="fab fa-avianex"></i>
&nbsp;{{ __('Aircraft Informations') }}
&nbsp;@lang('frontend.pireps.aircraftinformations')
</h6>
<div class="form-container-body">
<div class="row">
<div class="col">
{{ Form::label('aircraft_id', __('Aircraft')) }}
{{ Form::label('aircraft_id', trans('frontend.global.aircraft')) }}
@if(!empty($pirep) && $pirep->read_only)
<p>{{ $pirep->aircraft->name }}</p>
{{ Form::hidden('aircraft_id') }}
@@ -234,13 +234,13 @@ flight reports that have been filed. You've been warned!
<div class="form-container">
<h6><i class="far fa-comments"></i>
&nbsp;{{ __('Route') }}
&nbsp;@lang('frontend.global.route')
</h6>
<div class="form-container-body">
<div class="row">
<div class="col">
<div class="input-group input-group-sm form-group">
{{ Form::textarea('route', null, ['class' => 'form-control', 'placeholder' => __('Route')]) }}
{{ Form::textarea('route', null, ['class' => 'form-control', 'placeholder' => trans('frontend.global.route')]) }}
<p class="text-danger">{{ $errors->first('route') }}</p>
</div>
</div>
@@ -250,13 +250,13 @@ flight reports that have been filed. You've been warned!
<div class="form-container">
<h6><i class="far fa-comments"></i>
&nbsp;{{ __('Remarks') }}
&nbsp;{{ trans_choice('frontend.global.remark', 2) }}
</h6>
<div class="form-container-body">
<div class="row">
<div class="col">
<div class="input-group input-group-sm form-group">
{{ Form::textarea('notes', null, ['class' => 'form-control', 'placeholder' => __('Notes')]) }}
{{ Form::textarea('notes', null, ['class' => 'form-control', 'placeholder' => trans_choice('frontend.global.note', 2)]) }}
<p class="text-danger">{{ $errors->first('notes') }}</p>
</div>
</div>
@@ -269,7 +269,7 @@ flight reports that have been filed. You've been warned!
<div class="form-container">
<h6><i class="fab fa-wpforms"></i>
&nbsp;{{ __trans_choice('Field', 2) }}
&nbsp;{{ trans_choice('frontend.global.field', 2) }}
</h6>
<div class="form-container-body">
@@ -310,7 +310,7 @@ flight reports that have been filed. You've been warned!
<div class="form-group">
@if(isset($pirep) && !$pirep->read_only)
{{ Form::button(__('Delete PIREP'), [
{{ Form::button(trans('frontend.pireps.deletepirep'), [
'name' => 'submit',
'value' => 'Delete',
'class' => 'btn btn-warning',
@@ -319,14 +319,14 @@ flight reports that have been filed. You've been warned!
@endif
@if(!isset($pirep) || (filled($pirep) && !$pirep->read_only))
{{ Form::button(__('Save PIREP'), [
{{ Form::button(trans('frontend.pireps.savepirep'), [
'name' => 'submit',
'value' => 'Save',
'class' => 'btn btn-info',
'type' => 'submit'])
}}
{{ Form::button(__('Submit PIREP'), [
{{ Form::button(trans('frontend.pireps.submitpirep'), [
'name' => 'submit',
'value' => 'Submit',
'class' => 'btn btn-success',
@@ -1,5 +1,5 @@
@extends('app')
@section('title', __trans_choice('PIREP', 2))
@section('title', trans_choice('frontend.global.pirep', 2))
@section('content')
<div class="row">
@@ -7,9 +7,9 @@
<div style="float:right;">
<a class="btn btn-info pull-right btn-lg"
style="margin-top: -10px;margin-bottom: 5px"
href="{{ route('frontend.pireps.create') }}">{{ __('File New PIREP') }}</a>
href="{{ route('frontend.pireps.create') }}">@lang('frontend.pireps.filenewpirep')</a>
</div>
<h2>{{ __trans_choice('Pilot Report', 2) }}</h2>
<h2>{{ trans_choice('frontend.pireps.pilotreport', 2) }}</h2>
@include('flash::message')
@include('pireps.table')
</div>
@@ -5,7 +5,7 @@
<p class="float-right">
<a href="{{ route('frontend.pireps.edit', [
'id' => $pirep->id,
]) }}" class="btn btn-sm btn-info">{{ __('Edit') }}</a>
]) }}" class="btn btn-sm btn-info">@lang('frontend.global.edit') }}</a>
</p>
<h5>
<a href="{{ route('frontend.pireps.show', [$pirep->id]) }}">
@@ -41,22 +41,22 @@
<div class="col-sm-6">
<table class="table-condensed" width="100%">
<tr>
<td nowrap><span class="title">{{ __('Flight Time') }}&nbsp;</span></td>
<td nowrap><span class="title">@lang('frontend.pireps.flighttime')&nbsp;</span></td>
<td>{{ Utils::minutesToTimeString($pirep->flight_time) }}</td>
</tr>
<tr>
<td nowrap><span class="title">{{ __('Aircraft') }}&nbsp;</span></td>
<td nowrap><span class="title">@lang('frontend.global.aircraft')&nbsp;</span></td>
<td>{{ $pirep->aircraft->name }}
({{ $pirep->aircraft->registration }})</td>
</tr>
@if($pirep->level)
<tr>
<td nowrap><span class="title">{{ __('Flight Level') }}&nbsp;</span></td>
<td nowrap><span class="title">@lang('frontend.pireps.flightlevel') }}&nbsp;</span></td>
<td>{{ $pirep->level }}</td>
</tr>
@endif
<tr>
<td nowrap><span class="title">{{ __('Filed On') }}:&nbsp;</span></td>
<td nowrap><span class="title">@lang('frontend.pireps.filedon'):&nbsp;</span></td>
<td>{{ show_datetime($pirep->created_at) }}</td>
</tr>
</table>
@@ -1,5 +1,5 @@
@extends('app')
@section('title', __trans_choice('PIREP', 1).' '.$pirep->ident)
@section('title', trans_choice('frontend.global.pirep', 1).' '.$pirep->ident)
@section('content')
<div class="row">
@@ -12,7 +12,7 @@
@if($pirep->state === PirepState::IN_PROGRESS)
@else
__('Arrived') {{$pirep->created_at->diffForHumans()}}
@lang('frontend.pireps.arrived') {{$pirep->created_at->diffForHumans()}}
@endif
</p>
</p>
@@ -89,20 +89,20 @@
action="{{ route('frontend.pireps.edit', ['id' => $pirep->id]) }}"
style="display: inline">
@csrf
<button class="btn btn-info">{{ __('Edit') }}</button>
<button class="btn btn-info">@lang('frontend.global.edit')</button>
</form>
&nbsp;
<form method="post"
action="{{ route('frontend.pireps.submit', ['id' => $pirep->id]) }}"
style="display: inline">
@csrf
<button class="btn btn-success">{{ __('Submit') }}</button>
<button class="btn btn-success">@lang('frontend.global.submit')</button>
</form>
</div>
@endif
<table class="table table-striped">
<tr>
<td width="30%">{{ __('Status') }}</td>
<td width="30%">@lang('frontend.global.status')</td>
<td>
<div class="badge badge-info">
{{ PirepStatus::label($pirep->status) }}
@@ -111,31 +111,31 @@
</tr>
<tr>
<td>{{ __('Source') }}</td>
<td>@lang('frontend.pireps.source')</td>
<td>{{ PirepSource::label($pirep->source) }}</td>
</tr>
<tr>
<td>{{ __('Flight Type') }}</td>
<td>@lang('frontend.pireps.flighttype')</td>
<td>{{ \App\Models\Enums\FlightType::label($pirep->flight_type) }}</td>
</tr>
<tr>
<td>{{ __('Filed Route') }}</td>
<td>@lang('frontend.pireps.filedroute')</td>
<td>
{{ $pirep->route }}
</td>
</tr>
<tr>
<td>{{ __('Notes') }}</td>
<td>{{ trans_choice('frontend.global.note', 2) }}</td>
<td>
{{ $pirep->notes }}
</td>
</tr>
<tr>
<td>{{ __('Filed On') }}</td>
<td>@lang('frontend.pireps.filedon')</td>
<td>
{{ show_datetime($pirep->created_at) }}
</td>
@@ -148,11 +148,11 @@
@endif
@if(count($pirep->fields) > 0)
<h5>{{ __trans_choice('Field', 2) }}</h5>
<h5>{{ trans_choice('frontend.global.field', 2) }}</h5>
<table class="table table-hover table-condensed">
<thead>
<th>{{ __('Name') }}</th>
<th>{{ __('Value') }}</th>
<th>@lang('frontend.global.name')</th>
<th>@lang('frontend.global.value')</th>
</thead>
<tbody>
@foreach($pirep->fields as $field)
@@ -175,11 +175,11 @@
@if(count($pirep->fares) > 0)
<div class="row">
<div class="col-12">
<h5>{{ __trans_choice('Fare', 2) }}</h5>
<h5>{{ trans_choice('frontend.pireps.fare', 2) }}</h5>
<table class="table table-hover table-condensed">
<thead>
<th>{{ __('Class') }}</th>
<th>{{ __('Count') }}</th>
<th>@lang('frontend.pireps.class')</th>
<th>@lang('frontend.pireps.count')</th>
</thead>
<tbody>
@foreach($pirep->fares as $fare)
@@ -200,7 +200,7 @@
<div class="separator"></div>
<div class="row">
<div class="col-12">
<h5>{{ __('Flight Log') }}</h5>
<h5>@lang('frontend.pireps.flightlog')</h5>
</div>
<div class="col-12">
<table class="table table-hover table-condensed" id="users-table">
@@ -3,13 +3,13 @@
<table class="table table-condensed table-hover">
<thead>
<tr>
<th>{{ __trans_choice('Flight', 1) }}</th>
<th>{{ __('Departure') }}</th>
<th>{{ __('Arrival') }}</th>
<th>{{ __('Aircraft') }}</th>
<th class="text-center">{{ __('Flight Time') }}</th>
<th class="text-center">{{ __('Status') }}</th>
<th>{{ __('Submitted') }}</th>
<th>{{ trans_choice('frontend.global.flight', 1) }}</th>
<th>@lang('frontend.global.departure')</th>
<th>@lang('frontend.global.arrival')</th>
<th>@lang('frontend.global.aircraft')</th>
<th class="text-center">@lang('frontend.global.flighttime')</th>
<th class="text-center">@lang('frontend.global.status')</th>
<th>@lang('frontend.pireps.submitted')</th>
<th></th>
</tr>
</thead>
@@ -58,7 +58,7 @@
@if(!$pirep->read_only)
<a href="{{ route('frontend.pireps.edit', [
'id' => $pirep->id,
]) }}">{{ __('Edit') }}</a>
]) }}">@lang('frontend.global.edit')</a>
@endif
</td>
</tr>