Skip to content

Commit

Permalink
More internationalization improvements per #151
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Jun 9, 2014
1 parent 34b4615 commit ffab309
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 28 deletions.
1 change: 0 additions & 1 deletion app/lang/en/admin/hardware/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
'years' => 'years',
'checkout_to' => 'Checkout to',
'checkedout_to' => 'Checked Out To',
'checkin' => 'Checkin',
'depreciation' => 'Depreciation',
'depreciates_on' => 'Depreciates On',
'fully_depreciated' => 'Fully Depreciated',
Expand Down
1 change: 1 addition & 0 deletions app/lang/en/admin/licenses/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'depreciation' => 'Depreciation',
'no_depreciation' => 'Do Not Depreciate',
'notes' => 'Notes',
'checkin' => 'Checkin',

)
;
12 changes: 12 additions & 0 deletions app/lang/en/admin/licenses/general.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

return array(
'checkin' => 'Checkin License Seat',
'checkout' => 'Checkout License Seat to User',
'view' => 'View License',
'edit' => 'Edit License',
'created_asset' => 'created asset',
'software_licenses' => 'Software Licenses',
'in_out' => 'In/Out',
'history_for' => 'History for ',
);
1 change: 1 addition & 0 deletions app/lang/en/admin/licenses/message.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
),

'delete' => array(
'confirm' => 'Are you sure you wish to delete this license?',
'error' => 'There was an issue deleting the license. Please try again.',
'success' => 'The license was deleted successfully.'
),
Expand Down
2 changes: 1 addition & 1 deletion app/views/backend/hardware/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<div class="col-md-9">
<div class="alert alert-info alert-block">
<i class="icon-info-sign"></i>
There are no results for your query.
@lang('general.no_results')
</div>
</div>

Expand Down
13 changes: 7 additions & 6 deletions app/views/backend/licenses/checkin.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{{-- Page title --}}
@section('title')
Checkin License
@lang('admin/licenses/general.checkin') ::
@parent
@stop

Expand All @@ -11,8 +11,9 @@

<div class="row header">
<div class="col-md-12">
<a href="{{ URL::previous() }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
<h3> Checkin License </h3>
<a href="{{ URL::previous() }}" class="btn-flat gray pull-right">
<i class="icon-circle-arrow-left icon-white"></i> @lang('general.back')</a>
<h3> @lang('admin/licenses/general.checkin') </h3>
</div>
</div>

Expand All @@ -27,23 +28,23 @@

<!-- Asset name -->
<div class="form-group">
<label class="col-sm-2 control-label">Asset Name</label>
<label class="col-sm-2 control-label">@lang('admin/hardware/form.name')</label>
<div class="col-md-6">
<p class="form-control-static">{{ $licenseseat->license->name }}</p>
</div>
</div>

<!-- Serial -->
<div class="form-group">
<label class="col-sm-2 control-label">Serial</label>
<label class="col-sm-2 control-label">@lang('admin/hardware/form.serial')</label>
<div class="col-md-6">
<p class="form-control-static">{{ $licenseseat->license->serial }}</p>
</div>
</div>

<!-- Note -->
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
<label for="note" class="col-md-2 control-label">Note</label>
<label for="note" class="col-md-2 control-label">@lang('admin/hardware/form.notes')</label>
<div class="col-md-7">
<input class="col-md-6 form-control" type="text" name="note" id="note" value="{{ Input::old('note', $licenseseat->note) }}" />
{{ $errors->first('note', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
Expand Down
15 changes: 8 additions & 7 deletions app/views/backend/licenses/checkout.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{{-- Page title --}}
@section('title')
Checkout License to User
@lang('admin/licenses/general.checkout') ::
@parent
@stop

Expand All @@ -11,9 +11,10 @@

<div class="row header">
<div class="col-md-12">
<a href="{{ URL::previous() }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
<a href="{{ URL::previous() }}" class="btn-flat gray pull-right">
<i class="icon-circle-arrow-left icon-white"></i> @lang('general.back')</a>
<h3>
Checkout License to User
@lang('admin/licenses/general.checkout')
</h3>
</div>
</div>
Expand All @@ -28,23 +29,23 @@

<!-- Asset name -->
<div class="form-group">
<label class="col-sm-2 control-label">Asset Name</label>
<label class="col-sm-2 control-label">@lang('admin/hardware/form.name')</label>
<div class="col-md-6">
<p class="form-control-static">{{ $licenseseat->license->name }}</p>
</div>
</div>

<!-- Serial -->
<div class="form-group">
<label class="col-sm-2 control-label">Serial</label>
<label class="col-sm-2 control-label">@lang('admin/hardware/form.serial')</label>
<div class="col-md-6">
<p class="form-control-static">{{ $licenseseat->license->serial }}</p>
</div>
</div>

<!-- User -->
<div class="form-group {{ $errors->has('assigned_to') ? ' has-error' : '' }}">
<label for="assigned_to" class="col-md-2 control-label">Checkout to</label>
<label for="assigned_to" class="col-md-2 control-label">@lang('admin/hardware/form.checkout_to')</label>
<div class="col-md-7">
{{ Form::select('assigned_to', $users_list , Input::old('assigned_to', $licenseseat->assigned_to), array('class'=>'select2', 'style'=>'min-width:350px')) }}
{{ $errors->first('assigned_to', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
Expand All @@ -53,7 +54,7 @@

<!-- Note -->
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
<label for="note" class="col-md-2 control-label">Note</label>
<label for="note" class="col-md-2 control-label">@lang('admin/hardware/form.notes')</label>
<div class="col-md-7">
<input class="col-md-6 form-control" type="text" name="note" id="note" value="{{ Input::old('note', $licenseseat->note) }}" />
{{ $errors->first('note', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
Expand Down
3 changes: 2 additions & 1 deletion app/views/backend/licenses/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

<div class="row header">
<div class="col-md-12">
<a href="{{ URL::previous() }}" class="btn-flat gray pull-right right"><i class="icon-circle-arrow-left icon-white"></i> @lang('general.back')</a>
<a href="{{ URL::previous() }}" class="btn-flat gray pull-right right">
<i class="icon-circle-arrow-left icon-white"></i> @lang('general.back')</a>
<h3>
@if ($license->id)
@lang('admin/licenses/form.update')
Expand Down
17 changes: 11 additions & 6 deletions app/views/backend/licenses/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@extends('backend/layouts/default')

{{-- Page title --}}
Licenses ::
@lang('admin/licenses/general.software_licenses') ::
@parent
@stop

Expand All @@ -12,7 +12,7 @@
<div class="row header">
<div class="col-md-12">
<a href="{{ route('create/licenses') }}" class="btn btn-success pull-right"><i class="icon-plus-sign icon-white"></i> Create New</a>
<h3>Software Licenses</h3>
<h3>@lang('admin/licenses/general.software_licenses')</h3>
</div>
</div>

Expand All @@ -24,7 +24,7 @@
<th class="col-md-3" tabindex="0" rowspan="1" colspan="1">@lang('admin/licenses/table.title')</th>
<th class="col-md-3" tabindex="0" rowspan="1" colspan="1">@lang('admin/licenses/table.serial')</th>
<th class="col-md-2" tabindex="0" rowspan="1" colspan="1">@lang('admin/licenses/table.assigned_to')</th>
<th class="col-md-1 actions" tabindex="0" rowspan="1" colspan="1">In/Out</th>
<th class="col-md-1 actions" tabindex="0" rowspan="1" colspan="1">@lang('admin/licenses/general.in_out')</th>
<th class="col-md-1 actions" tabindex="0" rowspan="1" colspan="1">@lang('table.actions')</th>
</tr>
</thead>
Expand Down Expand Up @@ -55,15 +55,20 @@
</td>
<td>
@if ($licensedto->assigned_to)
<a href="{{ route('checkin/license', $licensedto->id) }}" class="btn btn-primary">Checkin</a>
<a href="{{ route('checkin/license', $licensedto->id) }}" class="btn btn-primary">
@lang('general.checkin')</a>
@else
<a href="{{ route('checkout/license', $licensedto->id) }}" class="btn btn-info">Checkout</a>
<a href="{{ route('checkout/license', $licensedto->id) }}" class="btn btn-info">
@lang('general.checkout')</a>
@endif
</td>
<td>
@if ($count==1)
<a href="{{ route('update/license', $license->id) }}" class="btn btn-warning"><i class="icon-pencil icon-white"></i></a>
<a data-html="false" class="btn delete-asset btn-danger" data-toggle="modal" href="{{ route('delete/license', $license->id) }}" data-content="Are you sure you wish to delete this license?" data-title="Delete {{ htmlspecialchars($license->name) }}?" onClick="return false;"><i class="icon-trash icon-white"></i></a>
<a data-html="false" class="btn delete-asset btn-danger" data-toggle="modal" href="{{ route('delete/license', $license->id) }}"
data-content="@lang('admin/licenses/message.delete.confirm')"
data-title="@lang('general.delete')
{{ htmlspecialchars($license->name) }}?" onClick="return false;"><i class="icon-trash icon-white"></i></a>
@endif

</td>
Expand Down
12 changes: 6 additions & 6 deletions app/views/backend/licenses/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{{-- Page title --}}
@section('title')
View License {{ $license->name }} ::
@lang('admin/licenses/general.view') {{ $license->name }} ::
@parent
@stop

Expand All @@ -12,7 +12,7 @@
<div class="row header">
<div class="col-md-12">
<a href="{{ route('update/license', $license->id) }}" class="btn-flat white pull-right"> Edit License</a>
<h3 class="name">History for {{ $license->name }}</h3>
<h3 class="name">@lang('admin/licenses/general.history_for') {{ $license->name }}</h3>
</div>
</div>

Expand All @@ -24,19 +24,19 @@

<div class="col-md-12">
@if ($license->serial)
<div class="col-md-6"><strong>Serial: </strong> {{ $license->serial }} </div>
<div class="col-md-6"><strong>@lang('admin/licenses/form.serial'): </strong> {{ $license->serial }} </div>
@endif

@if ($license->license_name)
<div class="col-md-6"><strong>Licensed To: </strong> {{ $license->license_name }} </div>
<div class="col-md-6"><strong>@lang('admin/licenses/form.to_name'): </strong> {{ $license->license_name }} </div>
@endif

@if ($license->license_email)
<div class="col-md-6"><strong>Licensed Email: </strong> {{ $license->license_email }} </div>
<div class="col-md-6"><strong>@lang('admin/licenses/form.to_email'): </strong> {{ $license->license_email }} </div>
@endif

@if ($license->notes)
<div class="col-md-6"><strong>Notes: </strong>{{ $license->notes }}</div>
<div class="col-md-6"><strong>@lang('admin/licenses/form.notes'): </strong>{{ $license->notes }}</div>
@endif


Expand Down

0 comments on commit ffab309

Please sign in to comment.