1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-31 15:24:31 +03:00

ZIP Imports: Added validation message display, added testing

Testing covers main UI access, and main non-successfull import actions.
Started planning stored import model.
Extracted some text to language files.
This commit is contained in:
Dan Brown
2024-11-02 14:51:04 +00:00
parent c4ec50d437
commit 259aa829d4
7 changed files with 164 additions and 16 deletions

View File

@ -45,6 +45,9 @@ return [
'default_template_select' => 'Select a template page',
'import' => 'Import',
'import_validate' => 'Validate Import',
'import_desc' => 'Import books, chapters & pages using a portable zip export from the same, or a different, instance. Select a ZIP file to import then press "Validate Import" to proceed. After the file has been uploaded and validated you\'ll be able to configure & confirm the import in the next view.',
'import_zip_select' => 'Select ZIP file to upload',
'import_zip_validation_errors' => 'Errors were detected while validating the provided ZIP file:',
// Permissions and restrictions
'permissions' => 'Permissions',

View File

@ -105,6 +105,11 @@ return [
'app_down' => ':appName is down right now',
'back_soon' => 'It will be back up soon.',
// Import
'import_zip_cant_read' => 'Could not read ZIP file.',
'import_zip_cant_decode_data' => 'Could not find and decode ZIP data.json content.',
'import_zip_no_data' => 'ZIP file data has no expected book, chapter or page content.',
// API errors
'api_no_authorization_found' => 'No authorization token found on the request',
'api_bad_authorization_format' => 'An authorization token was found on the request but the format appeared incorrect',

View File

@ -106,7 +106,7 @@ return [
'uploaded' => 'The file could not be uploaded. The server may not accept files of this size.',
'zip_file' => 'The :attribute needs to reference a file within the ZIP.',
'zip_model_expected' => 'Data object expected but ":type" found',
'zip_model_expected' => 'Data object expected but ":type" found.',
// Custom validation lines
'custom' => [