Merge pull request #12506 from marcusmoore/fix/use-translation-strings-for-importer-errors

Use translation strings for importer exceptions
This commit is contained in:
snipe 2023-02-13 14:17:47 -08:00 committed by GitHub
commit 1520c9c6a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -73,7 +73,7 @@ class ImportController extends Controller
Helper::formatStandardApiResponse(
'error',
null,
'One or more attributes in the header row contain malformed UTF-8 characters'
trans('admin/hardware/message.import.header_row_has_malformed_characters')
),
422
);
@ -106,7 +106,7 @@ class ImportController extends Controller
Helper::formatStandardApiResponse(
'error',
null,
'One or more attributes in row 2 contain malformed UTF-8 characters'
trans('admin/hardware/message.import.content_row_has_malformed_characters')
),
422
);

View file

@ -49,6 +49,8 @@ return [
'success' => 'Your file has been imported',
'file_delete_success' => 'Your file has been been successfully deleted',
'file_delete_error' => 'The file was unable to be deleted',
'header_row_has_malformed_characters' => 'One or more attributes in the header row contain malformed UTF-8 characters',
'content_row_has_malformed_characters' => 'One or more attributes in the first row of content contain malformed UTF-8 characters',
],