diff --git a/admin/src/locales/de.json b/admin/src/locales/de.json index 111d6823f..b1a008eaf 100644 --- a/admin/src/locales/de.json +++ b/admin/src/locales/de.json @@ -12,6 +12,9 @@ "select_value": "Betrag auswählen", "submit_creation": "Schöpfung einreichen", "toasted": "Offene Schöpfung ({value} GDD) für {email} wurde gespeichert und liegt zur Bestätigung bereit", + "toasted_created": "Schöpfung wurde erfolgreich gespeichert", + "toasted_default": "`Fall {event} wird nicht unterstützt`", + "toasted_delete": "Offene Schöpfung wurde gelöscht", "toasted_update": "`Offene Schöpfung {value} GDD) für {email} wurde geändert und liegt zur Bestätigung bereit", "update_creation": "Schöpfung aktualisieren" }, diff --git a/admin/src/locales/en.json b/admin/src/locales/en.json index d412ecfcb..2d2df4461 100644 --- a/admin/src/locales/en.json +++ b/admin/src/locales/en.json @@ -12,6 +12,9 @@ "select_value": "Select amount", "submit_creation": "Submit creation", "toasted": "Open creation ({value} GDD) for {email} has been saved and is ready for confirmation.", + "toasted_created": "Creation has been successfully saved", + "toasted_default": "`Case {event} is not supported`", + "toasted_delete": "Open creation has been deleted", "toasted_update": "Open creation {value} GDD) for {email} has been changed and is ready for confirmation.", "update_creation": "Creation update" }, diff --git a/admin/src/pages/CreationConfirm.spec.js b/admin/src/pages/CreationConfirm.spec.js index 14a71bb78..cc0a096da 100644 --- a/admin/src/pages/CreationConfirm.spec.js +++ b/admin/src/pages/CreationConfirm.spec.js @@ -127,7 +127,7 @@ describe('CreationConfirm', () => { }) it('toasts a success message', () => { - expect(toastedSuccessMock).toBeCalledWith('Pending Creation has been deleted') + expect(toastedSuccessMock).toBeCalledWith('creation_form.toasted_delete') }) }) @@ -189,7 +189,7 @@ describe('CreationConfirm', () => { }) it('toasts a success message', () => { - expect(toastedSuccessMock).toBeCalledWith('Pending Creation has been deleted') + expect(toastedSuccessMock).toBeCalledWith('creation_form.toasted_created') }) }) @@ -201,7 +201,7 @@ describe('CreationConfirm', () => { }) it('toasts an error message', () => { - expect(toastedErrorMock).toBeCalledWith('Case confirm is not supported') + expect(toastedErrorMock).toBeCalledWith('creation_form.toasted_default') }) }) diff --git a/admin/src/pages/CreationConfirm.vue b/admin/src/pages/CreationConfirm.vue index 578c9b23f..bfb3100aa 100644 --- a/admin/src/pages/CreationConfirm.vue +++ b/admin/src/pages/CreationConfirm.vue @@ -66,7 +66,7 @@ export default { index = this.confirmResult.indexOf(findArr) this.confirmResult.splice(index, 1) this.$store.commit('openCreationsMinus', 1) - this.$toasted.success('Pending Creation has been deleted') + this.$toasted.success(this.$t('creation_form.toasted_delete')) }) .catch((error) => { this.$toasted.error(error.message) @@ -75,10 +75,10 @@ export default { case 'confirmed': this.confirmResult.splice(index, 1) this.$store.commit('openCreationsMinus', 1) - this.$toasted.success('Pending Creation has been deleted') + this.$toasted.success(this.$t('creation_form.toasted_created')) break default: - this.$toasted.error('Case ' + event + ' is not supported') + this.$toasted.error(this.$t('creation_form.toasted_default', { event })) } }, getPendingCreations() {