Skip to content

Commit

Permalink
Added localized strings for hardware
Browse files Browse the repository at this point in the history
  • Loading branch information
nuraeil committed Nov 2, 2021
1 parent 167bf97 commit c16ade2
Show file tree
Hide file tree
Showing 15 changed files with 80 additions and 51 deletions.
6 changes: 6 additions & 0 deletions resources/lang/en/admin/hardware/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,10 @@
'warranty' => 'Warranty',
'warranty_expires' => 'Warranty Expires',
'years' => 'years',
'asset_location' => 'Update Asset Location',
'asset_location_update_default_current' => 'Update default location AND actual location',
'asset_location_update_default' => 'Update only default location',
'asset_not_deployable' => 'That asset status is not deployable. This asset cannot be checked out.',
'asset_deployable' => 'That status is deployable. This asset can be checked out.',
'processing_spinner' => 'Processing...',
];
19 changes: 19 additions & 0 deletions resources/lang/en/admin/hardware/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,23 @@
'pending' => 'Pending',
'undeployable' => 'Undeployable',
'view' => 'View Asset',
'csv_error' => 'You have an error in your CSV file:',
'import_text' => '
<p>
Upload a CSV that contains asset history. The assets and users MUST already exist in the system, or they will be skipped. Matching assets for history import happens against the asset tag. We will try to find a matching user based on the user\'s name you provide, and the criteria you select below. If you do not select any criteria below, it will simply try to match on the username format you configured in the Admin &gt; General Settings.
</p>
<p>Fields included in the CSV must match the headers: <strong>Asset Tag, Name, Checkout Date, Checkin Date</strong>. Any additional fields will be ignored. </p>
<p>Checkin Date: blank or future checkin dates will checkout items to associated user. Excluding the Checkin Date column will create a checkin date with todays date.</p>
',
'csv_import_match_f-l' => 'Try to match users by firstname.lastname (jane.smith) format',
'csv_import_match_initial_last' => 'Try to match users by first initial last name (jsmith) format',
'csv_import_match_first' => 'Try to match users by first name (jane) format',
'csv_import_match_email' => 'Try to match users by email as username',
'csv_import_match_username' => 'Try to match users by username',
'error_messages' => 'Error messages:',
'success_messages' => 'Success messages:',
'alert_details' => 'Please see below for details.',
'custom_export' => 'Custom Export'
];
8 changes: 6 additions & 2 deletions resources/lang/en/admin/hardware/table.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@
'serial' => 'Serial',
'status' => 'Status',
'title' => 'Asset ',
'image' => 'Device Image',
'image' => 'Device Image',
'days_without_acceptance' => 'Days Without Acceptance',
'monthly_depreciation' => 'Monthly Depreciation',

'assigned_to' => 'Assigned To',
'requesting_user' => 'Requesting User',
'requested_date' => 'Requested Date',
'changed' => 'Changed',
'icon' => 'Icon',
];
2 changes: 2 additions & 0 deletions resources/lang/en/button.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@
'generate_labels' => '{1} Generate Label|[2,*] Generate Labels',
'send_password_link' => 'Send Password Reset Link',
'go' => 'Go',
'bulk_actions' => 'Bulk Actions',
'add_maintenance' => 'Add Maintenance',
];
4 changes: 4 additions & 0 deletions resources/lang/en/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
'details' => 'Details',
'download' => 'Download',
'download_all' => 'Download All',
'edit' => 'Edit',
'editprofile' => 'Edit Your Profile',
'eol' => 'EOL',
'email_domain' => 'Email Domain',
Expand All @@ -110,6 +111,7 @@
'file_type' => 'File Type',
'file_uploads' => 'File Uploads',
'generate' => 'Generate',
'generate_labels' => 'Generate Labels',
'github_markdown' => 'This field accepts <a href="https://help.github.com/articles/github-flavored-markdown/">Github flavored markdown</a>.',
'groups' => 'Groups',
'gravatar_email' => 'Gravatar Email Address',
Expand Down Expand Up @@ -213,6 +215,7 @@
'sign_in' => 'Sign in',
'signature' => 'Signature',
'skin' => 'Skin',
'slack_msg_note' => 'A slack message will be sent',
'slack_test_msg' => 'Oh hai! Looks like your Slack integration with Snipe-IT is working!',
'some_features_disabled' => 'DEMO MODE: Some features are disabled for this installation.',
'site_name' => 'Site Name',
Expand Down Expand Up @@ -265,4 +268,5 @@
'view_all' => 'view all',
'hide_deleted' => 'Hide Deleted',
'email' => 'Email',
'do_not_change' => 'Do Not Change',
];
2 changes: 1 addition & 1 deletion resources/views/hardware/audit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<div class="form-group">
<div class="col-sm-offset-3 col-md-9">
<label>
<input type="checkbox" value="1" name="update_location" class="minimal" {{ Request::old('update_location') == '1' ? ' checked="checked"' : '' }}> Update asset location
<input type="checkbox" value="1" name="update_location" class="minimal" {{ Request::old('update_location') == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/hardware/form.asset_location') }}
</label>

@include ('partials.more-info', ['helpText' => trans('help.audit_help'), 'helpPosition' => 'right'])
Expand Down
10 changes: 5 additions & 5 deletions resources/views/hardware/bulk-delete.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
<thead>
<tr>
<td></td>
<td>ID</td>
<td>Name</td>
<td>Location</td>
<td>Assigned To</td>
<td>{{ trans('admin/hardware/table.id') }}</td>
<td>{{ trans('admin/hardware/table.name') }}</td>
<td>{{ trans('admin/hardware/table.location')}}</td>
<td>{{ trans('admin/hardware/table.assigned_to') }}</td>
</tr>
</thead>
<tbody>
Expand All @@ -59,7 +59,7 @@

<div class="box-footer text-right">
<a class="btn btn-link" href="{{ URL::previous() }}" method="post" enctype="multipart/form-data">{{ trans('button.cancel') }}</a>
<button type="submit" class="btn btn-success" id="submit-button"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.delete') }}</button>
<button type="submit" class="btn btn-success" id="submit-button"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('button.delete') }}</button>
</div><!-- /.box-footer -->
</div><!-- /.box -->
</form>
Expand Down
10 changes: 5 additions & 5 deletions resources/views/hardware/bulk.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@

<label for="update_real_loc">
{{ Form::radio('update_real_loc', '1', old('update_real_loc'), ['class'=>'minimal', 'aria-label'=>'update_real_loc']) }}
Update default location AND actual location
{{ trans('admin/hardware/form.asset_location_update_default_current') }}
</label>
<br>
<label for="update_default_loc">
{{ Form::radio('update_real_loc', '0', old('update_real_loc'), ['class'=>'minimal', 'aria-label'=>'update_default_loc']) }}
Update only default location
{{ trans('admin/hardware/form.asset_location_update_default') }}
</label>

</div>
Expand Down Expand Up @@ -137,13 +137,13 @@
</div>
<div class="col-md-7">
<label class="radio">
<input type="radio" class="minimal" name="requestable" value="1"> Yes
<input type="radio" class="minimal" name="requestable" value="1"> {{ trans('general.yes')}}
</label>
<label class="radio">
<input type="radio" class="minimal" name="requestable" value="0"> No
<input type="radio" class="minimal" name="requestable" value="0"> {{ trans('general.no')}}
</label>
<label class="radio">
<input type="radio" class="minimal" name="requestable" value=""> Do Not Change
<input type="radio" class="minimal" name="requestable" value=""> {{ trans('general.do_not_change')}}
</label>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/hardware/checkout.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@

@if ($snipeSettings->slack_endpoint!='')
<i class="fab fa-slack" aria-hidden="true"></i>
A slack message will be sent
{{ trans('general.slack_msg_note')}}
@endif
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/hardware/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ function user_add(status_id) {
$("#selected_status_status").removeClass('text-danger');
$("#selected_status_status").removeClass('text-warning');
$("#selected_status_status").addClass('text-success');
$("#selected_status_status").html('<i class="fas fa-check"></i> That status is deployable. This asset can be checked out.');
$("#selected_status_status").html('<i class="fas fa-check"></i> {{ trans('admin/hardware/form.asset_deployable')}}');
} else {
$("#assignto_selector").hide();
$("#selected_status_status").removeClass('text-danger');
$("#selected_status_status").removeClass('text-success');
$("#selected_status_status").addClass('text-warning');
$("#selected_status_status").html('<i class="fas fa-exclamation-triangle"></i> That asset status is not deployable. This asset cannot be checked out. ');
$("#selected_status_status").html('<i class="fas fa-exclamation-triangle"></i> {{ trans('admin/hardware/form.asset_not_deployable')}} ');
}
}
});
Expand Down
34 changes: 14 additions & 20 deletions resources/views/hardware/history.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{{-- Page title --}}
@section('title')
Import History
{{ trans('general.import-history') }}
@parent
@stop

Expand All @@ -22,8 +22,8 @@
<div class="box box-default">
<div class="alert alert-danger">
<i class="fas fa-exclamation-triangle faa-pulse animated"></i>
<strong>{{ count($status['error']) }} Error Messagess: </strong>
Please see below for errors.
<strong>{{ count($status['error']) }} {{ trans('admin/hardware/general.error_messages') }}</strong> </strong>
{{ trans('admin/hardware/general.alert_details') }}
</div>
</div>
</div>
Expand All @@ -35,8 +35,8 @@
<div class="box box-default">
<div class="alert alert-success">
<i class="fas fa-check faa-pulse animated"></i>
<strong>{{ count($status['success']) }} Success Messages: </strong>
Please see below for details.
<strong>{{ count($status['success']) }} {{ trans('admin/hardware/general.success_messages') }} </strong>
{{ trans('admin/hardware/general.alert_details') }}
</div>
</div>
</div>
Expand All @@ -55,18 +55,12 @@

@if (Session::get('message'))
<p class="alert-danger">
You have an error in your CSV file:<br />
{{ trans('admin/hardware/general.csv_error') }}<br />
{{ Session::get('message') }}
</p>
@endif

<p>
Upload a CSV that contains asset history. The assets and users MUST already exist in the system, or they will be skipped. Matching assets for history import happens against the asset tag. We will try to find a matching user based on the user's name you provide, and the criteria you select below. If you do not select any criteria below, it will simply try to match on the username format you configured in the Admin &gt; General Settings.
</p>

<p>Fields included in the CSV must match the headers: <strong>Asset Tag, Name, Checkout Date, Checkin Date</strong>. Any additional fields will be ignored. </p>

<p>Checkin Date: blank or future checkin dates will checkout items to associated user. Excluding the Checkin Date column will create a checkin date with todays date.</p>
{!! trans('admin/hardware/general.import_text') !!}

<div class="form-group">
<label for="first_name" class="col-sm-3 control-label">{{ trans('admin/users/general.usercsv') }}</label>
Expand All @@ -86,7 +80,7 @@
<div class="col-sm-2">
</div>
<div class="col-sm-10">
{{ Form::checkbox('match_firstnamelastname', '1', Request::old('match_firstnamelastname')) }} Try to match users by firstname.lastname (jane.smith) format
{{ Form::checkbox('match_firstnamelastname', '1', Request::old('match_firstnamelastname')) }} {{ trans('admin/hardware/general.csv_import_match_f-l') }}
</div>
</div>

Expand All @@ -95,7 +89,7 @@
<div class="col-sm-2">
</div>
<div class="col-sm-10">
{{ Form::checkbox('match_flastname', '1', Request::old('match_flastname')) }} Try to match users by first initial last name (jsmith) format
{{ Form::checkbox('match_flastname', '1', Request::old('match_flastname')) }} {{ trans('admin/hardware/general.csv_import_match_initial_last') }}
</div>
</div>

Expand All @@ -104,7 +98,7 @@
<div class="col-sm-2">
</div>
<div class="col-sm-10">
{{ Form::checkbox('match_firstname', '1', Request::old('match_firstname')) }} Try to match users by first name (jane) format
{{ Form::checkbox('match_firstname', '1', Request::old('match_firstname')) }} {{ trans('admin/hardware/general.csv_import_match_first') }}
</div>
</div>

Expand All @@ -113,7 +107,7 @@
<div class="col-sm-2">
</div>
<div class="col-sm-10">
{{ Form::checkbox('match_email', '1', Request::old('match_email')) }} Try to match users by email as username
{{ Form::checkbox('match_email', '1', Request::old('match_email')) }} {{ trans('admin/hardware/general.csv_import_match_email') }}
</div>
</div>

Expand All @@ -122,7 +116,7 @@
<div class="col-sm-2">
</div>
<div class="col-sm-10">
{{ Form::checkbox('match_username', '1', Request::old('match_username')) }} Try to match users by username
{{ Form::checkbox('match_username', '1', Request::old('match_username')) }} {{ trans('admin/hardware/general.csv_import_match_username') }}
</div>
</div>

Expand Down Expand Up @@ -158,7 +152,7 @@
<div class="col-md-12">
<div class="box box-default">
<div class="box-header with-border">
<h2 class="box-title"> {{ count($status['error']) }} Error Messages </h2>
<h2 class="box-title"> {{ count($status['error']) }} {{ trans('admin/hardware/general.error_messages') }} </h2>
</div>
<div class="box-body">
<div style="height : 400px; overflow : auto;">
Expand All @@ -185,7 +179,7 @@
<div class="col-md-12">
<div class="box box-default">
<div class="box-header with-border">
<h2 class="box-title"> {{ count($status['success']) }} Success Messages </h2>
<h2 class="box-title"> {{ count($status['success']) }} {{ trans('admin/hardware/general.success_messages') }} </h2>
</div>
<div class="box-body">
<div style="height : 400px; overflow : auto;">
Expand Down
6 changes: 3 additions & 3 deletions resources/views/hardware/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

@section('header_right')
<a href="{{ route('reports/custom') }}" style="margin-right: 5px;" class="btn btn-default">
Custom Export</a>
{{ trans('admin/hardware/general.custom_export') }}</a>
@can('create', \App\Models\Asset::class)
<a href="{{ route('hardware.create') }}" class="btn btn-primary pull-right"></i> {{ trans('general.create') }}</a>
@endcan
Expand Down Expand Up @@ -73,14 +73,14 @@
'id' => 'bulkForm']) }}


<label for="bulk_actions"><span class="sr-only">Bulk Actions</span></label>
<label for="bulk_actions"><span class="sr-only">{{ trans('button.bulk_actions') }}</span></label>
<select name="bulk_actions" class="form-control select2" aria-label="bulk_actions">
<option value="edit">{{ trans('button.edit') }}</option>
<option value="delete">{{ trans('button.delete') }}</option>
<option value="labels">{{ trans_choice('button.generate_labels', 2) }}</option>
</select>

<button class="btn btn-primary" id="bulkEdit" disabled>Go</button>
<button class="btn btn-primary" id="bulkEdit" disabled>{{ trans('button.go') }}</button>
{{ Form::close() }}
</div>

Expand Down
4 changes: 2 additions & 2 deletions resources/views/hardware/quickscan.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<div class="form-group">
<div class="col-sm-offset-3 col-md-9">
<label>
<input type="checkbox" value="1" name="update_location" class="minimal" {{ Request::old('update_location') == '1' ? ' checked="checked"' : '' }}> Update asset location
<input type="checkbox" value="1" name="update_location" class="minimal" {{ Request::old('update_location') == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/hardware/form.asset_location') }}
</label> <a href="#" class="text-dark-gray" tabindex="0" role="button" data-toggle="popover" data-trigger="focus" title="<i class='far fa-life-ring'></i> More Info" data-html="true" data-content="Checking this box will edit the asset record to reflect this new location. Leaving it unchecked will simply note the location in the audit log.<br><br>Note that is this asset is checked out, it will not change the location of the person, asset or location it is checked out to."><i class="far fa-life-ring"></i></a>
</div>
</div>
Expand Down Expand Up @@ -112,7 +112,7 @@
</tr>
<tr id="audit-loader" style="display: none;">
<td colspan="3">
<i class="fas fa-spinner spin" aria-hidden="true"></i> Processing...
<i class="fas fa-spinner spin" aria-hidden="true"></i> {{ trans('admin/hardware/form.processing_spinner') }}
</td>
</tr>
</thead>
Expand Down
Loading

0 comments on commit c16ade2

Please sign in to comment.