Skip to content

Commit 74653d3

Browse files
committed
More refactoring of language structure, language strings per #151
1 parent 65d298a commit 74653d3

File tree

9 files changed

+42
-24
lines changed

9 files changed

+42
-24
lines changed

app/lang/en/admin/models/message.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
),
1818

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

app/lang/en/admin/models/table.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@
1010
'numassets' => 'Assets',
1111
'title' => 'Asset Models',
1212
'update' => 'Update Asset Model',
13+
'view' => 'View Asset Model',
14+
'update' => 'Update Model',
1315
);

app/lang/en/admin/statuslabels/message.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
),
1818

1919
'delete' => array(
20+
'confirm' => 'Are you sure you wish to delete this status label?',
2021
'error' => 'There was an issue deleting the location. Please try again.',
2122
'success' => 'The location was deleted successfully.'
2223
)

app/lang/en/general.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
'back' => 'Back',
1414
'cancel' => 'Cancel',
1515
'categories' => 'Categories',
16+
'category' => 'Category',
1617
'checkin' => 'Checkin',
1718
'checkout' => 'Checkout',
1819
'city' => 'City',
@@ -24,11 +25,12 @@
2425
'date' => 'Date',
2526
'delete' => 'Delete',
2627
'deployed' => 'Deployed',
27-
'depreciation' => 'Depreciation',
28+
'depreciation_report' => 'Depreciation Report',
2829
'depreciation' => 'Depreciation',
2930
'eol' => 'EOL',
3031
'first_name' => 'First Name',
3132
'groups' => 'Groups',
33+
'history_for' => 'History for',
3234
'id' => 'ID',
3335
'last_name' => 'Last Name',
3436
'license' => 'License',
@@ -38,10 +40,13 @@
3840
'locations' => 'Locations',
3941
'logout' => 'Logout',
4042
'manufacturers' => 'Manufacturers',
43+
'manufacturer' => 'Manufacturer',
44+
'model_no' => 'Model No.',
4145
'months' => 'months',
4246
'moreinfo' => 'More Info',
4347
'name' => 'Name',
4448
'no_results' => 'No Results.',
49+
'no_depreciation' => 'No Derepciation',
4550
'no' => 'No',
4651
'pending' => 'Pending',
4752
'people' => 'People',

app/views/backend/licenses/view.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<div class="row header">
1313
<div class="col-md-12">
1414
<a href="{{ route('update/license', $license->id) }}" class="btn-flat white pull-right"> @lang('admin/licenses/form.update')</a>
15-
<h3 class="name">@lang('admin/licenses/general.history_for') {{ $license->name }}</h3>
15+
<h3 class="name">@lang('general.history_for') {{ $license->name }}</h3>
1616
</div>
1717
</div>
1818

app/views/backend/models/edit.blade.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@
4545

4646
<!-- Model No. -->
4747
<div class="form-group {{ $errors->has('modelno') ? ' has-error' : '' }}">
48-
<label for="modelno" class="col-md-2 control-label">@lang('admin/models/table.modelnumber')</label>
48+
<label for="modelno" class="col-md-2 control-label">@lang('general.model_no')</label>
4949
<div class="col-md-7">
5050
<input class="form-control" type="text" name="modelno" id="modelno" value="{{ Input::old('modelno', $model->modelno) }}" />
5151
{{ $errors->first('modelno', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
5252
</div>
5353
</div>
5454

5555
<div class="form-group {{ $errors->has('manufacturer_id') ? ' has-error' : '' }}">
56-
<label for="manufacturer_id" class="col-md-2 control-label">@lang('admin/models/table.manufacturer')</label>
56+
<label for="manufacturer_id" class="col-md-2 control-label">@lang('general.manufacturer')</label>
5757
<div class="col-md-7">
5858
{{ Form::select('manufacturer_id', $manufacturer_list , Input::old('manufacturer_id', $model->manufacturer_id), array('class'=>'select2', 'style'=>'width:350px')) }}
5959
{{ $errors->first('manufacturer_id', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
@@ -62,7 +62,7 @@
6262

6363
<!-- Depreciation -->
6464
<div class="form-group {{ $errors->has('depreciation_id') ? ' has-error' : '' }}">
65-
<label for="depreciation_id" class="col-md-2 control-label">@lang('admin/models/general.depreciation')</label>
65+
<label for="depreciation_id" class="col-md-2 control-label">@lang('general.depreciation')</label>
6666
<div class="col-md-7">
6767
{{ Form::select('depreciation_id', $depreciation_list , Input::old('depreciation_id', $model->depreciation_id), array('class'=>'select2', 'style'=>'width:350px')) }}
6868
{{ $errors->first('depreciation_id', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
@@ -71,7 +71,7 @@
7171

7272
<!-- Category -->
7373
<div class="form-group {{ $errors->has('category_id') ? ' has-error' : '' }}">
74-
<label for="category_id" class="col-md-2 control-label">@lang('admin/models/table.category')</label>
74+
<label for="category_id" class="col-md-2 control-label">@lang('general.category')</label>
7575
<div class="col-md-7">
7676
{{ Form::select('category_id', $category_list , Input::old('category_id', $model->category_id), array('class'=>'select2', 'style'=>'width:350px')) }}
7777
{{ $errors->first('category_id', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
@@ -97,7 +97,7 @@
9797
<div class="form-group">
9898
<label class="col-md-2 control-label"></label>
9999
<div class="col-md-7">
100-
<a class="btn btn-link" href="{{ URL::previous() }}">Cancel</a>
100+
<a class="btn btn-link" href="{{ URL::previous() }}">@lang('general.cancel')</a>
101101
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i> @lang('general.save')</button>
102102
</div>
103103
</div>

app/views/backend/models/index.blade.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<div class="row header">
1313
<div class="col-md-12">
1414
<a href="{{ route('create/model') }}" class="btn btn-success pull-right"><i class="icon-plus-sign icon-white"></i> @lang('general.create')</a>
15-
<h3>Asset Models</h3>
15+
<h3>@lang('admin/models/table.title')</h3>
1616
</div>
1717
</div>
1818

@@ -23,9 +23,9 @@
2323
<th class="col-md-3">@lang('admin/models/table.title')</th>
2424
<th class="col-md-2">@lang('admin/models/table.modelnumber')</th>
2525
<th class="col-md-1">@lang('admin/models/table.numassets')</th>
26-
<th class="col-md-2">Depreciation</th>
27-
<th class="col-md-2">Category</th>
28-
<th class="col-md-2">EOL</th>
26+
<th class="col-md-2">@lang('general.depreciation')</th>
27+
<th class="col-md-2">@lang('general.category')</th>
28+
<th class="col-md-2">@lang('general.eol')</th>
2929
<th class="col-md-2 actions">@lang('table.actions')</th>
3030
</tr>
3131
</thead>
@@ -41,7 +41,7 @@
4141
{{ $model->depreciation->name }}
4242
({{ $model->depreciation->months }} months)
4343
@else
44-
No Depreciation
44+
@lang('general.no_depreciation')
4545
@endif
4646

4747
</td>
@@ -54,7 +54,8 @@
5454
<td>
5555

5656
@if ($model->eol)
57-
{{ $model->eol }} months
57+
{{ $model->eol }}
58+
@lang('general.months')
5859
@else
5960
--
6061
@endif
@@ -63,7 +64,9 @@
6364

6465
<td>
6566
<a href="{{ route('update/model', $model->id) }}" class="btn btn-warning"><i class="icon-pencil icon-white"></i></a>
66-
<a data-html="false" class="btn delete-asset btn-danger" data-toggle="modal" href="{{ route('delete/model', $model->id) }}" data-content="Are you sure you wish to delete this model?" data-title="Delete {{ htmlspecialchars($model->name) }}?" onClick="return false;"><i class="icon-trash icon-white"></i></a>
67+
<a data-html="false" class="btn delete-asset btn-danger" data-toggle="modal" href="{{ route('delete/model', $model->id) }}" data-content="@lang('admin/models/message.delete.confirm')"
68+
data-title="@lang('general.delete')
69+
{{ htmlspecialchars($model->name) }}?" onClick="return false;"><i class="icon-trash icon-white"></i></a>
6770
</td>
6871
</tr>
6972
@endforeach

app/views/backend/models/view.blade.php

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
{{-- Page title --}}
44
@section('title')
5-
View Model {{ $model->model_tag }} ::
5+
@lang('admin/models/table.view')
6+
{{ $model->model_tag }} ::
67
@parent
78
@stop
89

@@ -11,8 +12,9 @@
1112

1213
<div class="row header">
1314
<div class="col-md-12">
14-
<a href="{{ route('update/model', $model->id) }}" class="btn btn-default pull-right"><i class="icon-plus-sign icon-white"></i> Update Model</a>
15-
<h3 class="name">History for {{ $model->name }} </h3>
15+
<a href="{{ route('update/model', $model->id) }}" class="btn-flat white pull-right">
16+
@lang('admin/models/table.update')</a>
17+
<h3 class="name">@lang('general.history_for') {{ $model->name }} </h3>
1618
</div>
1719
</div>
1820

@@ -61,10 +63,10 @@
6163
</table>
6264

6365
@else
64-
<div class="col-md-6">
66+
<div class="col-md-9">
6567
<div class="alert alert-info alert-block">
6668
<i class="icon-info-sign"></i>
67-
There are no results for your query.
69+
@lang('general.no_results')
6870
</div>
6971
</div>
7072
@endif
@@ -79,19 +81,23 @@
7981

8082

8183
@if ($model->manufacturer)
82-
<li>Manufacturer: {{ $model->manufacturer->name }}</li>
84+
<li>@lang('general.manufacturer'):
85+
{{ $model->manufacturer->name }}</li>
8386
@endif
8487

8588
@if ($model->modelno)
86-
<li>Model No.: {{ $model->modelno }}</li>
89+
<li>@lang('general.model_no'):
90+
{{ $model->modelno }}</li>
8791
@endif
8892

8993
@if ($model->depreciation)
90-
<li>Depreciation: {{ $model->depreciation->name }} ({{ $model->depreciation->months }} months)</li>
94+
<li>@lang('general.depreciation'):
95+
{{ $model->depreciation->name }} ({{ $model->depreciation->months }} months)</li>
9196
@endif
9297

9398
@if ($model->eol)
94-
<li>EOL: {{ $model->eol }} months</li>
99+
<li>@lang('general.eol'):
100+
{{ $model->eol }} months</li>
95101
@endif
96102

97103
</ul>

app/views/backend/reports/index.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@lang('admin/hardware/table.dl_csv')</a>
1818
</div>
1919

20-
<h3>Depreciation Report</h3>
20+
<h3>@lang('general.depreciation_report')</h3>
2121
</div>
2222

2323
<div class="row table">

0 commit comments

Comments
 (0)