From 7dc0464094d44cf4183bd9da37d2d272b5f5d3c8 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Tue, 30 Aug 2022 17:46:54 +0100 Subject: [PATCH] split translation language by source and dest --- src/components/settings_modal/tabs/general_tab.js | 2 +- src/components/status_body/status_body.js | 2 +- src/modules/config.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/settings_modal/tabs/general_tab.js b/src/components/settings_modal/tabs/general_tab.js index f72f309c..c3c18132 100644 --- a/src/components/settings_modal/tabs/general_tab.js +++ b/src/components/settings_modal/tabs/general_tab.js @@ -84,7 +84,7 @@ const GeneralTab = { } }, translationLanguages () { - return (this.$store.getters.mergedConfig.supportedTranslationLanguages || []).map(lang => ({ key: lang.code, value: lang.code, label: lang.name })) + return (this.$store.getters.mergedConfig.supportedTranslationLanguages.target || []).map(lang => ({ key: lang.code, value: lang.code, label: lang.name })) }, translationLanguage: { get: function () { return this.$store.getters.mergedConfig.translationLanguage }, diff --git a/src/components/status_body/status_body.js b/src/components/status_body/status_body.js index f2f0fa2d..9e380f28 100644 --- a/src/components/status_body/status_body.js +++ b/src/components/status_body/status_body.js @@ -83,7 +83,7 @@ const StatusContent = { return this.status.attachments.map(file => fileType.fileType(file.mimetype)) }, translationLanguages () { - return (this.$store.getters.mergedConfig.supportedTranslationLanguages || []).map(lang => ({ key: lang.code, value: lang.code, label: lang.name })) + return (this.$store.getters.mergedConfig.supportedTranslationLanguages.source || []).map(lang => ({ key: lang.code, value: lang.code, label: lang.name })) }, ...mapGetters(['mergedConfig']) }, diff --git a/src/modules/config.js b/src/modules/config.js index 82257ddf..e43dcdb7 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -116,7 +116,7 @@ export const defaultState = { conversationTreeFadeAncestors: undefined, // instance default maxDepthInThread: undefined, // instance default translationLanguage: undefined, // instance default, - supportedTranslationLanguages: [] // instance default + supportedTranslationLanguages: {} // instance default } // caching the instance default properties