From 65c2d75c0462d88704eeb83854b7f3f0853ef583 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 8 Mar 2023 13:47:38 -0800 Subject: [PATCH 1/2] Added aliases Signed-off-by: snipe --- app/Http/Livewire/ImporterFile.php | 32 ++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/app/Http/Livewire/ImporterFile.php b/app/Http/Livewire/ImporterFile.php index e67f37f49..da0c723fd 100644 --- a/app/Http/Livewire/ImporterFile.php +++ b/app/Http/Livewire/ImporterFile.php @@ -106,8 +106,36 @@ class ImporterFile extends Component //array of "real fieldnames" to a list of aliases for that field static $aliases = [ - 'model_number' => ['model', 'model no','model no.','model number', 'model num', 'model num.'], - 'warranty_months' => ['Warranty', 'Warranty Months'] + 'model_number' => + [ + 'model', + 'model no', + 'model no.', + 'model number', + 'model num', + 'model num.' + ], + 'warranty_months' => + [ + 'Warranty', + 'Warranty Months' + ], + 'qty' => + [ + 'QTY', + 'Quantity' + ], + 'min_amt' => + [ + 'Min Amount', + 'Min QTY' + ], + 'next_audit_date' => + [ + 'Next Audit', + ], + + ]; private function getColumns($type) From b8887bd3e3382fbed2c882b6bae37e97e4218ef1 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 8 Mar 2023 13:47:56 -0800 Subject: [PATCH 2/2] Translated strings Signed-off-by: snipe --- app/Http/Livewire/ImporterFile.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Http/Livewire/ImporterFile.php b/app/Http/Livewire/ImporterFile.php index da0c723fd..b2e5c6c8d 100644 --- a/app/Http/Livewire/ImporterFile.php +++ b/app/Http/Livewire/ImporterFile.php @@ -214,12 +214,12 @@ class ImporterFile extends Component public function mount() { $this->importTypes = [ - 'asset' => 'Assets', // TODO - translate! - 'accessory' => 'Accessories', - 'consumable' => 'Consumables', - 'component' => 'Components', - 'license' => 'Licenses', - 'user' => 'Users' + 'asset' => trans('general.assets'), + 'accessory' => trans('general.accessories'), + 'consumable' => trans('general.consumables'), + 'component' => trans('general.components'), + 'license' => trans('general.licenses'), + 'user' => trans('general.users'), ]; $this->columnOptions[''] = $this->getColumns(''); //blank mode? I don't know what this is supposed to mean @@ -238,7 +238,7 @@ class ImporterFile extends Component return false; } $this->statusType = 'pending'; - $this->statusText = "Processing..."; + $this->statusText = trans('admin/hardware/form.processing_spinner'); }