Skip to content

Commit

Permalink
More internationalization per #151
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Jun 9, 2014
1 parent dae3220 commit 2fe66c1
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 45 deletions.
3 changes: 2 additions & 1 deletion app/lang/en/admin/hardware/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
'clone' => 'Clone Asset',
'view' => 'View Asset',
'edit' => 'Edit Asset',
'created_asset' => 'created asset',
'asset' => 'Asset',
'pending' => 'Pending Asset',
);
28 changes: 15 additions & 13 deletions app/lang/en/admin/hardware/message.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,36 @@

return array(

'does_not_exist' => 'Asset does not exist.',
'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ',
'undeployable' => '<strong>Warning: </strong> This asset has been marked as currently undeployable.
If this status has changed, please update the asset status.',
'does_not_exist' => 'Asset does not exist.',
'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ',

'create' => array(
'error' => 'Asset was not created, please try again. :(',
'success' => 'Asset created successfully. :)'
'error' => 'Asset was not created, please try again. :(',
'success' => 'Asset created successfully. :)'
),

'update' => array(
'error' => 'Asset was not updated, please try again',
'success' => 'Asset updated successfully.'
'error' => 'Asset was not updated, please try again',
'success' => 'Asset updated successfully.'
),

'delete' => array(
'confirm' => 'Are you sure you wish to delete this asset?',
'error' => 'There was an issue deleting the asset. Please try again.',
'success' => 'The asset was deleted successfully.'
'confirm' => 'Are you sure you wish to delete this asset?',
'error' => 'There was an issue deleting the asset. Please try again.',
'success' => 'The asset was deleted successfully.'
),

'checkout' => array(
'error' => 'Asset was not checked out, please try again',
'success' => 'Asset checked out successfully.',
'error' => 'Asset was not checked out, please try again',
'success' => 'Asset checked out successfully.',
'user_does_not_exist' => 'That user is invalid. Please try again.'
),

'checkin' => array(
'error' => 'Asset was not checked in, please try again',
'success' => 'Asset checked in successfully.',
'error' => 'Asset was not checked in, please try again',
'success' => 'Asset checked in successfully.',
'user_does_not_exist' => 'That user is invalid. Please try again.'
)

Expand Down
3 changes: 3 additions & 0 deletions app/lang/en/admin/licenses/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
'no_depreciation' => 'Do Not Depreciate',
'notes' => 'Notes',
'checkin' => 'Checkin',
'checkin' => 'Checkin',
'date' => 'Purchase Date',
'cost' => 'Purchase Cost',

)
;
7 changes: 6 additions & 1 deletion app/lang/en/admin/licenses/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
'checkout' => 'Checkout License Seat to User',
'view' => 'View License',
'edit' => 'Edit License',
'created_asset' => 'created asset',
'software_licenses' => 'Software Licenses',
'license_seats' => 'License Seats',
'in_out' => 'In/Out',
'history_for' => 'History for ',
'seat' => 'Seat',
'seats' => 'Seats',
'user' => 'User',
'checkout_history' => 'Checkout History',
'info' => 'License Info',
);
3 changes: 3 additions & 0 deletions app/lang/en/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,8 @@
'asset_models' => 'Asset Models',
'currency_symbol' => '$',
'no_results' => 'No Results.',
'date' => 'Date',
'unknown_admin' => 'Unknown Admin',
'created_asset' => 'created asset',
'moreinfo' => 'More Info',
);
18 changes: 9 additions & 9 deletions app/views/backend/hardware/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@
{{ $asset->months_until_depreciated()->m }}
@lang('admin/hardware/form.months')
@if ($asset->months_until_depreciated()->y > 0)
, {{ $asset->months_until_depreciated()->y }}
@lang('admin/hardware/form.years')
, {{ $asset->months_until_depreciated()->y }}
@lang('admin/hardware/form.years')
@endif
</div>
@endif
Expand Down Expand Up @@ -174,7 +174,7 @@
@lang('general.unknown_admin')
@endif
</td>
<td>@lang('admin/hardware/general.created_asset')</td>
<td>@lang('general.created_asset')</td>
<td></td>
<td></td>
</tr>
Expand Down Expand Up @@ -228,24 +228,24 @@
@elseif (($asset->status_id ) && ($asset->status_id > 1))

@if ($asset->assetstatus)
<h6><br>{{ $asset->assetstatus->name }} Asset</h6>
<h6><br>{{ $asset->assetstatus->name }}
@lang('admin/hardware/general.asset')</h6>

<div class="col-md-12">
<div class="alert alert-warning alert-block">
<i class="icon-warning-sign"></i>
<strong>Warning: </strong> This asset has been marked <strong>{{ $asset->assetstatus->name }}</strong> and is currently undeployable.
If this status has changed, please update the asset status by <a href="{{ route('update/hardware', $asset->id) }}">editing the asset</a>.
@lang('admin/hardware/message.undeployable')

</div>
</div>
@endif

@elseif ($asset->status_id == NULL)
<h6><br>Pending Asset</h6>
<h6><br>@lang('admin/hardware/general.pending')</h6>
<div class="col-md-12">
<div class="alert alert-info alert-block">
<i class="icon-info-sign"></i>
<strong>Warning: </strong> This asset has been marked as pending and is currently undeployable.
If this status has changed, please update the asset status.
@lang('admin/hardware/message.undeployable')
</div>
</div>

Expand Down
47 changes: 26 additions & 21 deletions app/views/backend/licenses/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,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>
<a href="{{ route('update/license', $license->id) }}" class="btn-flat white pull-right"> @lang('admin/licenses/form.update')</a>
<h3 class="name">@lang('admin/licenses/general.history_for') {{ $license->name }}</h3>
</div>
</div>
Expand All @@ -20,7 +20,7 @@
<div class="row profile">
<div class="col-md-9 bio">

<h6>License Info</h6>
<h6>@lang('admin/licenses/general.info')</h6>

<div class="col-md-12">
@if ($license->serial)
Expand All @@ -47,12 +47,12 @@


<!-- checked out assets table -->
<h6>{{ $license->seats }} License Seats</h6>
<h6>{{ $license->seats }} @lang('admin/licenses/general.license_seats')</h6>
<table class="table table-hover">
<thead>
<tr>
<th class="col-md-2">Seat</th>
<th class="col-md-6">User</th>
<th class="col-md-2">@lang('admin/licenses/general.seat')</th>
<th class="col-md-6">@lang('admin/licenses/general.user')</th>
<th class="col-md-2"></th>
</tr>
</thead>
Expand All @@ -72,9 +72,9 @@
</td>
<td>
@if ($licensedto->assigned_to)
<a href="{{ route('checkin/license', $licensedto->id) }}" class="btn-flat info"> Checkin </a>
<a href="{{ route('checkin/license', $licensedto->id) }}" class="btn-flat info"> @lang('general.checkin') </a>
@else
<a href="{{ route('checkout/license', $licensedto->id) }}" class="btn-flat success">Checkout</a>
<a href="{{ route('checkout/license', $licensedto->id) }}" class="btn-flat success">@lang('general.checkout')</a>
@endif
</td>

Expand All @@ -87,17 +87,17 @@
</tbody>
</table>
<br>
<h6>Checkout History</h6>
<h6>@lang('admin/licenses/general.checkout_history')</h6>

<table class="table table-hover">
<thead>
<tr>
<th class="col-md-1"></th>
<th class="col-md-3"><span class="line"></span>Date</th>
<th class="col-md-3"><span class="line"></span>Admin</th>
<th class="col-md-3"><span class="line"></span>Action</th>
<th class="col-md-3"><span class="line"></span>User</th>
<th class="col-md-3"><span class="line"></span>Note</th>
<th class="col-md-3"><span class="line"></span>@lang('general.date')</th>
<th class="col-md-3"><span class="line"></span>@lang('general.admin')</th>
<th class="col-md-3"><span class="line"></span>@lang('button.actions')</th>
<th class="col-md-3"><span class="line"></span>@lang('admin/licenses/general.user')</th>
<th class="col-md-3"><span class="line"></span>@lang('admin/licenses/form.notes')</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -140,10 +140,10 @@
@if ($license->adminuser)
{{ $license->adminuser->fullName() }}
@else
Unknown Admin
@lang('general.unknown_admin')
@endif
</td>
<td>created asset</td>
<td>@lang('general.created_asset')</td>
<td></td>
<td></td>
</tr>
Expand All @@ -153,23 +153,28 @@

<!-- side address column -->
<div class="col-md-3 col-xs-12 address pull-right">
<h6><br>More Info:</h6>
<h6><br>@lang('general.moreinfo'):</h6>
<ul>

@if ($license->purchase_date > 0)
<li>Purchase Date: {{ $license->purchase_date }} </li>
<li>@lang('admin/licenses/form.date'): {{ $license->purchase_date }} </li>
@endif
@if ($license->purchase_cost > 0)
<li>Purchase Cost: ${{ number_format($license->purchase_cost,2) }} </li>
<li>@lang('admin/licenses/form.cost'):
@lang('general.currency')
{{ number_format($license->purchase_cost,2) }} </li>
@endif
@if ($license->order_number)
<li>Order #: {{ $license->order_number }} </li>
<li>@lang('admin/licenses/form.order'):
{{ $license->order_number }} </li>
@endif
@if (($license->seats) && ($license->seats) > 0)
<li>Seats: {{ $license->seats }} </li>
<li>@lang('admin/licenses/form.seats'):
{{ $license->seats }} </li>
@endif
@if ($license->depreciation)
<li>Depreciation: {{ $license->depreciation->name }} ({{ $license->depreciation->months }} months)</li>
<li>@lang('admin/licenses/form.depreciation'):
{{ $license->depreciation->name }} ({{ $license->depreciation->months }} months)</li>
@endif
</ul>
</div>
Expand Down

0 comments on commit 2fe66c1

Please sign in to comment.