Add calendar translation

This commit is contained in:
adam-skowronek 2022-11-16 22:40:51 +01:00
parent 76218a92ca
commit b0e48d3703
3 changed files with 26 additions and 0 deletions

View File

@ -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

View File

@ -14,6 +14,7 @@ import EditSchedule from './EditSchedule'
import Select from 'react-select' import Select from 'react-select'
import { getLeaders } from '../../api/leaders' import { getLeaders } from '../../api/leaders'
import useLocalStorageState from 'use-local-storage-state' import useLocalStorageState from 'use-local-storage-state'
import bigCalendarTranslations from '../../utils/bigCalendarTranslations'
const customStyles = { const customStyles = {
content: { content: {
@ -229,6 +230,7 @@ const Schedule = () => {
eventPropGetter={eventGetter} eventPropGetter={eventGetter}
min={DateTime.fromObject({ hour: 8, minute: 0 }).toJSDate()} min={DateTime.fromObject({ hour: 8, minute: 0 }).toJSDate()}
max={DateTime.fromObject({ hour: 16, minute: 0 }).toJSDate()} max={DateTime.fromObject({ hour: 16, minute: 0 }).toJSDate()}
messages={bigCalendarTranslations}
/> />
<Modal <Modal

View File

@ -7,6 +7,7 @@ import { useParams } from 'react-router-dom'
import Modal from 'react-modal' import Modal from 'react-modal'
import { useForm } from 'react-hook-form' import { useForm } from 'react-hook-form'
import ScheduleAddGroup from './ScheduleAddGroup' import ScheduleAddGroup from './ScheduleAddGroup'
import bigCalendarTranslations from '../../utils/bigCalendarTranslations'
const customStyles = { const customStyles = {
content: { content: {
@ -140,6 +141,7 @@ const StudentSchedule = () => {
eventPropGetter={eventGetter} eventPropGetter={eventGetter}
min={DateTime.fromObject({ hour: 8, minute: 0 }).toJSDate()} min={DateTime.fromObject({ hour: 8, minute: 0 }).toJSDate()}
max={DateTime.fromObject({ hour: 16, minute: 0 }).toJSDate()} max={DateTime.fromObject({ hour: 16, minute: 0 }).toJSDate()}
messages={bigCalendarTranslations}
/> />
<Modal <Modal