mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Merge pull request #15318 from snipe/localization/fixed_strings
Corrected some translations
This commit is contained in:
commit
ea2b1b0748
|
@ -246,7 +246,7 @@ class PredefinedKitsController extends Controller
|
|||
|
||||
$relation = $kit->models();
|
||||
if ($relation->find($model_id)) {
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, ['model' => 'Model already attached to kit']));
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, ['model' => trans('admin/kits/general.model_already_attached')]));
|
||||
}
|
||||
$relation->attach($model_id, ['quantity' => $quantity]);
|
||||
|
||||
|
|
|
@ -62,10 +62,10 @@ class CheckoutKitController extends Controller
|
|||
|
||||
$checkout_result = $this->kitService->checkout($request, $kit, $user);
|
||||
if (Arr::has($checkout_result, 'errors') && count($checkout_result['errors']) > 0) {
|
||||
return redirect()->back()->with('error', trans('general.checkout_error'))->with('error_messages', $checkout_result['errors']);
|
||||
return redirect()->back()->with('error', trans('admin/kits/general.checkout_error'))->with('error_messages', $checkout_result['errors']);
|
||||
}
|
||||
|
||||
return redirect()->back()->with('success', trans('general.checkout_success'))
|
||||
return redirect()->back()->with('success', trans('admin/kits/general.checkout_success'))
|
||||
->with('assets', Arr::get($checkout_result, 'assets', null))
|
||||
->with('accessories', Arr::get($checkout_result, 'accessories', null))
|
||||
->with('consumables', Arr::get($checkout_result, 'consumables', null));
|
||||
|
|
|
@ -48,6 +48,7 @@ class Kernel extends HttpKernel
|
|||
|
||||
'api' => [
|
||||
'auth:api',
|
||||
\App\Http\Middleware\CheckLocale::class,
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
];
|
||||
|
|
|
@ -86,7 +86,7 @@ class AssetsTransformer
|
|||
'next_audit_date' => Helper::getFormattedDateObject($asset->next_audit_date, 'date'),
|
||||
'deleted_at' => Helper::getFormattedDateObject($asset->deleted_at, 'datetime'),
|
||||
'purchase_date' => Helper::getFormattedDateObject($asset->purchase_date, 'date'),
|
||||
'age' => $asset->purchase_date ? $asset->purchase_date->diffForHumans() : '',
|
||||
'age' => $asset->purchase_date ? $asset->purchase_date->locale(app()->getLocale())->diffForHumans() : '',
|
||||
'last_checkout' => Helper::getFormattedDateObject($asset->last_checkout, 'datetime'),
|
||||
'last_checkin' => Helper::getFormattedDateObject($asset->last_checkin, 'datetime'),
|
||||
'expected_checkin' => Helper::getFormattedDateObject($asset->expected_checkin, 'date'),
|
||||
|
|
|
@ -47,4 +47,5 @@ return [
|
|||
'kit_deleted' => 'Kit was successfully deleted',
|
||||
'kit_model_updated' => 'Model was successfully updated',
|
||||
'kit_model_detached' => 'Model was successfully detached',
|
||||
'model_already_attached' => 'Model already attached to kit',
|
||||
];
|
||||
|
|
|
@ -426,7 +426,7 @@ return [
|
|||
'assets_by_status_type' => 'Assets by Status Type',
|
||||
'pie_chart_type' => 'Dashboard Pie Chart Type',
|
||||
'hello_name' => 'Hello, :name!',
|
||||
'unaccepted_profile_warning' => 'You have :count items requiring acceptance. Click here to accept or decline them',
|
||||
'unaccepted_profile_warning' => 'You have one item requiring acceptance. Click here to accept or decline it | You have :count items requiring acceptance. Click here to accept or decline them',
|
||||
'start_date' => 'Start Date',
|
||||
'end_date' => 'End Date',
|
||||
'alt_uploaded_image_thumbnail' => 'Uploaded thumbnail',
|
||||
|
@ -559,5 +559,6 @@ return [
|
|||
'expires' => 'Expires',
|
||||
'map_fields'=> 'Map :item_type Field',
|
||||
'remaining_var' => ':count Remaining',
|
||||
'assets_in_var' => 'Assets in :name :type',
|
||||
|
||||
];
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
<strong>
|
||||
<a href="{{ route('account.accept') }}" style="color: white;">
|
||||
{{ trans('general.unaccepted_profile_warning', array('count' => $acceptances)) }}
|
||||
{{ trans_choice('general.unaccepted_profile_warning', $acceptances, ['count' => $acceptances]) }}
|
||||
</a>
|
||||
</strong>
|
||||
</div>
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
{{-- Page title --}}
|
||||
@section('title')
|
||||
|
||||
{{ $category->name }}
|
||||
{{ ucwords($category_type_route) }}
|
||||
{{ trans('general.assets_in_var', ['name'=> $category->name, 'type' => trans('general.category')]) }}
|
||||
|
||||
@parent
|
||||
@stop
|
||||
|
|
|
@ -132,7 +132,7 @@
|
|||
:button_label="trans('general.checkin')"
|
||||
:disabled_select="!$asset->model"
|
||||
:options="[
|
||||
'index' => trans('admin/hardware/form.redirect_to_all', ['type' => 'assets']),
|
||||
'index' => trans('admin/hardware/form.redirect_to_all', ['type' => trans('general.assets')]),
|
||||
'item' => trans('admin/hardware/form.redirect_to_type', ['type' => trans('general.asset')]),
|
||||
]"
|
||||
/>
|
||||
|
|
|
@ -180,7 +180,7 @@
|
|||
:button_label="trans('general.checkout')"
|
||||
:disabled_select="!$asset->model"
|
||||
:options="[
|
||||
'index' => trans('admin/hardware/form.redirect_to_all', ['type' => 'assets']),
|
||||
'index' => trans('admin/hardware/form.redirect_to_all', ['type' => trans('general.assets')]),
|
||||
'item' => trans('admin/hardware/form.redirect_to_type', ['type' => trans('general.asset')]),
|
||||
'target' => trans('admin/hardware/form.redirect_to_checked_out_to'),
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
Attempted Logins
|
||||
{{ trans('admin/settings/general.login') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
|
|
|
@ -373,7 +373,7 @@
|
|||
</button>
|
||||
</div>
|
||||
|
||||
<table style="margin-top: 80px;">
|
||||
<table style="margin-top: 80px;" class="snipe-table">
|
||||
<tr class="collapse" id="eula-row">
|
||||
<td style="padding-right: 10px; vertical-align: top; font-weight: bold;">EULA</td>
|
||||
<td style="padding-right: 10px; vertical-align: top; padding-bottom: 80px;" colspan="3">
|
||||
|
@ -395,8 +395,8 @@
|
|||
</tr>
|
||||
<tr style="height: 80px;">
|
||||
<td></td>
|
||||
<td style="padding-right: 10px; vertical-align: top;">Name</td>
|
||||
<td style="padding-right: 10px; vertical-align: top;">Signature</td>
|
||||
<td style="padding-right: 10px; vertical-align: top;">{{ trans('general.name') }}</td>
|
||||
<td style="padding-right: 10px; vertical-align: top;">{{ trans('general.signature') }}</td>
|
||||
<td style="padding-right: 10px; vertical-align: top;">{{ trans('general.date') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -407,8 +407,8 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td style="padding-right: 10px; vertical-align: top;">Name</td>
|
||||
<td style="padding-right: 10px; vertical-align: top;">Signature</td>
|
||||
<td style="padding-right: 10px; vertical-align: top;">{{ trans('general.name') }}</td>
|
||||
<td style="padding-right: 10px; vertical-align: top;">{{ trans('general.signature') }}</td>
|
||||
<td style="padding-right: 10px; vertical-align: top;">{{ trans('general.date') }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -419,6 +419,10 @@
|
|||
<script src="{{ url(mix('js/dist/all.js')) }}" nonce="{{ csrf_token() }}"></script>
|
||||
|
||||
<script src="{{ url(mix('js/dist/bootstrap-table.js')) }}"></script>
|
||||
<script src="{{ url(mix('js/dist/bootstrap-table-locale-all.min.js')) }}"></script>
|
||||
|
||||
<!-- load english again here, even though it's in the all.js file, because if BS table doesn't have the translation, it otherwise defaults to chinese. See https://bootstrap-table.com/docs/api/table-options/#locale -->
|
||||
<script src="{{ url(mix('js/dist/bootstrap-table-en-US.min.js')) }}"></script>
|
||||
|
||||
<script>
|
||||
$('.snipe-table').bootstrapTable('destroy').each(function () {
|
||||
|
|
Loading…
Reference in a new issue