diff --git a/src/components/dropDown/ControlPanelDropDown.tsx b/src/components/dropDown/ControlPanelDropDown.tsx index 15d0e0e4..d3c1dbdd 100644 --- a/src/components/dropDown/ControlPanelDropDown.tsx +++ b/src/components/dropDown/ControlPanelDropDown.tsx @@ -1,6 +1,7 @@ -import { useEffect, useState } from 'react'; +import { useState } from 'react'; import DropDown from './DropDown'; import useEffectNotOnMount from '../../hooks/utils/useEffectNotOnMount'; +import { useTranslate } from '../../i18n/useTranslate'; type ControlPanelDropDown = { options: { option: string; available: boolean; id: string }[]; @@ -19,6 +20,7 @@ export default function ControlPanelDropDown({ (id: string) => options.find((option) => option.id === id)?.option || id ) ); + const t = useTranslate(); useEffectNotOnMount(() => { const mappedIds = selected?.map( @@ -43,8 +45,8 @@ export default function ControlPanelDropDown({
( options.find((o) => o.id === value)?.option ); + const t = useTranslate(); useEffectNotOnMount(() => { if (options) { @@ -33,7 +35,7 @@ export default function PipelineNamesDropDown({
{ if (controlConnection) { @@ -55,7 +57,7 @@ const ProductionControlConnections: React.FC<
-
{'To Pipeline:'}
+
{t('production.to_pipeline')}:
{controlConnection.control_panel_endpoint.toPipelineIdx}
@@ -74,13 +76,17 @@ const ProductionControlConnections: React.FC<
{pcc.port}
-
{'From Pipeline:'}
+
+ {t('production.from_pipeline')}: +
{pcc.fromPipelineIdx}
-
{'To Pipeline:'}
+
+ {t('production.to_pipeline')}: +
{pcc.toPipelineIdx}
diff --git a/src/components/production/header/ProductionHeader.tsx b/src/components/production/header/ProductionHeader.tsx index 6af9882c..bff11353 100644 --- a/src/components/production/header/ProductionHeader.tsx +++ b/src/components/production/header/ProductionHeader.tsx @@ -35,7 +35,7 @@ const ProductionHeader: React.FC = (props) => {
{ diff --git a/src/components/production/pipelines/ProductionPipelineCard.tsx b/src/components/production/pipelines/ProductionPipelineCard.tsx index 5c05c974..7e15eb3f 100644 --- a/src/components/production/pipelines/ProductionPipelineCard.tsx +++ b/src/components/production/pipelines/ProductionPipelineCard.tsx @@ -1,10 +1,10 @@ 'use client'; -import { useState } from 'react'; import { ResourcesCompactPipelineResponse } from '../../../../types/ateliere-live'; import { PipelineSettings } from '../../../interfaces/pipeline'; import PipelineNameDropDown from '../../dropDown/PipelineNameDropDown'; import cloneDeep from 'lodash.clonedeep'; +import { useTranslate } from '../../../i18n/useTranslate'; interface PipelineCardInfoProps { label: string; @@ -32,6 +32,7 @@ const ProductionPipelineCard: React.FC = ( props ) => { const { pipeline, pipelines, onPipelineChange } = props; + const t = useTranslate(); const updatePipelineID = (id: string) => { const newPipeline = cloneDeep(pipeline); @@ -64,37 +65,55 @@ const ProductionPipelineCard: React.FC = ( value={pipeline.alignment_ms} /> - + - - + + - - - + + +
diff --git a/src/components/production/sources/ProductionSources.tsx b/src/components/production/sources/ProductionSources.tsx index 1c6deb2b..4ca2598c 100644 --- a/src/components/production/sources/ProductionSources.tsx +++ b/src/components/production/sources/ProductionSources.tsx @@ -573,7 +573,7 @@ const ProductionSources: React.FC = (props) => { (selectedValue !== 'HTML' && selectedValue !== 'Media Player') || locked; return ( -
+
{sourcesLoading && } <> diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index 2d5443f4..4ece135e 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -105,7 +105,33 @@ export const en = { add: 'Add', add_other_source_type: 'Add other source type', configure_outputs: 'Configure Outputs', - manage_multiviewers: 'Manage multiviewers' + manage_multiviewers: 'Manage multiviewers', + select_pipeline: 'Select pipeline', + select_control_panel: 'Select control panel', + control_panel: 'Control panel', + to_pipeline: 'To pipeline', + from_pipeline: 'From pipeline', + sources: 'Sources' + }, + pipeline_card: { + audio_format: 'Audio Format', + audio_mapping: 'Audio Mapping', + audio_sampling_frequency: 'Audio Sampling Frequency', + bit_depth: 'Bit Depth', + convert_color_range: 'Convert Color Range', + encoder: 'Encoder', + format: 'Format', + frame_rate_d: 'Frame Rate D', + frame_rate_n: 'Frame Rate N', + gop_length: 'GOP Length', + height: 'Height', + width: 'Width', + video_kilobit_rate: 'Video Kilobit Rate' + }, + output_card: { + format: 'Format', + bit_depth: 'Bit Depth', + video_kilobit_rate: 'Video Kilobit Rate' }, configure_alignment_latency: { configure_alignment_latency: diff --git a/src/i18n/locales/sv.ts b/src/i18n/locales/sv.ts index b4e7a8ad..3aa57bea 100644 --- a/src/i18n/locales/sv.ts +++ b/src/i18n/locales/sv.ts @@ -95,7 +95,7 @@ export const sv = { production_configuration: 'Produktionskonfiguration', production: { productions: 'Produktioner', - add_source: 'Lägg till ingång', + add_source: 'Lägg till källa', select_preset: 'Välj produktionsmall', clear_selection: 'Rensa val', started: 'Produktion startad: {{name}}', @@ -107,7 +107,33 @@ export const sv = { add: 'Lägg till', add_other_source_type: 'Lägg till annan källtyp', configure_outputs: 'Konfigurera Outputs', - manage_multiviewers: 'Uppdatera multiviewers' + manage_multiviewers: 'Uppdatera multiviewers', + select_pipeline: 'Välj pipeline', + select_control_panel: 'Välj kontrollpanel', + control_panel: 'Kontrollpanel', + to_pipeline: 'Till pipeline', + from_pipeline: 'Från pipeline', + sources: 'Källor' + }, + pipeline_card: { + audio_format: 'Ljudformat', + audio_mapping: 'Ljudmappning', + audio_sampling_frequency: 'Samplingsfrekvens', + bit_depth: 'Bit Depth', + convert_color_range: 'Konvertera Color Range', + encoder: 'Encoder', + format: 'Format', + frame_rate_d: 'Frame Rate D', + frame_rate_n: 'Frame Rate N', + gop_length: 'GOP Length', + height: 'Höjd', + width: 'Bredd', + video_kilobit_rate: 'Video Kilobit Rate' + }, + output_card: { + format: 'Format', + bit_depth: 'Bit Depth', + video_kilobit_rate: 'Video Kilobit Rate' }, configure_alignment_latency: { source_name: 'Källnamn',