Skip to content

A free open source IT asset/license management system

Added localization strings for partials, added file structure

Wächtler, Yannick04fec144a0e9
diff --git a/resources/lang/en/button.php b/resources/lang/en/button.php
index 438dac3cac..1e44af7d1a 100644
--- a/resources/lang/en/button.php
+++ b/resources/lang/en/button.php
@@ -20,5 +20,5 @@ return [
'bulk_actions' => 'Bulk Actions',
'add_maintenance' => 'Add Maintenance',
'append' => 'Append',
- 'remove' => 'Remove',
+ 'new' => 'New',
];
diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php
index e2d1c44361..f831f363a6 100644
--- a/resources/lang/en/general.php
+++ b/resources/lang/en/general.php
@@ -148,6 +148,7 @@
'licenses' => 'Licenses',
'list_all' => 'List All',
'loading' => 'Loading',
+ 'loading_wait' => 'Loading... please wait....',
'lock_passwords' => 'This field value will not be saved in a demo installation.',
'feature_disabled' => 'This feature has been disabled for the demo installation.',
'location' => 'Location',
diff --git a/resources/lang/en/partials/forms/general.php b/resources/lang/en/partials/forms/general.php
new file mode 100644
index 0000000000..c7f2bbfb47
--- /dev/null
+++ b/resources/lang/en/partials/forms/general.php
@@ -0,0 +1,6 @@
+<?php
+
+return [
+ 'alt_uploaded_image_thumbnail' => 'Uploaded image thumbnail',
+ 'placeholder_kit' => 'Select a kit',
+];
\ No newline at end of file
diff --git a/resources/views/custom_fields/fieldsets/view.blade.php b/resources/views/custom_fields/fieldsets/view.blade.php
index f4c5f1b682..2f19a1f400 100644
--- a/resources/views/custom_fields/fieldsets/view.blade.php
+++ b/resources/views/custom_fields/fieldsets/view.blade.php
@@ -77,7 +77,9 @@
@can('update', $custom_fieldset)
<form method="post" action="{{ route('fields.disassociate', [$field, $custom_fieldset->id]) }}">
@csrf
- <button type="submit" class="btn btn-sm btn-danger">{{ trans('button.remove') }}</button> @endcan
+ <button type="submit" class="btn btn-sm btn-danger">{{ trans('button.remove') }}</button>
+ </form>
+ @endcan
</td>
</tr>
@endforeach
diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php
index b0562fefeb..b847154b89 100644
--- a/resources/views/partials/bootstrap-table.blade.php
+++ b/resources/views/partials/bootstrap-table.blade.php
@@ -4,6 +4,7 @@
@endpush
@push('js')
+
<script src="{{ url(mix('js/dist/bootstrap-table.js')) }}"></script>
<script nonce="{{ csrf_token() }}">
@@ -64,7 +65,7 @@
return newParams;
},
formatLoadingMessage: function () {
- return '<h2><i class="fas fa-spinner fa-spin" aria-hidden="true"></i> Loading... please wait.... </h4>';
+ return '<h2><i class="fas fa-spinner fa-spin" aria-hidden="true"></i> {{ trans('general.loading_wait') }} </h4>';
},
icons: {
advancedSearchIcon: 'fas fa-search-plus',
diff --git a/resources/views/partials/forms/edit/category-select.blade.php b/resources/views/partials/forms/edit/category-select.blade.php
index ff2b0e4ece..402c959cce 100644
--- a/resources/views/partials/forms/edit/category-select.blade.php
+++ b/resources/views/partials/forms/edit/category-select.blade.php
@@ -18,7 +18,7 @@
<div class="col-md-1 col-sm-1 text-left">
@can('create', \App\Models\Category::class)
@if ((!isset($hide_new)) || ($hide_new!='true'))
- <a href='{{ route('modal.show',['type' => 'category', 'category_type' => isset($category_type) ? $category_type : 'assets' ]) }}' data-toggle="modal" data-target="#createModal" data-select='category_select_id' class="btn btn-sm btn-primary">New</a>
+ <a href='{{ route('modal.show',['type' => 'category', 'category_type' => isset($category_type) ? $category_type : 'assets' ]) }}' data-toggle="modal" data-target="#createModal" data-select='category_select_id' class="btn btn-sm btn-primary">{{ trans('button.new') }}</a>
@endif
@endcan
</div>
diff --git a/resources/views/partials/forms/edit/image-upload.blade.php b/resources/views/partials/forms/edit/image-upload.blade.php
index 7a69926b38..c30c03082b 100644
--- a/resources/views/partials/forms/edit/image-upload.blade.php
+++ b/resources/views/partials/forms/edit/image-upload.blade.php
@@ -14,7 +14,7 @@
{!! $errors->first('image', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
<div class="col-md-4 col-md-offset-3" aria-hidden="true">
- <img id="uploadFile-imagePreview" style="max-width: 200px; display: none;" alt="Uploaded image thumbnail">
+ <img id="uploadFile-imagePreview" style="max-width: 200px; display: none;" alt="{{ trans('partials/forms/general.alt_uploaded_image_thumbnail') }}">
</div>
</div>
diff --git a/resources/views/partials/forms/edit/kit-select.blade.php b/resources/views/partials/forms/edit/kit-select.blade.php
index f5c62caac1..9db93eebb5 100644
--- a/resources/views/partials/forms/edit/kit-select.blade.php
+++ b/resources/views/partials/forms/edit/kit-select.blade.php
@@ -3,13 +3,13 @@
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
<div class="col-md-7{{ ((isset($required)) && ($required=='true')) ? ' required' : '' }}">
- <select class="js-data-ajax" data-endpoint="kits" data-placeholder="Select a kit{{-- TODO: trans --}}" name="{{ $fieldname }}" style="width: 100%" id="kit_id_select">
+ <select class="js-data-ajax" data-endpoint="kits" data-placeholder="{{ trans('partials/forms/general.placeholder_kit') }}" name="{{ $fieldname }}" style="width: 100%" id="kit_id_select">
@if ($kit_id = Request::old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
<option value="{{ $kit_id }}" selected="selected">
{{ (\App\Models\User::find($kit_id)) ? \App\Models\User::find($kit_id)->present()->fullName : '' }}
</option>
@else
- <option value="">Select a kit{{-- TODO: trans --}}</option>
+ <option value="">{{ trans('partials/forms/general.placeholder_kit') }}</option>
@endif
</select>
</div>
@@ -17,7 +17,7 @@
<div class="col-md-1 col-sm-1 text-left">
@can('create', \App\Models\PredefinedKit::class)
@if ((!isset($hide_new)) || ($hide_new!='true'))
- {{-- <a href='{{ route('modal.show, 'kit') }}' data-toggle="modal" data-target="#createModal" data-select='kit_id_select' class="btn btn-sm btn-default">New</a> --}}
+ {{-- <a href='{{ route('modal.show, 'kit') }}' data-toggle="modal" data-target="#createModal" data-select='kit_id_select' class="btn btn-sm btn-default">{{ trans('buttons.new') }}</a> --}}
@endif
@endcan
</div>
diff --git a/resources/views/partials/forms/edit/location-select.blade.php b/resources/views/partials/forms/edit/location-select.blade.php
index 2c3741ee58..b3147392db 100644
--- a/resources/views/partials/forms/edit/location-select.blade.php
+++ b/resources/views/partials/forms/edit/location-select.blade.php
@@ -17,7 +17,7 @@
<div class="col-md-1 col-sm-1 text-left">
@can('create', \App\Models\Location::class)
@if ((!isset($hide_new)) || ($hide_new!='true'))
- <a href='{{ route('modal.show', 'location') }}' data-toggle="modal" data-target="#createModal" data-select='{{ $fieldname }}_location_select' class="btn btn-sm btn-primary">New</a>
+ <a href='{{ route('modal.show', 'location') }}' data-toggle="modal" data-target="#createModal" data-select='{{ $fieldname }}_location_select' class="btn btn-sm btn-primary">{{ trans('general.new') }}</a>
@endif
@endcan
</div>
diff --git a/resources/views/partials/forms/edit/manufacturer-select.blade.php b/resources/views/partials/forms/edit/manufacturer-select.blade.php
index d51f4ff1cb..900adf9d70 100644
--- a/resources/views/partials/forms/edit/manufacturer-select.blade.php
+++ b/resources/views/partials/forms/edit/manufacturer-select.blade.php
@@ -19,7 +19,7 @@
<div class="col-md-1 col-sm-1 text-left">
@can('create', \App\Models\Manufacturer::class)
@if ((!isset($hide_new)) || ($hide_new!='true'))
- <a href='{{ route('modal.show', 'manufacturer') }}' data-toggle="modal" data-target="#createModal" data-select='manufacturer_select_id' class="btn btn-sm btn-primary">New</a>
+ <a href='{{ route('modal.show', 'manufacturer') }}' data-toggle="modal" data-target="#createModal" data-select='manufacturer_select_id' class="btn btn-sm btn-primary">{{ trans('button.new') }}</a>
@endif
@endcan
</div>
diff --git a/resources/views/partials/forms/edit/model-select.blade.php b/resources/views/partials/forms/edit/model-select.blade.php
index c8f8e5557e..ee2147cc07 100644
--- a/resources/views/partials/forms/edit/model-select.blade.php
+++ b/resources/views/partials/forms/edit/model-select.blade.php
@@ -18,7 +18,7 @@
<div class="col-md-1 col-sm-1 text-left">
@can('create', \App\Models\AssetModel::class)
@if ((!isset($hide_new)) || ($hide_new!='true'))
- <a href='{{ route('modal.show', 'model') }}' data-toggle="modal" data-target="#createModal" data-select='model_select_id' class="btn btn-sm btn-primary">New</a>
+ <a href='{{ route('modal.show', 'model') }}' data-toggle="modal" data-target="#createModal" data-select='model_select_id' class="btn btn-sm btn-primary">{{ trans('button.new') }}</a>
<span class="mac_spinner" style="padding-left: 10px; color: green; display:none; width: 30px;">
<i class="fas fa-spinner fa-spin" aria-hidden="true"></i>
</span>
diff --git a/resources/views/partials/forms/edit/status.blade.php b/resources/views/partials/forms/edit/status.blade.php
index 05eec2997a..fe82ebf688 100644
--- a/resources/views/partials/forms/edit/status.blade.php
+++ b/resources/views/partials/forms/edit/status.blade.php
@@ -8,7 +8,7 @@
<div class="col-md-2 col-sm-2 text-left">
@can('create', \App\Models\Statuslabel::class)
- <a href='{{ route('modal.show', 'statuslabel') }}' data-toggle="modal" data-target="#createModal" data-select='status_select_id' class="btn btn-sm btn-primary">New</a>
+ <a href='{{ route('modal.show', 'statuslabel') }}' data-toggle="modal" data-target="#createModal" data-select='status_select_id' class="btn btn-sm btn-primary">{{ trans('button.new') }}</a>
@endcan
<span class="status_spinner" style="padding-left: 10px; color: green; display:none; width: 30px;"><i class="fas fa-spinner fa-spin" aria-hidden="true"></i> </span>
diff --git a/resources/views/partials/forms/edit/supplier-select.blade.php b/resources/views/partials/forms/edit/supplier-select.blade.php
index e93febcbb9..829d0a9c27 100644
--- a/resources/views/partials/forms/edit/supplier-select.blade.php
+++ b/resources/views/partials/forms/edit/supplier-select.blade.php
@@ -17,7 +17,7 @@
<div class="col-md-1 col-sm-1 text-left">
@can('create', \App\Models\Supplier::class)
@if ((!isset($hide_new)) || ($hide_new!='true'))
- <a href='{{ route('modal.show', 'supplier') }}' data-toggle="modal" data-target="#createModal" data-select='supplier_select' class="btn btn-sm btn-primary">New</a>
+ <a href='{{ route('modal.show', 'supplier') }}' data-toggle="modal" data-target="#createModal" data-select='supplier_select' class="btn btn-sm btn-primary">{{ trans('button.new') }}</a>
@endif
@endcan
</div>
diff --git a/resources/views/partials/forms/edit/supplier.blade.php b/resources/views/partials/forms/edit/supplier.blade.php
index e3f1066724..9883dc5c11 100644
--- a/resources/views/partials/forms/edit/supplier.blade.php
+++ b/resources/views/partials/forms/edit/supplier.blade.php
@@ -6,6 +6,6 @@
{!! $errors->first('supplier_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
<div class="col-md-1 col-sm-1 text-left">
- <a href='{{ route('modal.show', 'supplier') }}' data-toggle="modal" data-target="#createModal" data-dependency="supplier" data-select='supplier_select_id' class="btn btn-sm btn-primary">New</a>
+ <a href='{{ route('modal.show', 'supplier') }}' data-toggle="modal" data-target="#createModal" data-dependency="supplier" data-select='supplier_select_id' class="btn btn-sm btn-primary">{{ trans('button.new') }}</a>
</div>
</div>
diff --git a/resources/views/partials/forms/edit/user-select.blade.php b/resources/views/partials/forms/edit/user-select.blade.php
index 18cb08fd70..6283f37467 100644
--- a/resources/views/partials/forms/edit/user-select.blade.php
+++ b/resources/views/partials/forms/edit/user-select.blade.php
@@ -17,7 +17,7 @@
<div class="col-md-1 col-sm-1 text-left">
@can('create', \App\Models\User::class)
@if ((!isset($hide_new)) || ($hide_new!='true'))
- <a href='{{ route('modal.show', 'user') }}' data-toggle="modal" data-target="#createModal" data-select='assigned_user_select' class="btn btn-sm btn-primary">New</a>
+ <a href='{{ route('modal.show', 'user') }}' data-toggle="modal" data-target="#createModal" data-select='assigned_user_select' class="btn btn-sm btn-primary">{{ trans('button.new') }}</a>
@endif
@endcan
</div>
diff --git a/resources/views/partials/more-info.blade.php b/resources/views/partials/more-info.blade.php
index e77ddb2221..b45cbf3179 100644
--- a/resources/views/partials/more-info.blade.php
+++ b/resources/views/partials/more-info.blade.php
@@ -1,3 +1,3 @@
<a style="padding-left: 10px; font-size: 18px;" class="text-dark-gray" data-trigger="focus" tabindex="0" role="button" data-toggle="popover" title="More Info" data-placement="right" data-html="true" data-content="{{ (isset($helpText)) ? $helpText : 'Help Info Missing' }}">
- <i class="far fa-life-ring" aria-hidden="true"><span class="sr-only">More Info</span></i>
+ <i class="far fa-life-ring" aria-hidden="true"><span class="sr-only">{{ trans('general.moreinfo')) }}</span></i>
</a>