mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
localize error for fail on create pending creation
This commit is contained in:
parent
950d0181a0
commit
5be959a584
@ -422,12 +422,14 @@ describe('CreationFormular', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('toasts two errors', () => {
|
it('toasts two errors', () => {
|
||||||
expect(toastErrorSpy).toBeCalledWith(
|
expect(toastErrorSpy).toBeCalledWith([
|
||||||
'Could not created PendingCreation for bob@baumeister.de',
|
'creation_form.creation_failed',
|
||||||
)
|
{ email: 'bob@baumeister.de' },
|
||||||
expect(toastErrorSpy).toBeCalledWith(
|
])
|
||||||
'Could not created PendingCreation for bibi@bloxberg.de',
|
expect(toastErrorSpy).toBeCalledWith([
|
||||||
)
|
'creation_form.creation_failed',
|
||||||
|
{ email: 'bibi@bloxberg.de' },
|
||||||
|
])
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -171,9 +171,8 @@ export default {
|
|||||||
result.data.createPendingCreations.successfulCreation.length,
|
result.data.createPendingCreations.successfulCreation.length,
|
||||||
)
|
)
|
||||||
if (result.data.createPendingCreations.failedCreation.length > 0) {
|
if (result.data.createPendingCreations.failedCreation.length > 0) {
|
||||||
result.data.createPendingCreations.failedCreation.forEach((failed) => {
|
result.data.createPendingCreations.failedCreation.forEach((email) => {
|
||||||
// TODO: Please localize this error message
|
this.toastError(this.$t('creation_form.creation_failed', { email }))
|
||||||
this.toastError('Could not created PendingCreation for ' + failed)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.$emit('remove-all-bookmark')
|
this.$emit('remove-all-bookmark')
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
"confirmed": "bestätigt",
|
"confirmed": "bestätigt",
|
||||||
"creation": "Schöpfung",
|
"creation": "Schöpfung",
|
||||||
"creation_form": {
|
"creation_form": {
|
||||||
|
"creation_failed": "Ausstehende Schöpfung für {email} konnte nicht erzeugt werden.",
|
||||||
"creation_for": "Aktives Grundeinkommen für",
|
"creation_for": "Aktives Grundeinkommen für",
|
||||||
"enter_text": "Text eintragen",
|
"enter_text": "Text eintragen",
|
||||||
"form": "Schöpfungsformular",
|
"form": "Schöpfungsformular",
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
"confirmed": "confirmed",
|
"confirmed": "confirmed",
|
||||||
"creation": "Creation",
|
"creation": "Creation",
|
||||||
"creation_form": {
|
"creation_form": {
|
||||||
|
"creation_failed": "Could not create pending creation for {email}",
|
||||||
"creation_for": "Active Basic Income for",
|
"creation_for": "Active Basic Income for",
|
||||||
"enter_text": "Enter text",
|
"enter_text": "Enter text",
|
||||||
"form": "Creation form",
|
"form": "Creation form",
|
||||||
|
|||||||
@ -13,7 +13,8 @@ export const toasters = {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
toast(message, options) {
|
toast(message, options) {
|
||||||
message = message.replace(/^GraphQL error: /, '')
|
// for unit tests, check that replace is present
|
||||||
|
if (message.replace) message = message.replace(/^GraphQL error: /, '')
|
||||||
this.$bvToast.toast(message, {
|
this.$bvToast.toast(message, {
|
||||||
autoHideDelay: 5000,
|
autoHideDelay: 5000,
|
||||||
appendToast: true,
|
appendToast: true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user