From 79782adf75df54acfcef51618a2227dedd423752 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Sat, 7 Dec 2024 15:39:40 +0100 Subject: [PATCH] Translate the bulk exceptions for Files::delete and Pages::delete --- i18n/translations/en.json | 2 ++ src/Cms/Files.php | 2 +- src/Cms/Pages.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/i18n/translations/en.json b/i18n/translations/en.json index 02e14d34f6..0365d51763 100644 --- a/i18n/translations/en.json +++ b/i18n/translations/en.json @@ -108,6 +108,7 @@ "error.file.changeTemplate.invalid": "The template for the file \"{id}\" cannot be changed to \"{template}\" (valid: \"{blueprints}\")", "error.file.changeTemplate.permission": "You are not allowed to change the template for the file \"{id}\"", + "error.file.delete.multiple": "Not all files could be deleted", "error.file.duplicate": "A file with the name \"{filename}\" already exists", "error.file.extension.forbidden": "The extension \"{extension}\" is not allowed", "error.file.extension.invalid": "Invalid extension: {extension}", @@ -170,6 +171,7 @@ "error.page.delete": "The page \"{slug}\" cannot be deleted", "error.page.delete.confirm": "Please enter the page title to confirm", "error.page.delete.hasChildren": "The page has subpages and cannot be deleted", + "error.page.delete.multiple": "Not all pages could be deleted", "error.page.delete.permission": "You are not allowed to delete \"{slug}\"", "error.page.draft.duplicate": "A page draft with the URL appendix \"{slug}\" already exists", "error.page.duplicate": "A page with the URL appendix \"{slug}\" already exists", diff --git a/src/Cms/Files.php b/src/Cms/Files.php index 4447441ae8..0dbf77d6fd 100644 --- a/src/Cms/Files.php +++ b/src/Cms/Files.php @@ -125,7 +125,7 @@ public function delete(array $ids): void if ($exceptions !== []) { throw new Exception( - message: 'Not all files could be deleted', + key: 'file.delete.multiple', ); } } diff --git a/src/Cms/Pages.php b/src/Cms/Pages.php index 8ef6d9e972..f85f95c2b9 100644 --- a/src/Cms/Pages.php +++ b/src/Cms/Pages.php @@ -150,7 +150,7 @@ public function delete(array $ids): void if ($exceptions !== []) { throw new Exception( - message: 'Not all pages could be deleted', + key: 'page.delete.multiple', ); } }