This commit is contained in:
Sam Therapy 2023-03-23 13:23:58 +01:00
parent 9460f4ad67
commit a545eebdc3
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
2 changed files with 23 additions and 20 deletions

View file

@ -69,26 +69,29 @@
@parseReady="onParseReady"
/>
<div>
<label class="label">{{ $t('status.override_translation_source_language') }}</label>
{{ ' ' }}
<Select
id="source-language-switcher"
v-model="translateFrom"
class="preset-switcher"
<label class="label">{{ $t('status.override_translation_source_language') }}</label>
{{ ' ' }}
<Select
id="source-language-switcher"
v-model="translateFrom"
class="preset-switcher"
>
<option
v-for="language in translationLanguages"
:key="language.key"
:value="language.value"
>
<option
v-for="language in translationLanguages"
:key="language.key"
:value="language.value"
>
{{ language.label }}
</option>
</Select>
{{ ' ' }}
<button @click="translateStatus" class="btn button-default">
{{ $t('status.translate') }}
</button>
</div>
{{ language.label }}
</option>
</Select>
{{ ' ' }}
<button
class="btn button-default"
@click="translateStatus"
>
{{ $t('status.translate') }}
</button>
</div>
</div>
<button

View file

@ -656,7 +656,7 @@ const statuses = {
.then((status) => dispatch('addNewStatuses', { statuses: [status] }))
},
translateStatus ({ rootState, commit }, { id, translation, language, from }) {
return rootState.api.backendInteractor.translateStatus({ id: id, translation, language, from })
return rootState.api.backendInteractor.translateStatus({ id, translation, language, from })
.then((translation) => commit('setTranslatedStatus', { id, translation }))
},
muteConversation ({ rootState, commit }, statusId) {