Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(speaker-stats): translate aria-label for timeline segments and markers

Muskan Kumari076128b68e11
diff --git a/lang/main.json b/lang/main.json
index 13062a8600..9a9e84c7e0 100644
--- a/lang/main.json
+++ b/lang/main.json
@@ -1395,7 +1395,9 @@
"seconds": "{{count}}s",
"speakerStats": "Participants Stats",
"speakerTime": "Speaker Time",
- "surprised": "Surprised"
+ "surprised": "Surprised",
+ "timelineEnd": "End",
+ "timelineStart": "Start"
},
"startupoverlay": {
"genericTitle": "The meeting needs to use your microphone and camera.",
diff --git a/react/features/speaker-stats/components/web/Timeline.tsx b/react/features/speaker-stats/components/web/Timeline.tsx
index 6c6284ec68..99701b1934 100644
--- a/react/features/speaker-stats/components/web/Timeline.tsx
+++ b/react/features/speaker-stats/components/web/Timeline.tsx
@@ -1,4 +1,5 @@
import React, { MouseEvent, useCallback, useEffect, useMemo, useRef } from 'react';
+import { useTranslation } from 'react-i18next';
import { useDispatch, useSelector } from 'react-redux';
import { IReduxState } from '../../../app/types';
@@ -13,6 +14,7 @@ interface IProps {
}
const Timeline = ({ faceLandmarks }: IProps) => {
+ const { t } = useTranslation();
const startTimestamp = useSelector((state: IReduxState) => getConferenceTimestamp(state)) ?? 0;
const { left, right } = useSelector((state: IReduxState) => getTimelineBoundaries(state));
const { timelinePanning } = useSelector((state: IReduxState) => state['features/speaker-stats']);
@@ -186,18 +188,19 @@ const Timeline = ({ faceLandmarks }: IProps) => {
<div
className = 'timeline'>
{!hideStartAndEndSegments() && <div
- aria-label = 'start'
+ aria-label = { t('speakerStats.timelineStart') }
style = { getStartStyle() } />}
{hideStartAndEndSegments() && <div
+ aria-label = { leftCut?.faceExpression ? t(`speakerStats.${leftCut.faceExpression}`) : undefined }
style = { getOneSegmentStyle(leftCut?.faceExpression) } />}
{segments?.map(({ duration, timestamp, faceExpression }) =>
(<div
- aria-label = { faceExpression }
+ aria-label = { faceExpression ? t(`speakerStats.${faceExpression}`) : undefined }
key = { timestamp }
style = { getStyle(duration, faceExpression) } />)) }
{!hideStartAndEndSegments() && <div
- aria-label = 'end'
+ aria-label = { t('speakerStats.timelineEnd') }
style = { getEndStyle() } />}
</div>
</div>