From b0e48d370393305524b0e6ab670d69316bccc2ef Mon Sep 17 00:00:00 2001 From: adam-skowronek Date: Wed, 16 Nov 2022 22:40:51 +0100 Subject: [PATCH] Add calendar translation --- frontend/src/utils/bigCalendarTranslations.ts | 22 +++++++++++++++++++ frontend/src/views/coordinator/Schedule.tsx | 2 ++ .../src/views/student/StudentSchedule.tsx | 2 ++ 3 files changed, 26 insertions(+) create mode 100644 frontend/src/utils/bigCalendarTranslations.ts diff --git a/frontend/src/utils/bigCalendarTranslations.ts b/frontend/src/utils/bigCalendarTranslations.ts new file mode 100644 index 0000000..cd47f75 --- /dev/null +++ b/frontend/src/utils/bigCalendarTranslations.ts @@ -0,0 +1,22 @@ +const bigCalendarTranslations = { + date: 'Data', + time: 'Czas', + event: 'Event', + allDay: 'Cały dzień', + week: 'Tydzień', + work_week: 'Dni robocze', + day: 'Dzień', + month: 'Miesiąc', + previous: 'Cofnij', + next: 'Dalej', + yesterday: 'Wczoraj', + tomorrow: 'Jutro', + today: 'Dzisiaj', + agenda: 'Agenda', + + noEventsInRange: 'Brak wydarzeń w tym czasie.', + + showMore: (total: number) => `+${total} more`, +} + +export default bigCalendarTranslations diff --git a/frontend/src/views/coordinator/Schedule.tsx b/frontend/src/views/coordinator/Schedule.tsx index 6581e5a..f29f4e1 100644 --- a/frontend/src/views/coordinator/Schedule.tsx +++ b/frontend/src/views/coordinator/Schedule.tsx @@ -14,6 +14,7 @@ import EditSchedule from './EditSchedule' import Select from 'react-select' import { getLeaders } from '../../api/leaders' import useLocalStorageState from 'use-local-storage-state' +import bigCalendarTranslations from '../../utils/bigCalendarTranslations' const customStyles = { content: { @@ -229,6 +230,7 @@ const Schedule = () => { eventPropGetter={eventGetter} min={DateTime.fromObject({ hour: 8, minute: 0 }).toJSDate()} max={DateTime.fromObject({ hour: 16, minute: 0 }).toJSDate()} + messages={bigCalendarTranslations} /> { eventPropGetter={eventGetter} min={DateTime.fromObject({ hour: 8, minute: 0 }).toJSDate()} max={DateTime.fromObject({ hour: 16, minute: 0 }).toJSDate()} + messages={bigCalendarTranslations} />