allow selecting languages for translation

This commit is contained in:
FloatingGhost 2022-08-29 22:16:59 +01:00
parent 9b4cddd2e9
commit e7c21ffbd7
6 changed files with 34 additions and 3 deletions

View file

@ -57,7 +57,8 @@ const ExtraButtons = {
},
translateStatus () {
this.$store.dispatch('translateStatus', { id: this.status.id, language: this.$store.state.instance.interfaceLanguage })
const translateTo = this.$store.getters.mergedConfig.translationLanguage || this.$store.state.instance.interfaceLanguage
this.$store.dispatch('translateStatus', { id: this.status.id, language: translateTo })
.then(() => this.$emit('onSuccess'))
.catch(err => this.$emit('onError', err.error.error))
},