Skip to content

Commit

Permalink
Add translations for the confirmation dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Dec 13, 2024
1 parent 660f2e7 commit e05d18b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions i18n/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
7 changes: 6 additions & 1 deletion panel/src/components/Sections/ModelsSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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: () => {
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit e05d18b

Please sign in to comment.