🌐(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'
export function ToastTranscript({ state, ...props }: ToastProps) {
const { t } = useTranslation('notifications')
const { t } = useTranslation('notifications', { keyPrefix: 'transcript' })
const ref = useRef(null)
const { toastProps, contentProps } = useToast(props, state, ref)
const participant = props.toast.content.participant
const type = props.toast.content.type
const key = `recording${type == NotificationType.TranscriptionStarted ? 'Started' : 'Stopped'}`
const key =
type == NotificationType.TranscriptionStarted ? 'started' : 'stopped'
return (
<StyledToastContainer {...toastProps} ref={ref}>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -22,6 +22,8 @@
"open": "Afficher",
"accept": "Accepter"
},
"recordingStarted": "{{name}} a démarré la transcription de la réunion.",
"recordingStopped": "{{name}} a arrêté la transcription de la réunion."
"transcript": {
"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": {
"started": "Transcription en cours",
"starting": "Démarrage de la transcription",

View File

@@ -22,6 +22,8 @@
"open": "Openen",
"accept": "Accepteren"
},
"recordingStarted": "{{name}} is de transcriptie van de vergadering gestart.",
"recordingStopped": "{{name}} heeft de transcriptie van de vergadering gestopt."
"transcript": {
"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": {
"started": "Transcriptie bezig",
"starting": "Transcriptie begint",