From 25c322a58b7b8c830d63d76103567415c4d92db7 Mon Sep 17 00:00:00 2001 From: cicatelli Date: Thu, 3 Oct 2024 11:37:24 -0300 Subject: [PATCH 1/5] Include Pt-Br Language --- .../panel/general-panel/GeneralPanelForm.tsx | 3 ++- .../src/translation/TranslationProvider.tsx | 12 +++++++++ .../client/src/translation/languages/pt-br.ts | 26 +++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 apps/client/src/translation/languages/pt-br.ts diff --git a/apps/client/src/features/app-settings/panel/general-panel/GeneralPanelForm.tsx b/apps/client/src/features/app-settings/panel/general-panel/GeneralPanelForm.tsx index 01302b7762..c9f3206b1a 100644 --- a/apps/client/src/features/app-settings/panel/general-panel/GeneralPanelForm.tsx +++ b/apps/client/src/features/app-settings/panel/general-panel/GeneralPanelForm.tsx @@ -152,9 +152,10 @@ export default function GeneralPanelForm() { + - + diff --git a/apps/client/src/translation/TranslationProvider.tsx b/apps/client/src/translation/TranslationProvider.tsx index 46e867baca..22a8023868 100644 --- a/apps/client/src/translation/TranslationProvider.tsx +++ b/apps/client/src/translation/TranslationProvider.tsx @@ -2,6 +2,7 @@ import { createContext, PropsWithChildren, useCallback, useContext } from 'react import useSettings from '../common/hooks-query/useSettings'; +import { langPtbr } from './languages/pt-br'; import { langDe } from './languages/de'; import { langEn } from './languages/en'; import { langEs } from './languages/es'; @@ -12,6 +13,7 @@ import { langNo } from './languages/no'; import { langPl } from './languages/pl'; import { langPt } from './languages/pt'; import { langSv } from './languages/sv'; +import { Playback } from 'ontime-types'; const translationsList = { en: langEn, @@ -24,6 +26,7 @@ const translationsList = { pt: langPt, sv: langSv, pl: langPl, + ptbr: langPtbr, }; interface TranslationContextValue { @@ -60,3 +63,12 @@ export const useTranslation = () => { const { getLocalizedString } = useContext(TranslationContext); return { getLocalizedString }; }; +export interface StatusBarTimersProps { + projectTitle: string; + playback: Playback; + selectedEventId: string | null; + firstStart?: number; + firstId?: string; + lastEnd?: number; + lastId?: string; +} diff --git a/apps/client/src/translation/languages/pt-br.ts b/apps/client/src/translation/languages/pt-br.ts new file mode 100644 index 0000000000..ec59875dd5 --- /dev/null +++ b/apps/client/src/translation/languages/pt-br.ts @@ -0,0 +1,26 @@ +import { TranslationObject } from './en'; + +export const langPtbr: TranslationObject = { + 'common.expected_finish': 'TÉRMINO ESPERADO', + 'common.minutes': 'min', + 'common.now': 'AGORA', + 'common.next': 'PRÓXIMO', + 'common.public_message': 'MENSAGEM PÚBLICA', + 'common.scheduled_start': 'INÍCIO PLANEJADO', + 'common.scheduled_end': 'ENCERRAMENTO PLANEJADO', + 'common.projected_start': 'INÍCIO PREVISTO', + 'common.projected_end': 'ENCERRAMENTO PREVISTO', + 'common.stage_timer': 'TEMPO DO APRESENTADOR', + 'common.started_at': 'INICIADO ÀS', + 'common.time_now': 'HORA ATUAL', + 'countdown.ended': 'EVENTO ENCERRADO ÀS', + 'countdown.running': 'TEMPO RESTANTE', + 'countdown.select_event': 'SELECIONE UM EVENTO PARA ACOMPANHAR', + 'countdown.to_start': 'Tempo para Iniciar', + 'countdown.waiting': 'Aguardando o Início do Evento', + 'countdown.overtime': 'em tempo extra', + 'timeline.live': 'AGORA', + 'timeline.done': 'Concluído', + 'timeline.due': 'Pendente', + 'timeline.followedby': 'Seguido por', +}; From 8fde0b5fde164730cdeb17fa48533ae87d6ec70b Mon Sep 17 00:00:00 2001 From: cicatelli Date: Thu, 3 Oct 2024 11:37:55 -0300 Subject: [PATCH 2/5] Include translation in operator view --- .../operator/status-bar/StatusBarTimers.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/client/src/features/operator/status-bar/StatusBarTimers.tsx b/apps/client/src/features/operator/status-bar/StatusBarTimers.tsx index 607228a8e3..65f2b20b7a 100644 --- a/apps/client/src/features/operator/status-bar/StatusBarTimers.tsx +++ b/apps/client/src/features/operator/status-bar/StatusBarTimers.tsx @@ -8,6 +8,7 @@ import ClockTime from '../../viewers/common/clock-time/ClockTime'; import RunningTime from '../../viewers/common/running-time/RunningTime'; import styles from './StatusBar.module.scss'; +import { useTranslation } from '../../../../../client/src/translation/TranslationProvider'; interface StatusBarTimersProps { projectTitle: string; @@ -25,6 +26,8 @@ export default function StatusBarTimers(props: StatusBarTimersProps) { const timer = useTimer(); const { clock } = useClock(); + const { getLocalizedString } = useTranslation(); + const getTimeStart = (): MaybeNumber => { if (firstStart === undefined) { return null; @@ -61,25 +64,25 @@ export default function StatusBarTimers(props: StatusBarTimersProps) {
{PlaybackIconComponent}
- Time now + {getLocalizedString('common.time_now')}
- Elapsed time + {getLocalizedString('common.time_now')}Elapsed time
- Running timer + {getLocalizedString('countdown.running')}
{projectTitle}
- Scheduled start + {getLocalizedString('common.scheduled_start')}
- Scheduled end + {getLocalizedString('common.scheduled_end')}
From 44c730b6bc7b0c311d374091de69b243afd9aff6 Mon Sep 17 00:00:00 2001 From: cicatelli Date: Thu, 3 Oct 2024 12:22:12 -0300 Subject: [PATCH 3/5] bug fix bug fix and addition of elapsed_time language variable --- .../client/src/features/operator/status-bar/StatusBarTimers.tsx | 2 +- apps/client/src/translation/languages/de.ts | 1 + apps/client/src/translation/languages/en.ts | 1 + apps/client/src/translation/languages/es.ts | 1 + apps/client/src/translation/languages/fr.ts | 1 + apps/client/src/translation/languages/hu.ts | 1 + apps/client/src/translation/languages/it.ts | 1 + apps/client/src/translation/languages/no.ts | 1 + apps/client/src/translation/languages/pl.ts | 1 + apps/client/src/translation/languages/pt-br.ts | 1 + 10 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/client/src/features/operator/status-bar/StatusBarTimers.tsx b/apps/client/src/features/operator/status-bar/StatusBarTimers.tsx index 65f2b20b7a..7e66a95110 100644 --- a/apps/client/src/features/operator/status-bar/StatusBarTimers.tsx +++ b/apps/client/src/features/operator/status-bar/StatusBarTimers.tsx @@ -68,7 +68,7 @@ export default function StatusBarTimers(props: StatusBarTimersProps) {
- {getLocalizedString('common.time_now')}Elapsed time + {getLocalizedString('commom.elapsed_time')}
diff --git a/apps/client/src/translation/languages/de.ts b/apps/client/src/translation/languages/de.ts index e75c293aa6..bf82c5c27f 100644 --- a/apps/client/src/translation/languages/de.ts +++ b/apps/client/src/translation/languages/de.ts @@ -13,6 +13,7 @@ export const langDe: TranslationObject = { 'common.stage_timer': 'Bühnen-Timer', 'common.started_at': 'Gestartet am', 'common.time_now': 'Aktuelle Zeit', + 'commom.elapsed_time': 'Elapsed Time', 'countdown.ended': 'Veranstaltung endete um', 'countdown.running': 'Veranstaltung läuft', 'countdown.select_event': 'Wählen Sie eine Veranstaltung aus, um sie zu verfolgen', diff --git a/apps/client/src/translation/languages/en.ts b/apps/client/src/translation/languages/en.ts index c0889b05bb..9c2c9eae52 100644 --- a/apps/client/src/translation/languages/en.ts +++ b/apps/client/src/translation/languages/en.ts @@ -11,6 +11,7 @@ export const langEn = { 'common.stage_timer': 'Stage Timer', 'common.started_at': 'Started At', 'common.time_now': 'Time now', + 'commom.elapsed_time': 'Elapsed Time', 'countdown.ended': 'Event ended at', 'countdown.running': 'Event running', 'countdown.select_event': 'Select an event to follow', diff --git a/apps/client/src/translation/languages/es.ts b/apps/client/src/translation/languages/es.ts index e63a30c4ba..74eb8fe082 100644 --- a/apps/client/src/translation/languages/es.ts +++ b/apps/client/src/translation/languages/es.ts @@ -13,6 +13,7 @@ export const langEs: TranslationObject = { 'common.stage_timer': 'Temporizador de presentador', 'common.started_at': 'Iniciado en', 'common.time_now': 'Ahora', + 'commom.elapsed_time': 'Elapsed Time', 'countdown.ended': 'Evento finalizado a las', 'countdown.running': 'Evento en curso', 'countdown.select_event': 'Seleccionar un evento para seguir', diff --git a/apps/client/src/translation/languages/fr.ts b/apps/client/src/translation/languages/fr.ts index 5ed6eab3f1..fdc122cda7 100644 --- a/apps/client/src/translation/languages/fr.ts +++ b/apps/client/src/translation/languages/fr.ts @@ -13,6 +13,7 @@ export const langFr: TranslationObject = { 'common.stage_timer': 'Minuteur de scène', 'common.started_at': 'Commencé à', 'common.time_now': 'Heure', + 'commom.elapsed_time': 'Elapsed Time', 'countdown.ended': 'Évènement terminé à', 'countdown.running': 'Évènement en cours', 'countdown.select_event': 'Sélectionnez un évènement à suivre', diff --git a/apps/client/src/translation/languages/hu.ts b/apps/client/src/translation/languages/hu.ts index 46669cbbe5..4aa8d48ced 100644 --- a/apps/client/src/translation/languages/hu.ts +++ b/apps/client/src/translation/languages/hu.ts @@ -13,6 +13,7 @@ export const langHu: TranslationObject = { 'common.stage_timer': 'Színpadi időzítő', 'common.started_at': 'Kezdődött', 'common.time_now': 'Jelenlegi idő', + 'commom.elapsed_time': 'Elapsed Time', 'countdown.ended': 'Esemény véget ért', 'countdown.running': 'Esemény folyamatban', 'countdown.select_event': 'Válassza ki a követendő eseményt', diff --git a/apps/client/src/translation/languages/it.ts b/apps/client/src/translation/languages/it.ts index 830425c4b9..286f61560b 100644 --- a/apps/client/src/translation/languages/it.ts +++ b/apps/client/src/translation/languages/it.ts @@ -13,6 +13,7 @@ export const langIt: TranslationObject = { 'common.stage_timer': 'Orologio Palco', 'common.started_at': 'Iniziato Alle', 'common.time_now': 'Ora attuale', + 'commom.elapsed_time': 'Elapsed Time', 'countdown.ended': 'Evento finito alle', 'countdown.running': 'Evento in corso', 'countdown.select_event': 'Seleziona un evento da seguire', diff --git a/apps/client/src/translation/languages/no.ts b/apps/client/src/translation/languages/no.ts index 075aa142e6..e0dcbcb032 100644 --- a/apps/client/src/translation/languages/no.ts +++ b/apps/client/src/translation/languages/no.ts @@ -13,6 +13,7 @@ export const langNo: TranslationObject = { 'common.stage_timer': 'Scenetimer', 'common.started_at': 'Startet', 'common.time_now': 'Klokken nå', + 'commom.elapsed_time': 'Elapsed Time', 'countdown.ended': 'Hendelse avsluttet', 'countdown.running': 'Hendelse pågår', 'countdown.select_event': 'Velg en hendelse å følge', diff --git a/apps/client/src/translation/languages/pl.ts b/apps/client/src/translation/languages/pl.ts index a974c18271..647c163f6b 100644 --- a/apps/client/src/translation/languages/pl.ts +++ b/apps/client/src/translation/languages/pl.ts @@ -13,6 +13,7 @@ export const langPl: TranslationObject = { 'common.stage_timer': 'Timer Scena', 'common.started_at': 'Rozpoczęte o', 'common.time_now': 'Aktualny czas', + 'commom.elapsed_time': 'Elapsed Time', 'countdown.ended': 'Zakończone o', 'countdown.running': 'Trwa', 'countdown.select_event': 'Wybierz event który chcesz śledzić', diff --git a/apps/client/src/translation/languages/pt-br.ts b/apps/client/src/translation/languages/pt-br.ts index ec59875dd5..07586cda1c 100644 --- a/apps/client/src/translation/languages/pt-br.ts +++ b/apps/client/src/translation/languages/pt-br.ts @@ -13,6 +13,7 @@ export const langPtbr: TranslationObject = { 'common.stage_timer': 'TEMPO DO APRESENTADOR', 'common.started_at': 'INICIADO ÀS', 'common.time_now': 'HORA ATUAL', + 'commom.elapsed_time': 'TEMPO CORRIDO', 'countdown.ended': 'EVENTO ENCERRADO ÀS', 'countdown.running': 'TEMPO RESTANTE', 'countdown.select_event': 'SELECIONE UM EVENTO PARA ACOMPANHAR', From 58a6d965be465c45b7a5cbfcfa0002f079557834 Mon Sep 17 00:00:00 2001 From: cicatelli Date: Thu, 3 Oct 2024 12:58:10 -0300 Subject: [PATCH 4/5] bug fix commom>common --- .../src/features/operator/status-bar/StatusBarTimers.tsx | 2 +- apps/client/src/translation/languages/de.ts | 2 +- apps/client/src/translation/languages/en.ts | 4 +++- apps/client/src/translation/languages/es.ts | 2 +- apps/client/src/translation/languages/fr.ts | 2 +- apps/client/src/translation/languages/hu.ts | 2 +- apps/client/src/translation/languages/it.ts | 2 +- apps/client/src/translation/languages/no.ts | 2 +- apps/client/src/translation/languages/pl.ts | 2 +- apps/client/src/translation/languages/pt-br.ts | 2 +- apps/client/src/translation/languages/pt.ts | 1 + apps/client/src/translation/languages/sv.ts | 1 + 12 files changed, 14 insertions(+), 10 deletions(-) diff --git a/apps/client/src/features/operator/status-bar/StatusBarTimers.tsx b/apps/client/src/features/operator/status-bar/StatusBarTimers.tsx index 7e66a95110..f2f5aa5594 100644 --- a/apps/client/src/features/operator/status-bar/StatusBarTimers.tsx +++ b/apps/client/src/features/operator/status-bar/StatusBarTimers.tsx @@ -68,7 +68,7 @@ export default function StatusBarTimers(props: StatusBarTimersProps) {
- {getLocalizedString('commom.elapsed_time')} + {getLocalizedString('common.elapsed_time')}
diff --git a/apps/client/src/translation/languages/de.ts b/apps/client/src/translation/languages/de.ts index bf82c5c27f..fe79bb7527 100644 --- a/apps/client/src/translation/languages/de.ts +++ b/apps/client/src/translation/languages/de.ts @@ -13,7 +13,7 @@ export const langDe: TranslationObject = { 'common.stage_timer': 'Bühnen-Timer', 'common.started_at': 'Gestartet am', 'common.time_now': 'Aktuelle Zeit', - 'commom.elapsed_time': 'Elapsed Time', + 'common.elapsed_time': 'Elapsed Time', 'countdown.ended': 'Veranstaltung endete um', 'countdown.running': 'Veranstaltung läuft', 'countdown.select_event': 'Wählen Sie eine Veranstaltung aus, um sie zu verfolgen', diff --git a/apps/client/src/translation/languages/en.ts b/apps/client/src/translation/languages/en.ts index 9c2c9eae52..fff38bda6c 100644 --- a/apps/client/src/translation/languages/en.ts +++ b/apps/client/src/translation/languages/en.ts @@ -11,7 +11,7 @@ export const langEn = { 'common.stage_timer': 'Stage Timer', 'common.started_at': 'Started At', 'common.time_now': 'Time now', - 'commom.elapsed_time': 'Elapsed Time', + 'common.elapsed_time': 'Elapsed Time', 'countdown.ended': 'Event ended at', 'countdown.running': 'Event running', 'countdown.select_event': 'Select an event to follow', @@ -22,6 +22,8 @@ export const langEn = { 'timeline.done': 'done', 'timeline.due': 'due', 'timeline.followedby': 'Followed by', + + }; export type TranslationObject = Record; diff --git a/apps/client/src/translation/languages/es.ts b/apps/client/src/translation/languages/es.ts index 74eb8fe082..7d5d5f2991 100644 --- a/apps/client/src/translation/languages/es.ts +++ b/apps/client/src/translation/languages/es.ts @@ -13,7 +13,7 @@ export const langEs: TranslationObject = { 'common.stage_timer': 'Temporizador de presentador', 'common.started_at': 'Iniciado en', 'common.time_now': 'Ahora', - 'commom.elapsed_time': 'Elapsed Time', + 'common.elapsed_time': 'Elapsed Time', 'countdown.ended': 'Evento finalizado a las', 'countdown.running': 'Evento en curso', 'countdown.select_event': 'Seleccionar un evento para seguir', diff --git a/apps/client/src/translation/languages/fr.ts b/apps/client/src/translation/languages/fr.ts index fdc122cda7..69af64e4f7 100644 --- a/apps/client/src/translation/languages/fr.ts +++ b/apps/client/src/translation/languages/fr.ts @@ -13,7 +13,7 @@ export const langFr: TranslationObject = { 'common.stage_timer': 'Minuteur de scène', 'common.started_at': 'Commencé à', 'common.time_now': 'Heure', - 'commom.elapsed_time': 'Elapsed Time', + 'common.elapsed_time': 'Elapsed Time', 'countdown.ended': 'Évènement terminé à', 'countdown.running': 'Évènement en cours', 'countdown.select_event': 'Sélectionnez un évènement à suivre', diff --git a/apps/client/src/translation/languages/hu.ts b/apps/client/src/translation/languages/hu.ts index 4aa8d48ced..df49a97303 100644 --- a/apps/client/src/translation/languages/hu.ts +++ b/apps/client/src/translation/languages/hu.ts @@ -13,7 +13,7 @@ export const langHu: TranslationObject = { 'common.stage_timer': 'Színpadi időzítő', 'common.started_at': 'Kezdődött', 'common.time_now': 'Jelenlegi idő', - 'commom.elapsed_time': 'Elapsed Time', + 'common.elapsed_time': 'Elapsed Time', 'countdown.ended': 'Esemény véget ért', 'countdown.running': 'Esemény folyamatban', 'countdown.select_event': 'Válassza ki a követendő eseményt', diff --git a/apps/client/src/translation/languages/it.ts b/apps/client/src/translation/languages/it.ts index 286f61560b..d4b83f07b2 100644 --- a/apps/client/src/translation/languages/it.ts +++ b/apps/client/src/translation/languages/it.ts @@ -13,7 +13,7 @@ export const langIt: TranslationObject = { 'common.stage_timer': 'Orologio Palco', 'common.started_at': 'Iniziato Alle', 'common.time_now': 'Ora attuale', - 'commom.elapsed_time': 'Elapsed Time', + 'common.elapsed_time': 'Elapsed Time', 'countdown.ended': 'Evento finito alle', 'countdown.running': 'Evento in corso', 'countdown.select_event': 'Seleziona un evento da seguire', diff --git a/apps/client/src/translation/languages/no.ts b/apps/client/src/translation/languages/no.ts index e0dcbcb032..015294b983 100644 --- a/apps/client/src/translation/languages/no.ts +++ b/apps/client/src/translation/languages/no.ts @@ -13,7 +13,7 @@ export const langNo: TranslationObject = { 'common.stage_timer': 'Scenetimer', 'common.started_at': 'Startet', 'common.time_now': 'Klokken nå', - 'commom.elapsed_time': 'Elapsed Time', + 'common.elapsed_time': 'Elapsed Time', 'countdown.ended': 'Hendelse avsluttet', 'countdown.running': 'Hendelse pågår', 'countdown.select_event': 'Velg en hendelse å følge', diff --git a/apps/client/src/translation/languages/pl.ts b/apps/client/src/translation/languages/pl.ts index 647c163f6b..ad78cdbbb6 100644 --- a/apps/client/src/translation/languages/pl.ts +++ b/apps/client/src/translation/languages/pl.ts @@ -13,7 +13,7 @@ export const langPl: TranslationObject = { 'common.stage_timer': 'Timer Scena', 'common.started_at': 'Rozpoczęte o', 'common.time_now': 'Aktualny czas', - 'commom.elapsed_time': 'Elapsed Time', + 'common.elapsed_time': 'Elapsed Time', 'countdown.ended': 'Zakończone o', 'countdown.running': 'Trwa', 'countdown.select_event': 'Wybierz event który chcesz śledzić', diff --git a/apps/client/src/translation/languages/pt-br.ts b/apps/client/src/translation/languages/pt-br.ts index 07586cda1c..6b498ab078 100644 --- a/apps/client/src/translation/languages/pt-br.ts +++ b/apps/client/src/translation/languages/pt-br.ts @@ -13,7 +13,7 @@ export const langPtbr: TranslationObject = { 'common.stage_timer': 'TEMPO DO APRESENTADOR', 'common.started_at': 'INICIADO ÀS', 'common.time_now': 'HORA ATUAL', - 'commom.elapsed_time': 'TEMPO CORRIDO', + 'common.elapsed_time': 'TEMPO CORRIDO', 'countdown.ended': 'EVENTO ENCERRADO ÀS', 'countdown.running': 'TEMPO RESTANTE', 'countdown.select_event': 'SELECIONE UM EVENTO PARA ACOMPANHAR', diff --git a/apps/client/src/translation/languages/pt.ts b/apps/client/src/translation/languages/pt.ts index fdae87c280..0d406e7696 100644 --- a/apps/client/src/translation/languages/pt.ts +++ b/apps/client/src/translation/languages/pt.ts @@ -13,6 +13,7 @@ export const langPt: TranslationObject = { 'common.stage_timer': 'Temporizador do presentador', 'common.started_at': 'Iniciado em', 'common.time_now': 'Hora atual', + 'common.elapsed_time': 'Elapsed Time', 'countdown.ended': 'Evento encerrado às', 'countdown.running': 'Evento em andamento', 'countdown.select_event': 'Selecione um evento para acompanhar', diff --git a/apps/client/src/translation/languages/sv.ts b/apps/client/src/translation/languages/sv.ts index 8fc9c9fb70..c7723a9e65 100644 --- a/apps/client/src/translation/languages/sv.ts +++ b/apps/client/src/translation/languages/sv.ts @@ -13,6 +13,7 @@ export const langSv: TranslationObject = { 'common.stage_timer': 'Timer för scenen', 'common.started_at': 'Började vid', 'common.time_now': 'Klockan nu', + 'common.elapsed_time': 'Elapsed Time', 'countdown.ended': 'Evenemanget avslutades vid', 'countdown.running': 'Evenemang pågår', 'countdown.select_event': 'Välj ett evenemang att följa', From 405d8aa8f4e58f59f4fb239720374189c6f2c7c9 Mon Sep 17 00:00:00 2001 From: cicatelli Date: Thu, 3 Oct 2024 18:50:58 -0300 Subject: [PATCH 5/5] Editor view translation system Implementation of variables in the texts on the editor screen so that they use the variables from the translation system. The number of translation variables has been increased. The language is already correct in English and Brazilian Portuguese; for other languages, the variables for each language must be translated. --- .../control/message/MessageControl.tsx | 13 +++-- .../control/message/TimerViewControl.tsx | 12 +++-- .../control/playback/aux-timer/AuxTimer.tsx | 5 +- .../playback/playback-timer/PlaybackTimer.tsx | 8 ++- .../client/src/features/overview/Overview.tsx | 33 +++++++----- .../rundown/event-block/EventBlock.utils.ts | 13 ++++- .../rundown/event-block/EventBlockInner.tsx | 7 ++- .../rundown/event-editor/EventEditor.tsx | 9 +++- .../composite/EventEditorTimes.tsx | 36 +++++++------ .../composite/EventEditorTitles.tsx | 14 +++-- .../rundown/quick-add-block/QuickAddBlock.tsx | 10 ++-- .../rundown/rundown-header/RundownHeader.tsx | 7 ++- .../rundown/rundown-header/RundownMenu.tsx | 14 +++-- apps/client/src/translation/languages/de.ts | 49 +++++++++++++++++ apps/client/src/translation/languages/en.ts | 49 +++++++++++++++++ apps/client/src/translation/languages/es.ts | 49 +++++++++++++++++ apps/client/src/translation/languages/fr.ts | 49 +++++++++++++++++ apps/client/src/translation/languages/hu.ts | 49 +++++++++++++++++ apps/client/src/translation/languages/it.ts | 49 +++++++++++++++++ apps/client/src/translation/languages/no.ts | 49 +++++++++++++++++ apps/client/src/translation/languages/pl.ts | 49 +++++++++++++++++ .../client/src/translation/languages/pt-br.ts | 53 ++++++++++++++++++- apps/client/src/translation/languages/pt.ts | 49 +++++++++++++++++ apps/client/src/translation/languages/sv.ts | 49 +++++++++++++++++ 24 files changed, 663 insertions(+), 61 deletions(-) diff --git a/apps/client/src/features/control/message/MessageControl.tsx b/apps/client/src/features/control/message/MessageControl.tsx index 2c1118a5e2..e209c806dd 100644 --- a/apps/client/src/features/control/message/MessageControl.tsx +++ b/apps/client/src/features/control/message/MessageControl.tsx @@ -3,6 +3,8 @@ import { setMessage, useExternalMessageInput, useTimerMessageInput } from '../.. import InputRow from './InputRow'; import TimerControlsPreview from './TimerViewControl'; +import { useTranslation } from '../../../translation/TranslationProvider'; + export default function MessageControl() { return ( <> @@ -15,11 +17,12 @@ export default function MessageControl() { function TimerMessageInput() { const { text, visible } = useTimerMessageInput(); + const { getLocalizedString } = useTranslation(); return ( setMessage.timerText(newValue)} @@ -39,10 +42,12 @@ function ExternalInput() { } }; + const { getLocalizedString } = useTranslation(); + return ( setMessage.externalText(newValue)} diff --git a/apps/client/src/features/control/message/TimerViewControl.tsx b/apps/client/src/features/control/message/TimerViewControl.tsx index 8bef7ecde5..d46291c1f5 100644 --- a/apps/client/src/features/control/message/TimerViewControl.tsx +++ b/apps/client/src/features/control/message/TimerViewControl.tsx @@ -6,6 +6,8 @@ import TimerPreview from './TimerPreview'; import style from './MessageControl.module.scss'; +import { useTranslation } from '../../../translation/TranslationProvider'; + export default function TimerControlsPreview() { const { blackout, blink, secondarySource } = useTimerViewControl(); @@ -17,6 +19,8 @@ export default function TimerControlsPreview() { } }; + const { getLocalizedString } = useTranslation(); + return (
@@ -27,14 +31,14 @@ export default function TimerControlsPreview() { variant={secondarySource === 'aux' ? 'ontime-filled' : 'ontime-subtle'} onClick={() => toggleSecondary('aux')} > - Show Aux timer + {getLocalizedString('timer.show_auxtime')}
@@ -45,7 +49,7 @@ export default function TimerControlsPreview() { onClick={() => setMessage.timerBlink(!blink)} data-testid='toggle timer blink' > - Blink + {getLocalizedString('timer.blink')}
diff --git a/apps/client/src/features/control/playback/aux-timer/AuxTimer.tsx b/apps/client/src/features/control/playback/aux-timer/AuxTimer.tsx index ae2b8ecde8..ff324d0d69 100644 --- a/apps/client/src/features/control/playback/aux-timer/AuxTimer.tsx +++ b/apps/client/src/features/control/playback/aux-timer/AuxTimer.tsx @@ -11,10 +11,11 @@ import { setAuxTimer, useAuxTimerControl, useAuxTimerTime } from '../../../../co import TapButton from '../tap-button/TapButton'; import style from './AuxTimer.module.scss'; +import { useTranslation } from '../../../../translation/TranslationProvider'; export function AuxTimer() { const { playback, direction } = useAuxTimerControl(); - + const { getLocalizedString } = useTranslation(); const { start, pause, stop, setDirection } = setAuxTimer; const toggleDirection = () => { @@ -30,7 +31,7 @@ export function AuxTimer() { return (