Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(conference) update transcription language with meeting language #15320

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions react/features/base/conference/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export interface IJitsiConference {
setSenderVideoConstraint: Function;
setStartMutedPolicy: Function;
setSubject: Function;
setTranscriptionLanguage: Function;
startRecording: Function;
startVerification: Function;
stopRecording: Function;
Expand Down
8 changes: 7 additions & 1 deletion react/features/settings/actions.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
setStartMutedPolicy,
setStartReactionsMuted
} from '../base/conference/actions';
import { getConferenceState } from '../base/conference/functions';
import { hangup } from '../base/connection/actions.web';
import { openDialog } from '../base/dialog/actions';
import i18next from '../base/i18n/i18next';
Expand Down Expand Up @@ -128,7 +129,8 @@ function setVideoSettingsVisibility(value: boolean) {
*/
export function submitMoreTab(newState: any) {
return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
const currentState = getMoreTabProps(getState());
const state = getState();
const currentState = getMoreTabProps(state);

const showPrejoinPage = newState.showPrejoinPage;

Expand All @@ -148,6 +150,10 @@ export function submitMoreTab(newState: any) {

if (newState.currentLanguage !== currentState.currentLanguage) {
i18next.changeLanguage(newState.currentLanguage);

const { conference } = getConferenceState(state);

conference?.setTranscriptionLanguage(newState.currentLanguage);
}
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { useNavigation } from '@react-navigation/native';
import React, { useCallback, useLayoutEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { ScrollView, Text, TouchableHighlight, View, ViewStyle } from 'react-native';
import { useSelector } from 'react-redux';

import { IReduxState } from '../../../app/types';
import i18next, { DEFAULT_LANGUAGE, LANGUAGES } from '../../../base/i18n/i18next';
import { IconArrowLeft } from '../../../base/icons/svg';
import JitsiScreen from '../../../base/modal/components/JitsiScreen';
Expand All @@ -16,12 +18,14 @@ import styles from './styles';
const LanguageSelectView = ({ isInWelcomePage }: { isInWelcomePage?: boolean; }) => {
const { t } = useTranslation();
const navigation = useNavigation();
const { conference } = useSelector((state: IReduxState) => state['features/base/conference']);
const { language: currentLanguage = DEFAULT_LANGUAGE } = i18next;

const setLanguage = useCallback(language => () => {
i18next.changeLanguage(language);
conference?.setTranscriptionLanguage(language);
navigate(screen.settings.main);
}, [ i18next ]);
}, [ conference, i18next ]);

const headerLeft = () => (
<HeaderNavigationButton
Expand Down