Skip to content

A free open source IT asset/license management system

Updated language strings in view

snipeb135c1eac276
diff --git a/app/Http/Transformers/DepreciationsTransformer.php b/app/Http/Transformers/DepreciationsTransformer.php
index 2ccbfdb7cd..c3002a6969 100644
--- a/app/Http/Transformers/DepreciationsTransformer.php
+++ b/app/Http/Transformers/DepreciationsTransformer.php
@@ -26,7 +26,7 @@ class DepreciationsTransformer
$array = [
'id' => (int) $depreciation->id,
'name' => e($depreciation->name),
- 'months' => trans_choice('general.depreciation_options.months', $depreciation->months),
+ 'months' => trans_choice('general.months_plural', $depreciation->months),
'depreciation_min' => $depreciation->depreciation_type === 'percent' ? $depreciation->depreciation_min.'%' : $depreciation->depreciation_min,
'assets_count' => $depreciation->assets_count,
'models_count' => $depreciation->models_count,
diff --git a/resources/lang/en-US/general.php b/resources/lang/en-US/general.php
index 6f99d8a2f7..138232b6b3 100644
--- a/resources/lang/en-US/general.php
+++ b/resources/lang/en-US/general.php
@@ -662,8 +662,9 @@ return [
'depreciation_options' => [
'amount' => 'Amount',
'percent' => 'Percentage',
- 'months' => '1 month|:count months',
],
+ 'months_plural' => '1 month|:count months',
+
];
diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php
index d0906da8be..c34fafbedd 100755
--- a/resources/views/hardware/view.blade.php
+++ b/resources/views/hardware/view.blade.php
@@ -903,9 +903,7 @@
</strong>
</div>
<div class="col-md-9">
- {{ $asset->warranty_months }}
- {{ trans('admin/hardware/form.months') }}
-
+ {{ trans_choice('general.months_plural', $asset->warranty_months) }}
@if (($asset->model) && ($asset->model->manufacturer) && ($asset->model->manufacturer->warranty_lookup_url!=''))
<a href="{{ $asset->present()->dynamicUrl($asset->model->manufacturer->warranty_lookup_url) }}" target="_blank">
<x-icon type="external-link" />
@@ -947,8 +945,7 @@
</div>
<div class="col-md-9">
{{ $asset->depreciation->name }}
- ({{ $asset->depreciation->months }}
- {{ trans('admin/hardware/form.months') }})
+ ({{ trans_choice('general.months_plural', $asset->depreciation->months) }})
</div>
</div>
<div class="row">