Skip to content

A free open source IT asset/license management system

translation strings

spencerrlongg99d7155729b4
diff --git a/app/Http/Requests/Traits/MayContainCustomFields.php b/app/Http/Requests/Traits/MayContainCustomFields.php
index 2062172217..50b239b60e 100644
--- a/app/Http/Requests/Traits/MayContainCustomFields.php
+++ b/app/Http/Requests/Traits/MayContainCustomFields.php
@@ -28,9 +28,9 @@ trait MayContainCustomFields
$request_fields->diff($asset_model->fieldset->fields->pluck('db_column'))
->each(function ($request_field_name) use ($request_fields, $validator) {
if (CustomField::where('db_column', $request_field_name)->exists()) {
- $validator->errors()->add($request_field_name, 'This field seems to exist, but is not available on this Asset Model\'s fieldset.');
+ $validator->errors()->add($request_field_name, trans('validation.custom.custom_field_not_found_on_model'));
} else {
- $validator->errors()->add($request_field_name, 'This field does not seem to exist, please double check your custom field names.');
+ $validator->errors()->add($request_field_name, trans('validation.custom.custom_field_not_found'));
}
});
}
diff --git a/resources/lang/en-US/validation.php b/resources/lang/en-US/validation.php
index 05374e23af..630816354a 100644
--- a/resources/lang/en-US/validation.php
+++ b/resources/lang/en-US/validation.php
@@ -126,6 +126,8 @@ return [
'hashed_pass' => 'Your current password is incorrect',
'dumbpwd' => 'That password is too common.',
'statuslabel_type' => 'You must select a valid status label type',
+ 'custom_field_not_found' => 'This field does not seem to exist, please double check your custom field names.',
+ 'custom_field_not_found_on_model' => 'This field seems to exist, but is not available on this Asset Model\'s fieldset.',
// date_format validation with slightly less stupid messages. It duplicates a lot, but it gets the job done :(
// We use this because the default error message for date_format is reflects php Y-m-d, which non-PHP
@@ -137,7 +139,6 @@ return [
'expected_checkin.date_format' => 'The :attribute must be a valid date in YYYY-MM-DD format',
'start_date.date_format' => 'The :attribute must be a valid date in YYYY-MM-DD format',
'end_date.date_format' => 'The :attribute must be a valid date in YYYY-MM-DD format',
-
],
/*