Improve error messages

This commit is contained in:
rinpatch 2018-12-08 22:36:54 +01:00
parent 788383d8a1
commit f69331e49d
3 changed files with 7 additions and 6 deletions

View file

@ -262,9 +262,9 @@ const PostStatusForm = {
let index = this.newStatus.files.indexOf(fileInfo)
this.newStatus.files.splice(index, 1)
},
uploadFailed (errString) {
errString = errString || 'upload_error'
this.error = this.$t('post_status.' + errString)
uploadFailed (errString, templateArgs) {
templateArgs = templateArgs || {};
this.error = this.$t('post_status.upload_error') + ' ' + this.$t('post_status.' + errString, templateArgs)
this.enableSubmit()
},
disableSubmit () {