diff --git a/src/frontend/src/features/rooms/livekit/components/controls/ChatToggle.tsx b/src/frontend/src/features/rooms/livekit/components/controls/ChatToggle.tsx index 83f249f1..847a01bd 100644 --- a/src/frontend/src/features/rooms/livekit/components/controls/ChatToggle.tsx +++ b/src/frontend/src/features/rooms/livekit/components/controls/ChatToggle.tsx @@ -5,7 +5,7 @@ import { css } from '@/styled-system/css' import { useWidgetInteraction } from '../../hooks/useWidgetInteraction' export const ChatToggle = () => { - const { t } = useTranslation('rooms') + const { t } = useTranslation('rooms', { keyPrefix: 'controls.chat' }) const { isChatOpen, unreadMessages, toggleChat } = useWidgetInteraction() const tooltipLabel = isChatOpen ? 'open' : 'closed' @@ -20,8 +20,8 @@ export const ChatToggle = () => { toggleChat()} > diff --git a/src/frontend/src/features/rooms/livekit/components/controls/HandToggle.tsx b/src/frontend/src/features/rooms/livekit/components/controls/HandToggle.tsx index ce55e079..65b1808d 100644 --- a/src/frontend/src/features/rooms/livekit/components/controls/HandToggle.tsx +++ b/src/frontend/src/features/rooms/livekit/components/controls/HandToggle.tsx @@ -7,16 +7,14 @@ import { useRaisedHand } from '@/features/rooms/livekit/hooks/useRaisedHand' import { NotificationType } from '@/features/notifications/NotificationType' export const HandToggle = () => { - const { t } = useTranslation('rooms') + const { t } = useTranslation('rooms', { keyPrefix: 'controls.hand' }) const room = useRoomContext() const { isHandRaised, toggleRaisedHand } = useRaisedHand({ participant: room.localParticipant, }) - const label = isHandRaised - ? t('controls.hand.lower') - : t('controls.hand.raise') + const tooltipLabel = isHandRaised ? 'lower' : 'raise' const notifyOtherParticipants = (isHandRaised: boolean) => { room.localParticipant.publishData( @@ -39,8 +37,8 @@ export const HandToggle = () => { { notifyOtherParticipants(isHandRaised) diff --git a/src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantsList.tsx b/src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantsList.tsx index f20da550..1546d756 100644 --- a/src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantsList.tsx +++ b/src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantsList.tsx @@ -15,7 +15,7 @@ import { LowerAllHandsButton } from '@/features/rooms/livekit/components/control // TODO: Optimize rendering performance, especially for longer participant lists, even though they are generally short. export const ParticipantsList = () => { - const { t } = useTranslation('rooms') + const { t } = useTranslation('rooms', { keyPrefix: 'participants' }) // Preferred using the 'useParticipants' hook rather than the separate remote and local hooks, // because the 'useLocalParticipant' hook does not update the participant's information when their @@ -65,15 +65,15 @@ export const ParticipantsList = () => { paddingTop: '1rem', }} > - {t('participants.heading')} + {t('heading')}
@@ -89,12 +89,12 @@ export const ParticipantsList = () => { marginBottom: '0.83em', })} > - {t('participants.subheading').toUpperCase()} + {t('subheading').toUpperCase()} {raisedHandParticipants.length > 0 && (
( @@ -106,7 +106,7 @@ export const ParticipantsList = () => {
)} ( diff --git a/src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantsToggle.tsx b/src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantsToggle.tsx index 9257d5f4..1766c020 100644 --- a/src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantsToggle.tsx +++ b/src/frontend/src/features/rooms/livekit/components/controls/Participants/ParticipantsToggle.tsx @@ -6,7 +6,7 @@ import { useParticipants } from '@livekit/components-react' import { useWidgetInteraction } from '../../../hooks/useWidgetInteraction' export const ParticipantsToggle = () => { - const { t } = useTranslation('rooms') + const { t } = useTranslation('rooms', { keyPrefix: 'controls.participants' }) /** * Context could not be used due to inconsistent refresh behavior. @@ -30,8 +30,8 @@ export const ParticipantsToggle = () => { toggleParticipants()} >