diff --git a/i18n/translations/en.json b/i18n/translations/en.json index eb207c2da1..0ec1dbea57 100644 --- a/i18n/translations/en.json +++ b/i18n/translations/en.json @@ -383,6 +383,7 @@ "file.sort": "Change position", "files": "Files", + "files.delete.confirm.selected": "Do you really want to delete the selected files? This action cannot be undone.", "files.empty": "No files yet", "filter": "Filter", @@ -592,6 +593,7 @@ "page.status.unlisted.description": "The page is only accessible via URL", "pages": "Pages", + "pages.delete.confirm.selected": "Do you really want to delete the selected pages? This action cannot be undone.", "pages.empty": "No pages yet", "pages.status.draft": "Drafts", "pages.status.listed": "Published", diff --git a/panel/src/components/Sections/ModelsSection.vue b/panel/src/components/Sections/ModelsSection.vue index 5c03b44e06..66778eaaa6 100644 --- a/panel/src/components/Sections/ModelsSection.vue +++ b/panel/src/components/Sections/ModelsSection.vue @@ -105,7 +105,7 @@ export default { this.$panel.dialog.open({ component: "k-remove-dialog", props: { - text: `Do you really want to delete ${this.selected.length} items at once? This action cannot be undone.` + text: this.confirmDeleteSelectedMessage }, on: { submit: () => { @@ -183,6 +183,11 @@ export default { size: this.options.size }; }, + confirmDeleteSelectedMessage() { + return this.$t(`${this.type}.delete.confirm.selected`, { + count: this.selected.length + }); + }, emptyProps() { return { icon: "page",