Localized the CreationConfirm toasted messages.

This commit is contained in:
elweyn 2022-01-21 13:19:36 +01:00
parent 0f5d7c549c
commit 67df695227
4 changed files with 14 additions and 8 deletions

View File

@ -13,7 +13,10 @@
"submit_creation": "Schöpfung einreichen",
"toasted": "Offene Schöpfung ({value} GDD) für {email} wurde gespeichert und liegt zur Bestätigung bereit",
"toasted_update": "`Offene Schöpfung {value} GDD) für {email} wurde geändert und liegt zur Bestätigung bereit",
"update_creation": "Schöpfung aktualisieren"
"update_creation": "Schöpfung aktualisieren",
"toasted_delete": "Offene Schöpfung wurde gelöscht",
"toasted_created": "Schöpfung wurde erfolgreich erstellt",
"toasted_default": "`Case {event} is not supported`"
},
"details": "Details",
"e_mail": "E-Mail",

View File

@ -13,7 +13,10 @@
"submit_creation": "Submit creation",
"toasted": "Open creation ({value} GDD) for {email} has been saved and is ready for confirmation.",
"toasted_update": "Open creation {value} GDD) for {email} has been changed and is ready for confirmation.",
"update_creation": "Creation update"
"update_creation": "Creation update",
"toasted_delete": "Open creation has been deleted",
"toasted_created": "Creation has been successfully created",
"toasted_default": "`Case {event} is not supported`"
},
"details": "Details",
"e_mail": "E-Mail",

View File

@ -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('Creation has been created')
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')
})
})

View File

@ -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('Creation has been created')
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() {