Merge pull request #879 from gradido/858-correct-profil-language

UserProfil Language switch has an error & UserProfil Language switch don't show right language text
This commit is contained in:
Hannes Heine 2021-09-22 11:46:36 +02:00 committed by GitHub
commit d87fd70784
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,13 +23,13 @@
<b>{{ $t('language') }}</b>
</small>
</b-col>
<b-col class="col-12">{{ $store.state.language }}</b-col>
<b-col class="col-12">{{ $t(buildTagFromLanguageString()) }}</b-col>
</b-row>
</div>
<div v-else>
<div>
<b-form @submit.stop.prevent="handleSubmit(onSubmit)">
<b-form @submit.stop.prevent="onSubmit">
<b-row class="mb-2">
<b-col class="col-12">
<small>
@ -93,16 +93,22 @@ export default {
.query({
query: updateUserInfos,
variables: {
language: this.$store.state.language,
email: this.$store.state.email,
locale: this.language,
},
})
.then(() => {
this.$store.commit('language', this.language)
this.cancelEdit()
})
.catch((error) => {
this.$toasted.error(error.message)
})
},
buildTagFromLanguageString() {
return 'languages.' + this.$store.state.language
},
},
}
</script>