From 34b4615f4ef09c78962278004bfd915397dfc899 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 9 Jun 2014 01:12:08 -0400 Subject: [PATCH] Additional internationalization for Hardware per #151 --- app/lang/en/admin/hardware/form.php | 40 +++++++----- app/lang/en/admin/hardware/general.php | 4 +- app/lang/en/admin/hardware/message.php | 1 + app/lang/en/button.php | 1 + app/lang/en/general.php | 1 + app/views/backend/hardware/index.blade.php | 6 +- app/views/backend/hardware/view.blade.php | 73 ++++++++++++++-------- 7 files changed, 81 insertions(+), 45 deletions(-) diff --git a/app/lang/en/admin/hardware/form.php b/app/lang/en/admin/hardware/form.php index 8a802e29aaad..c4a4eda22aa1 100644 --- a/app/lang/en/admin/hardware/form.php +++ b/app/lang/en/admin/hardware/form.php @@ -2,21 +2,29 @@ return array( - 'create' => 'Create Asset', - 'update' => 'Asset Update', - 'tag' => 'Asset Tag', - 'name' => 'Asset Name', - 'serial' => 'Serial', - 'order' => 'Order Number', - 'model' => 'Model', - 'date' => 'Purchase Date', - 'cost' => 'Purchase Cost', - 'warranty' => 'Warranty', - 'status' => 'Status', - 'notes' => 'Notes', - 'months' => 'months', - 'checkout_to' => 'Checkout to', - 'checkin' => 'Checkin', - 'depreciation' => 'Depreciation', + 'create' => 'Create Asset', + 'update' => 'Asset Update', + 'tag' => 'Asset Tag', + 'name' => 'Asset Name', + 'serial' => 'Serial', + 'order' => 'Order Number', + 'model' => 'Model', + 'date' => 'Purchase Date', + 'cost' => 'Purchase Cost', + 'warranty' => 'Warranty', + 'status' => 'Status', + 'notes' => 'Notes', + 'months' => 'months', + 'years' => 'years', + 'checkout_to' => 'Checkout to', + 'checkedout_to' => 'Checked Out To', + 'checkin' => 'Checkin', + 'depreciation' => 'Depreciation', + 'depreciates_on' => 'Depreciates On', + 'fully_depreciated' => 'Fully Depreciated', + 'eol_rate' => 'EOL Rate', + 'eol_date' => 'EOL Date', + 'manufacturer' => 'Manufacturer', + 'qr' => 'QR Code', ) ; diff --git a/app/lang/en/admin/hardware/general.php b/app/lang/en/admin/hardware/general.php index 25e4f82875c0..6756ba2c9e12 100644 --- a/app/lang/en/admin/hardware/general.php +++ b/app/lang/en/admin/hardware/general.php @@ -4,5 +4,7 @@ 'checkin' => 'Checkin Asset', 'checkout' => 'Checkout Asset to User', 'clone' => 'Clone Asset', - + 'view' => 'View Asset', + 'edit' => 'Edit Asset', + 'created_asset' => 'created asset', ); diff --git a/app/lang/en/admin/hardware/message.php b/app/lang/en/admin/hardware/message.php index 5a0c37d68673..e4edeb6bc5f3 100755 --- a/app/lang/en/admin/hardware/message.php +++ b/app/lang/en/admin/hardware/message.php @@ -16,6 +16,7 @@ ), '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.' ), diff --git a/app/lang/en/button.php b/app/lang/en/button.php index 363ff868fc7a..173a5ef8f8a3 100755 --- a/app/lang/en/button.php +++ b/app/lang/en/button.php @@ -5,5 +5,6 @@ 'edit' => 'Edit', 'delete' => 'Delete', 'restore' => 'Restore', + 'actions' => 'Actions', ); diff --git a/app/lang/en/general.php b/app/lang/en/general.php index b3e61160ce68..a53e932efa11 100755 --- a/app/lang/en/general.php +++ b/app/lang/en/general.php @@ -46,4 +46,5 @@ 'asset_models' => 'Asset Models', 'currency_symbol' => '$', 'no_results' => 'No Results.', + 'unknown_admin' => 'Unknown Admin', ); diff --git a/app/views/backend/hardware/index.blade.php b/app/views/backend/hardware/index.blade.php index 3b6c755dde00..a144cd5abb09 100755 --- a/app/views/backend/hardware/index.blade.php +++ b/app/views/backend/hardware/index.blade.php @@ -14,7 +14,7 @@ @else @lang('general.all') @endif - + @lang('general.assets') @stop @@ -112,7 +112,9 @@ - + @endforeach diff --git a/app/views/backend/hardware/view.blade.php b/app/views/backend/hardware/view.blade.php index 719fe01dd7d7..6f7840170f8b 100644 --- a/app/views/backend/hardware/view.blade.php +++ b/app/views/backend/hardware/view.blade.php @@ -2,7 +2,7 @@ {{-- Page title --}} @section('title') -View Asset {{ $asset->asset_tag }} :: +@lang('admin/hardware/general.view') {{ $asset->asset_tag }} :: @parent @stop @@ -12,7 +12,7 @@
- + @@ -20,17 +20,20 @@ @if ($asset->status_id == 1) @if ($asset->assigned_to != 0) -
  • Checkin
  • +
  • @lang('admin/hardware/general.checkin')
  • @endif @elseif ($asset->status_id == 0) -
  • Checkout
  • +
  • @lang('admin/hardware/general.checkout')
  • @endif -
  • Edit Asset
  • -
  • Clone Asset
  • +
  • @lang('admin/hardware/general.edit')
  • +
  • @lang('admin/hardware/general.clone')
  • -

    History for {{ $asset->asset_tag }} +

    + @lang('admin/hardware/general.view') {{ $asset->asset_tag }} + + {{ $asset->asset_tag }} @if ($asset->name) ({{ $asset->name }}) @endif @@ -45,38 +48,56 @@
    @if ($asset->model->manufacturer) -
    Manufacturer: {{ $asset->model->manufacturer->name }}
    -
    Model: {{ $asset->model->name }} / {{ $asset->model->modelno }}
    +
    @lang('admin/hardware/form.manufacturer'): + {{ $asset->model->manufacturer->name }}
    +
    @lang('admin/hardware/form.model'): + {{ $asset->model->name }} / {{ $asset->model->modelno }}
    @endif @if ($asset->purchase_date) -
    Purchased On: {{ $asset->purchase_date }}
    +
    @lang('admin/hardware/form.date'): + {{ $asset->purchase_date }}
    @endif @if ($asset->purchase_cost) -
    Purchase Cost: ${{ number_format($asset->purchase_cost,2) }}
    +
    @lang('admin/hardware/form.cost'): + @lang('general.currency') + {{ number_format($asset->purchase_cost,2) }}
    @endif @if ($asset->order_number) -
    Order #: {{ $asset->order_number }}
    +
    @lang('admin/hardware/form.order'): + {{ $asset->order_number }}
    @endif @if ($asset->warranty_months) -
    Warranty: {{ $asset->warranty_months }} months
    -
    Expires: {{ $asset->warrantee_expires() }}
    +
    @lang('admin/hardware/form.warranty'): + {{ $asset->warranty_months }} + @lang('admin/hardware/form.months') +
    +
    @lang('admin/hardware/form.expires'): + {{ $asset->warrantee_expires() }}
    @endif @if ($asset->depreciation) -
    Depreciation: {{ $asset->depreciation->name }} +
    @lang('admin/hardware/form.depreciation'): + {{ $asset->depreciation->name }} ({{ $asset->depreciation->months }} months)
    -
    Depreciates On: {{ $asset->depreciated_date() }}
    -
    Fully Depreciated: {{ $asset->months_until_depreciated()->m }} months, - {{ $asset->months_until_depreciated()->y }} years
    +
    @lang('admin/hardware/form.depreciates_on'): + {{ $asset->depreciated_date() }}
    +
    @lang('admin/hardware/form.fully_depreciated'): + {{ $asset->months_until_depreciated()->m }} + @lang('admin/hardware/form.months'), + {{ $asset->months_until_depreciated()->y }} + @lang('admin/hardware/form.years')
    @endif @if ($asset->model->eol) -
    EOL Rate: {{ $asset->model->eol }} months
    -
    EOL Date: {{ $asset->eol_date() }} +
    @lang('admin/hardware/form.eol_rate'): + {{ $asset->model->eol }} + @lang('admin/hardware/form.months')
    +
    @lang('admin/hardware/form.eol_date'): + {{ $asset->eol_date() }} @if ($asset->months_until_eol()) ({{ $asset->months_until_eol()->y }} years, {{ $asset->months_until_eol()->m }} months) @@ -138,10 +159,10 @@ @if ($asset->adminuser->id) {{ $asset->adminuser->fullName() }} @else - Unknown Admin + @lang('general.unknown_admin') @endif - created asset + @lang('admin/hardware/general.created_asset') @@ -155,14 +176,14 @@
    @if ($qr_code->display) -
    QR Code
    +
    @lang('admin/hardware/form.qr')

    @endif @if ((isset($asset->assigned_to ) && ($asset->assigned_to > 0))) -

    Checked Out To:
    +

    @lang('admin/hardware/form.checkedout_to')
    @elseif (($asset->status_id ) && ($asset->status_id > 1)) @@ -217,7 +238,7 @@
    @else -

    Checkout Asset
    +

    @lang('admin/hardware/general.checkout')
    • This asset is not checked out to anyone yet. Use the button below to check it out now.


    • Checkout Asset