diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js index 4ac463e6..042a96a1 100644 --- a/src/components/extra_buttons/extra_buttons.js +++ b/src/components/extra_buttons/extra_buttons.js @@ -55,8 +55,10 @@ const ExtraButtons = { hideDeleteStatusConfirmDialog () { this.showingDeleteDialog = false }, - translateStatus () { + if (this.noTranslationTargetSet) { + this.$store.dispatch('pushGlobalNotice', { messageKey: 'toast.no_translation_target_set', level: 'info' }) + } 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')) @@ -120,6 +122,9 @@ const ExtraButtons = { canTranslate () { return this.$store.state.instance.translationEnabled === true }, + noTranslationTargetSet () { + return this.$store.getters.mergedConfig.translationLanguage === undefined + }, statusLink () { if (this.status.is_local) { return `${this.$store.state.instance.server}${this.$router.resolve({ name: 'conversation', params: { id: this.status.id } }).href}` diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue index bbb140e4..b1cbe8dc 100644 --- a/src/components/extra_buttons/extra_buttons.vue +++ b/src/components/extra_buttons/extra_buttons.vue @@ -126,6 +126,16 @@ fixed-width icon="globe" />{{ $t("status.translate") }} + + + + diff --git a/src/components/settings_modal/tabs/general_tab.js b/src/components/settings_modal/tabs/general_tab.js index c3c18132..9fe47eaf 100644 --- a/src/components/settings_modal/tabs/general_tab.js +++ b/src/components/settings_modal/tabs/general_tab.js @@ -43,6 +43,11 @@ const GeneralTab = { value: mode, label: this.$t(`settings.third_column_mode_${mode}`) })), + userProfileDefaultTabOptions: ['statuses', 'replies'].map(tab => ({ + key: tab, + value: tab, + label: this.$t(`user_card.${tab}`) + })), loopSilentAvailable: // Firefox Object.getOwnPropertyDescriptor(HTMLVideoElement.prototype, 'mozHasAudio') || diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue index 72d877bd..608c73af 100644 --- a/src/components/settings_modal/tabs/general_tab.vue +++ b/src/components/settings_modal/tabs/general_tab.vue @@ -15,11 +15,6 @@ {{ $t('settings.hide_isp') }} -