localised error message for cannot edit post

This commit is contained in:
Moriz Wahl 2020-01-20 12:57:14 +01:00
parent 04ff82f880
commit a4907f2bcb
4 changed files with 18 additions and 14 deletions

View File

@ -801,6 +801,8 @@
},
"error-pages" : {
"profile-not-found": "Dieses Profil konnte nicht gefunden werden",
"back-to-index": "Zurück zur Startseite"
"back-to-index": "Zurück zur Startseite",
"post-not-found": "Dieser Beitrag konnte nicht gefunden werden",
"cannot-edit-post": "Dieser Beitrag kann nicht editiert werden"
}
}

View File

@ -800,8 +800,10 @@
}
},
"error-pages" : {
"user-not-found": "This profile could not be found",
"back-to-index": "Back to index page"
"profile-not-found": "This profile could not be found",
"back-to-index": "Back to index page",
"post-not-found": "This post could not be found",
"cannot-edit-post": "This post cannot be edited"
}
}

View File

@ -35,7 +35,7 @@ const options = {
}
`,
path: 'post',
message: 'This post could not be found',
message: 'error-pages.post-not-found',
}
const persistentLinks = PersistentLinks(options)
@ -55,14 +55,14 @@ export default {
},
// TODO implement
/* {
name: this.$t('common.letsTalk'),
path: `/post/${id}/${slug}#lets-talk`
}, */
name: this.$t('common.letsTalk'),
path: `/post/${id}/${slug}#lets-talk`
}, */
// TODO implement
/* {
name: this.$t('common.versus'),
path: `/post/${id}/${slug}#versus`
} */
name: this.$t('common.versus'),
path: `/post/${id}/${slug}#versus`
} */
],
},
{
@ -71,9 +71,9 @@ export default {
},
// TODO implement
/* {
name: this.$t('common.takeAction'),
path: `/post/${id}/${slug}/take-action`
} */
name: this.$t('common.takeAction'),
path: `/post/${id}/${slug}/take-action`
} */
]
},
},

View File

@ -38,7 +38,7 @@ export default {
variables: { id },
})
if (contribution.author.id !== store.getters['auth/user'].id) {
error({ statusCode: 403, message: "You can't edit that!" })
error({ statusCode: 403, message: 'error-pages.cannot-edit-post' })
}
return { contribution }
},