🌐(frontend) prepare translation keys for expanded recording types

Restructure translation keys to support a more extensive set
of recording types in the future.
This commit is contained in:
lebaudantoine
2025-04-07 10:53:00 +02:00
committed by aleb_the_flash
parent d537a4449a
commit 69381a6c4b
10 changed files with 26 additions and 15 deletions

View File

@@ -7,13 +7,14 @@ import { useTranslation } from 'react-i18next'
import { NotificationType } from '../NotificationType' import { NotificationType } from '../NotificationType'
export function ToastTranscript({ state, ...props }: ToastProps) { export function ToastTranscript({ state, ...props }: ToastProps) {
const { t } = useTranslation('notifications') const { t } = useTranslation('notifications', { keyPrefix: 'transcript' })
const ref = useRef(null) const ref = useRef(null)
const { toastProps, contentProps } = useToast(props, state, ref) const { toastProps, contentProps } = useToast(props, state, ref)
const participant = props.toast.content.participant const participant = props.toast.content.participant
const type = props.toast.content.type const type = props.toast.content.type
const key = `recording${type == NotificationType.TranscriptionStarted ? 'Started' : 'Stopped'}` const key =
type == NotificationType.TranscriptionStarted ? 'started' : 'stopped'
return ( return (
<StyledToastContainer {...toastProps} ref={ref}> <StyledToastContainer {...toastProps} ref={ref}>

View File

@@ -11,7 +11,9 @@ import { NotificationType } from '@/features/notifications/NotificationType'
import { TranscriptionStatus, transcriptionStore } from '@/stores/transcription' import { TranscriptionStatus, transcriptionStore } from '@/stores/transcription'
export const TranscriptStateToast = () => { export const TranscriptStateToast = () => {
const { t } = useTranslation('rooms', { keyPrefix: 'recording.transcript' }) const { t } = useTranslation('rooms', {
keyPrefix: 'recordingBadge.transcript',
})
const room = useRoomContext() const room = useRoomContext()
const transcriptionSnap = useSnapshot(transcriptionStore) const transcriptionSnap = useSnapshot(transcriptionStore)

View File

@@ -22,6 +22,8 @@
"open": "", "open": "",
"accept": "" "accept": ""
}, },
"recordingStarted": "", "transcript": {
"recordingStopped": "" "started": "",
"stopped": ""
}
} }

View File

@@ -292,7 +292,7 @@
} }
} }
}, },
"recording": { "recordingBadge": {
"transcript": { "transcript": {
"started": "", "started": "",
"starting": "", "starting": "",

View File

@@ -22,6 +22,8 @@
"open": "Open", "open": "Open",
"accept": "Accept" "accept": "Accept"
}, },
"recordingStarted": "{{name}} started the meeting transcription.", "transcript": {
"recordingStopped": "{{name}} stopped the meeting transcription." "started": "{{name}} started the meeting transcription.",
"stopped": "{{name}} stopped the meeting transcription."
}
} }

View File

@@ -291,7 +291,7 @@
} }
} }
}, },
"recording": { "recordingBadge": {
"transcript": { "transcript": {
"started": "Transcribing", "started": "Transcribing",
"starting": "Transcription starting", "starting": "Transcription starting",

View File

@@ -22,6 +22,8 @@
"open": "Afficher", "open": "Afficher",
"accept": "Accepter" "accept": "Accepter"
}, },
"recordingStarted": "{{name}} a démarré la transcription de la réunion.", "transcript": {
"recordingStopped": "{{name}} a arrêté la transcription de la réunion." "started": "{{name}} a démarré la transcription de la réunion.",
"stopped": "{{name}} a arrêté la transcription de la réunion."
}
} }

View File

@@ -291,7 +291,7 @@
} }
} }
}, },
"recording": { "recordingBadge": {
"transcript": { "transcript": {
"started": "Transcription en cours", "started": "Transcription en cours",
"starting": "Démarrage de la transcription", "starting": "Démarrage de la transcription",

View File

@@ -22,6 +22,8 @@
"open": "Openen", "open": "Openen",
"accept": "Accepteren" "accept": "Accepteren"
}, },
"recordingStarted": "{{name}} is de transcriptie van de vergadering gestart.", "transcript": {
"recordingStopped": "{{name}} heeft de transcriptie van de vergadering gestopt." "started": "{{name}} is de transcriptie van de vergadering gestart.",
"stopped": "{{name}} heeft de transcriptie van de vergadering gestopt."
}
} }

View File

@@ -291,7 +291,7 @@
} }
} }
}, },
"recording": { "recordingBadge": {
"transcript": { "transcript": {
"started": "Transcriptie bezig", "started": "Transcriptie bezig",
"starting": "Transcriptie begint", "starting": "Transcriptie begint",