Skip to content

Commit

Permalink
Translate the bulk exceptions for Files::delete and Pages::delete
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Dec 7, 2024
1 parent 0b752c1 commit 79782ad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions i18n/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/Cms/Files.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Cms/Pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
);
}
}
Expand Down

0 comments on commit 79782ad

Please sign in to comment.