diff --git a/package.json b/package.json index 60d0639c..bc608730 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,8 @@ "mathjax-full": "^3.2.2", "mathjax-react": "^2.0.1", "next": "15.0.3", + "ra-i18n-polyglot": "^5.4.0", + "ra-language-slovak": "^3.6.2", "react": "19.0.0-rc-66855b96-20241106", "react-admin": "^5.4.0", "react-cookie": "^4.1.1", diff --git a/src/components/Admin/Admin.tsx b/src/components/Admin/Admin.tsx index 2c74438f..de1f3fd7 100644 --- a/src/components/Admin/Admin.tsx +++ b/src/components/Admin/Admin.tsx @@ -3,6 +3,7 @@ import {Admin as ReactAdmin, Resource} from 'react-admin' import {AdminLayout} from './AdminLayout' import {dataProvider} from './dataProvider' +import {myI18nProvider} from './i18nProvider' import {FlatpageCreate} from './resources/base/flat-page/FlatpageCreate' import {FlatpageEdit} from './resources/base/flat-page/FlatpageEdit' import {FlatpageList} from './resources/base/flat-page/FlatpageList' @@ -51,7 +52,12 @@ export const Admin: FC = () => { const authProvider = useAuthProvider() return ( - + { const router = useRouter() const logout = useLogout() - + const translate = useTranslate() return ( { @@ -34,6 +34,7 @@ const AppMenuBar = () => { } export const AdminLayout: FC = ({children}) => { + const translate = useTranslate() return ( <> {children} @@ -50,7 +51,7 @@ export const AdminLayout: FC = ({children}) => { }} > - Všetky časy sú uvedené v časovom pásme Europe/Bratislava + {translate('content.footer.timezone_message')} diff --git a/src/components/Admin/custom/LatexPreview.tsx b/src/components/Admin/custom/LatexPreview.tsx index 5a77b7ee..25f6d9b7 100644 --- a/src/components/Admin/custom/LatexPreview.tsx +++ b/src/components/Admin/custom/LatexPreview.tsx @@ -7,7 +7,7 @@ export const LatexPreview: FC = ({source}) => { if (!source) return null return ( - + {({formData}) => { const data = formData[source] diff --git a/src/components/Admin/custom/MyEditActions.tsx b/src/components/Admin/custom/MyEditActions.tsx index d3dc95b8..d4864a91 100644 --- a/src/components/Admin/custom/MyEditActions.tsx +++ b/src/components/Admin/custom/MyEditActions.tsx @@ -24,7 +24,7 @@ export const MyEditActions: FC = () => { we want to link to the specific show tab, not just resource show */} {/* @ts-ignore */} - + ) } diff --git a/src/components/Admin/custom/MyShowActions.tsx b/src/components/Admin/custom/MyShowActions.tsx index bd801d7b..96b66f07 100644 --- a/src/components/Admin/custom/MyShowActions.tsx +++ b/src/components/Admin/custom/MyShowActions.tsx @@ -21,7 +21,7 @@ export const MyShowActions: FC = () => { return ( - + ) } diff --git a/src/components/Admin/custom/SeasonCodeField.tsx b/src/components/Admin/custom/SeasonCodeField.tsx index ef821dad..5c8ed45c 100644 --- a/src/components/Admin/custom/SeasonCodeField.tsx +++ b/src/components/Admin/custom/SeasonCodeField.tsx @@ -1,14 +1,16 @@ import {FC} from 'react' -import {FunctionField, FunctionFieldProps} from 'react-admin' +import {FunctionField, FunctionFieldProps, useTranslate} from 'react-admin' import {seasonCodeStrings} from '../seasonCodeStrings' export const SeasonCodeField: FC> = ({source, ...rest}) => { + const translate = useTranslate() + return ( { - return `${seasonCodeStrings[record.season_code].name ?? ''}` + return translate(seasonCodeStrings[record.season_code].name ?? '') }} {...rest} /> diff --git a/src/components/Admin/i18nProvider.ts b/src/components/Admin/i18nProvider.ts new file mode 100644 index 00000000..c160a6ed --- /dev/null +++ b/src/components/Admin/i18nProvider.ts @@ -0,0 +1,5 @@ +import polyglotI18nProvider from 'ra-i18n-polyglot' + +import {sk_SK} from './translations/sk_SK' + +export const myI18nProvider = polyglotI18nProvider(() => sk_SK, 'sk', [{locale: 'sk', name: 'Slovak (sk_SK)'}]) diff --git a/src/components/Admin/resources/base/flat-page/FlatpageCreate.tsx b/src/components/Admin/resources/base/flat-page/FlatpageCreate.tsx index a1a6a2c3..9d809426 100644 --- a/src/components/Admin/resources/base/flat-page/FlatpageCreate.tsx +++ b/src/components/Admin/resources/base/flat-page/FlatpageCreate.tsx @@ -7,13 +7,13 @@ import {MyCreate} from '@/components/Admin/custom/MyCreate' export const FlatpageCreate: FC = () => ( - + - + diff --git a/src/components/Admin/resources/base/flat-page/FlatpageEdit.tsx b/src/components/Admin/resources/base/flat-page/FlatpageEdit.tsx index 5c9f9ec8..fbac4e08 100644 --- a/src/components/Admin/resources/base/flat-page/FlatpageEdit.tsx +++ b/src/components/Admin/resources/base/flat-page/FlatpageEdit.tsx @@ -7,13 +7,13 @@ import {MyEdit} from '@/components/Admin/custom/MyEdit' export const FlatpageEdit: FC = () => ( - + - + diff --git a/src/components/Admin/resources/cms/post/PostCreate.tsx b/src/components/Admin/resources/cms/post/PostCreate.tsx index 3d4dba39..6e23776e 100644 --- a/src/components/Admin/resources/cms/post/PostCreate.tsx +++ b/src/components/Admin/resources/cms/post/PostCreate.tsx @@ -10,7 +10,7 @@ export const PostCreate: FC = () => { return ( - + @@ -19,7 +19,7 @@ export const PostCreate: FC = () => { - + @@ -27,7 +27,7 @@ export const PostCreate: FC = () => { - + diff --git a/src/components/Admin/resources/cms/post/PostEdit.tsx b/src/components/Admin/resources/cms/post/PostEdit.tsx index 5ec4d2a8..0873c292 100644 --- a/src/components/Admin/resources/cms/post/PostEdit.tsx +++ b/src/components/Admin/resources/cms/post/PostEdit.tsx @@ -9,7 +9,7 @@ import {SitesCheckboxInput} from '@/components/Admin/custom/SitesCheckboxInput' export const PostEdit: FC = () => ( - + @@ -18,7 +18,7 @@ export const PostEdit: FC = () => ( - + @@ -26,7 +26,7 @@ export const PostEdit: FC = () => ( - + diff --git a/src/components/Admin/resources/cms/post/PostList.tsx b/src/components/Admin/resources/cms/post/PostList.tsx index 11956552..c6e4a203 100644 --- a/src/components/Admin/resources/cms/post/PostList.tsx +++ b/src/components/Admin/resources/cms/post/PostList.tsx @@ -15,11 +15,7 @@ export const PostList: FC = () => ( - - source="links" - label="Link count" - render={(record) => record && {record['links'].length}} - /> + source="links" render={(record) => record && {record['links'].length}} /> ) diff --git a/src/components/Admin/resources/cms/post/PostShow.tsx b/src/components/Admin/resources/cms/post/PostShow.tsx index 7ccbe2eb..b8cc260f 100644 --- a/src/components/Admin/resources/cms/post/PostShow.tsx +++ b/src/components/Admin/resources/cms/post/PostShow.tsx @@ -8,7 +8,7 @@ import {SitesArrayField} from '@/components/Admin/custom/SitesArrayField' export const PostShow: FC = () => ( }> - + @@ -19,7 +19,7 @@ export const PostShow: FC = () => ( - + diff --git a/src/components/Admin/resources/competition/competition/CompetitionEdit.tsx b/src/components/Admin/resources/competition/competition/CompetitionEdit.tsx index 6e7c25fb..dc85f310 100644 --- a/src/components/Admin/resources/competition/competition/CompetitionEdit.tsx +++ b/src/components/Admin/resources/competition/competition/CompetitionEdit.tsx @@ -12,7 +12,7 @@ export const CompetitionEdit: FC = () => ( - + diff --git a/src/components/Admin/resources/competition/competition/CompetitionList.tsx b/src/components/Admin/resources/competition/competition/CompetitionList.tsx index b7963725..5e8914c0 100644 --- a/src/components/Admin/resources/competition/competition/CompetitionList.tsx +++ b/src/components/Admin/resources/competition/competition/CompetitionList.tsx @@ -12,13 +12,13 @@ export const CompetitionList: FC = () => ( - + source="history_events" - label="History events count" + label="content.labels.history_events_count" render={(record) => record && {record['history_events'].length}} /> diff --git a/src/components/Admin/resources/competition/competition/CompetitionShow.tsx b/src/components/Admin/resources/competition/competition/CompetitionShow.tsx index a0b68d22..127ab35c 100644 --- a/src/components/Admin/resources/competition/competition/CompetitionShow.tsx +++ b/src/components/Admin/resources/competition/competition/CompetitionShow.tsx @@ -22,14 +22,14 @@ import {UpcomingOrCurrentEvent} from './UpcomingOrCurrentEvent' export const CompetitionShow: FC = () => ( - + - + @@ -38,7 +38,7 @@ export const CompetitionShow: FC = () => ( - + `/competition/event/${id}/show`}> @@ -49,7 +49,6 @@ export const CompetitionShow: FC = () => ( source="publication_set" - label="Publication count" render={(record) => record && {record['publication_set'].length}} /> diff --git a/src/components/Admin/resources/competition/competition/UpcomingOrCurrentEvent.tsx b/src/components/Admin/resources/competition/competition/UpcomingOrCurrentEvent.tsx index 408036fd..5359a13c 100644 --- a/src/components/Admin/resources/competition/competition/UpcomingOrCurrentEvent.tsx +++ b/src/components/Admin/resources/competition/competition/UpcomingOrCurrentEvent.tsx @@ -20,7 +20,7 @@ export const UpcomingOrCurrentEvent: FC = () => { return ( redirect('show', 'competition/event', record.upcoming_or_current_event.competition)} sx={{cursor: 'pointer'}} > @@ -39,7 +39,6 @@ export const UpcomingOrCurrentEvent: FC = () => { source="publication_set" - label="Publication count" // optional access because of weird behavior of nested FunctionFields for null record render={(record) => record && {record['publication_set']?.length}} /> diff --git a/src/components/Admin/resources/competition/event-registration/EventRegistrationList.tsx b/src/components/Admin/resources/competition/event-registration/EventRegistrationList.tsx index 1f896b01..d3287a00 100644 --- a/src/components/Admin/resources/competition/event-registration/EventRegistrationList.tsx +++ b/src/components/Admin/resources/competition/event-registration/EventRegistrationList.tsx @@ -8,11 +8,11 @@ export const EventRegistrationList: FC = () => ( `${record.profile.first_name} ${record.profile.last_name}`} /> - - + + diff --git a/src/components/Admin/resources/competition/event-registration/EventRegistrationShow.tsx b/src/components/Admin/resources/competition/event-registration/EventRegistrationShow.tsx index 0992ecdf..9a8f20c8 100644 --- a/src/components/Admin/resources/competition/event-registration/EventRegistrationShow.tsx +++ b/src/components/Admin/resources/competition/event-registration/EventRegistrationShow.tsx @@ -9,11 +9,11 @@ export const EventRegistrationShow: FC = () => ( `${record.profile.first_name} ${record.profile.last_name}`} /> - - + + diff --git a/src/components/Admin/resources/competition/event/EventCreate.tsx b/src/components/Admin/resources/competition/event/EventCreate.tsx index 6c97bd91..38ce9610 100644 --- a/src/components/Admin/resources/competition/event/EventCreate.tsx +++ b/src/components/Admin/resources/competition/event/EventCreate.tsx @@ -29,10 +29,10 @@ export const EventCreate: FC = () => { setIncludeRegLink(e.target.checked)} />} - label="Pridať registračný link" + label="content.labels.reg_link_add" /> {includeRegLink && ( - + <> diff --git a/src/components/Admin/resources/competition/event/EventEdit.tsx b/src/components/Admin/resources/competition/event/EventEdit.tsx index 45d8f744..5dd98c33 100644 --- a/src/components/Admin/resources/competition/event/EventEdit.tsx +++ b/src/components/Admin/resources/competition/event/EventEdit.tsx @@ -31,10 +31,10 @@ export const EventEdit: FC = () => { setIncludeRegLink(e.target.checked)} />} - label="Upraviť registračný link" + label="content.labels.reg_link_add" /> {includeRegLink && ( - + <> diff --git a/src/components/Admin/resources/competition/event/EventList.tsx b/src/components/Admin/resources/competition/event/EventList.tsx index 8fa6e69a..5a14ee64 100644 --- a/src/components/Admin/resources/competition/event/EventList.tsx +++ b/src/components/Admin/resources/competition/event/EventList.tsx @@ -18,7 +18,6 @@ export const EventList: FC = () => ( source="publication_set" - label="Publication count" render={(record) => record && {record['publication_set'].length}} /> diff --git a/src/components/Admin/resources/competition/event/EventShow.tsx b/src/components/Admin/resources/competition/event/EventShow.tsx index e7d98c67..2a4b434e 100644 --- a/src/components/Admin/resources/competition/event/EventShow.tsx +++ b/src/components/Admin/resources/competition/event/EventShow.tsx @@ -17,7 +17,7 @@ import {SeasonCodeField} from '@/components/Admin/custom/SeasonCodeField' export const EventShow: FC = () => ( - + @@ -34,7 +34,7 @@ export const EventShow: FC = () => ( - + diff --git a/src/components/Admin/resources/competition/problems/ProblemCreate.tsx b/src/components/Admin/resources/competition/problems/ProblemCreate.tsx index 358b4d9a..34079f67 100644 --- a/src/components/Admin/resources/competition/problems/ProblemCreate.tsx +++ b/src/components/Admin/resources/competition/problems/ProblemCreate.tsx @@ -17,7 +17,7 @@ export const ProblemCreate: FC = () => ( }} > - + diff --git a/src/components/Admin/resources/competition/problems/ProblemEdit.tsx b/src/components/Admin/resources/competition/problems/ProblemEdit.tsx index 54c84ce7..ca9d2e9c 100644 --- a/src/components/Admin/resources/competition/problems/ProblemEdit.tsx +++ b/src/components/Admin/resources/competition/problems/ProblemEdit.tsx @@ -17,7 +17,7 @@ export const ProblemEdit: FC = () => ( }} > - + diff --git a/src/components/Admin/resources/competition/problems/ProblemList.tsx b/src/components/Admin/resources/competition/problems/ProblemList.tsx index 325594d5..c4c3f5c7 100644 --- a/src/components/Admin/resources/competition/problems/ProblemList.tsx +++ b/src/components/Admin/resources/competition/problems/ProblemList.tsx @@ -20,7 +20,7 @@ export const ProblemList: FC = () => ( - label="Má vzorák" + label="content.labels.has_vzorak" render={(record) => record && } /> diff --git a/src/components/Admin/resources/competition/semester/SemesterEdit.tsx b/src/components/Admin/resources/competition/semester/SemesterEdit.tsx index 9101918b..f9e77692 100644 --- a/src/components/Admin/resources/competition/semester/SemesterEdit.tsx +++ b/src/components/Admin/resources/competition/semester/SemesterEdit.tsx @@ -27,7 +27,7 @@ export const SemesterEdit: FC = () => ( }} > - + diff --git a/src/components/Admin/resources/competition/semester/SemesterList.tsx b/src/components/Admin/resources/competition/semester/SemesterList.tsx index 0a61357a..729e617f 100644 --- a/src/components/Admin/resources/competition/semester/SemesterList.tsx +++ b/src/components/Admin/resources/competition/semester/SemesterList.tsx @@ -27,17 +27,14 @@ export const SemesterList: FC = () => ( source="series_set" - label="Series count" render={(record) => record && {record['series_set'].length}} /> source="publication_set" - label="Publication count" render={(record) => record && {record['publication_set'].length}} /> source="late_tags" - label="Late tags count" render={(record) => record && {record['late_tags'].length}} /> diff --git a/src/components/Admin/resources/competition/semester/SemesterShow.tsx b/src/components/Admin/resources/competition/semester/SemesterShow.tsx index 34e56d22..30473017 100644 --- a/src/components/Admin/resources/competition/semester/SemesterShow.tsx +++ b/src/components/Admin/resources/competition/semester/SemesterShow.tsx @@ -20,7 +20,7 @@ import {TruncatedTextField} from '@/components/Admin/custom/TruncatedTextField' export const SemesterShow: FC = () => ( - + @@ -33,7 +33,7 @@ export const SemesterShow: FC = () => ( - + `/competition/series/${id}/show`}> @@ -48,7 +48,7 @@ export const SemesterShow: FC = () => ( - + @@ -63,7 +63,7 @@ export const SemesterShow: FC = () => ( - + diff --git a/src/components/Admin/resources/competition/series/SeriesCreate.tsx b/src/components/Admin/resources/competition/series/SeriesCreate.tsx index 4cbeb220..5b3ca9e0 100644 --- a/src/components/Admin/resources/competition/series/SeriesCreate.tsx +++ b/src/components/Admin/resources/competition/series/SeriesCreate.tsx @@ -7,7 +7,7 @@ import {MyDateTimeInput} from '@/components/Admin/custom/MyDateTimeInput' export const SeriesCreate: FC = () => ( - + diff --git a/src/components/Admin/resources/competition/series/SeriesEdit.tsx b/src/components/Admin/resources/competition/series/SeriesEdit.tsx index dc77f93d..e49759eb 100644 --- a/src/components/Admin/resources/competition/series/SeriesEdit.tsx +++ b/src/components/Admin/resources/competition/series/SeriesEdit.tsx @@ -14,7 +14,7 @@ export const SeriesEdit: FC = () => ( }} > - + diff --git a/src/components/Admin/resources/competition/series/SeriesList.tsx b/src/components/Admin/resources/competition/series/SeriesList.tsx index db0fc971..3aeaee65 100644 --- a/src/components/Admin/resources/competition/series/SeriesList.tsx +++ b/src/components/Admin/resources/competition/series/SeriesList.tsx @@ -11,7 +11,7 @@ export const SeriesList: FC = () => ( - label="Problem count" + label="content.labels.problem_count" render={(record) => record && {record['problems'].length}} /> diff --git a/src/components/Admin/resources/competition/series/SeriesShow.tsx b/src/components/Admin/resources/competition/series/SeriesShow.tsx index a5ad39db..9352f2b6 100644 --- a/src/components/Admin/resources/competition/series/SeriesShow.tsx +++ b/src/components/Admin/resources/competition/series/SeriesShow.tsx @@ -17,7 +17,7 @@ import {TruncatedTextField} from '@/components/Admin/custom/TruncatedTextField' export const SeriesShow: FC = () => ( - + @@ -25,7 +25,7 @@ export const SeriesShow: FC = () => ( - + diff --git a/src/components/Admin/resources/competition/solution/SolutionCreate.tsx b/src/components/Admin/resources/competition/solution/SolutionCreate.tsx index ffb4d46e..8aa0a0bb 100644 --- a/src/components/Admin/resources/competition/solution/SolutionCreate.tsx +++ b/src/components/Admin/resources/competition/solution/SolutionCreate.tsx @@ -24,10 +24,10 @@ export const SolutionCreate: FC = () => ( - + - + ) diff --git a/src/components/Admin/resources/competition/solution/SolutionEdit.tsx b/src/components/Admin/resources/competition/solution/SolutionEdit.tsx index b5eb9789..f3708274 100644 --- a/src/components/Admin/resources/competition/solution/SolutionEdit.tsx +++ b/src/components/Admin/resources/competition/solution/SolutionEdit.tsx @@ -24,10 +24,10 @@ export const SolutionEdit: FC = () => ( - + - + ) diff --git a/src/components/Admin/resources/competition/solution/SolutionList.tsx b/src/components/Admin/resources/competition/solution/SolutionList.tsx index 66977286..f861b9ed 100644 --- a/src/components/Admin/resources/competition/solution/SolutionList.tsx +++ b/src/components/Admin/resources/competition/solution/SolutionList.tsx @@ -7,11 +7,11 @@ export const SolutionList: FC = () => ( - label="Má nahraté riešenie" + label="content.labels.has_solution" render={(record) => record && } /> - - + + ) diff --git a/src/components/Admin/resources/competition/solution/SolutionShow.tsx b/src/components/Admin/resources/competition/solution/SolutionShow.tsx index c0331c1e..6e043c08 100644 --- a/src/components/Admin/resources/competition/solution/SolutionShow.tsx +++ b/src/components/Admin/resources/competition/solution/SolutionShow.tsx @@ -9,8 +9,8 @@ export const SolutionShow: FC = () => ( - - + + ) diff --git a/src/components/Admin/resources/personal/profiles/ProfileCreate.tsx b/src/components/Admin/resources/personal/profiles/ProfileCreate.tsx index 06ab0963..37344fe5 100644 --- a/src/components/Admin/resources/personal/profiles/ProfileCreate.tsx +++ b/src/components/Admin/resources/personal/profiles/ProfileCreate.tsx @@ -11,13 +11,13 @@ export const ProfileCreate: FC = () => ( }} > - - + + - + - + diff --git a/src/components/Admin/resources/personal/profiles/ProfileList.tsx b/src/components/Admin/resources/personal/profiles/ProfileList.tsx index 24e61972..6a947115 100644 --- a/src/components/Admin/resources/personal/profiles/ProfileList.tsx +++ b/src/components/Admin/resources/personal/profiles/ProfileList.tsx @@ -4,10 +4,10 @@ import {Datagrid, List, ReferenceField, TextField} from 'react-admin' export const ProfileList: FC = () => ( - - - - + + + + diff --git a/src/components/Admin/resources/personal/profiles/ProfileShow.tsx b/src/components/Admin/resources/personal/profiles/ProfileShow.tsx index 69392172..600aa3ce 100644 --- a/src/components/Admin/resources/personal/profiles/ProfileShow.tsx +++ b/src/components/Admin/resources/personal/profiles/ProfileShow.tsx @@ -6,10 +6,10 @@ import {MyShow} from '@/components/Admin/custom/MyShow' export const ProfileShow: FC = () => ( - - - - + + + + diff --git a/src/components/Admin/seasonCodeStrings.ts b/src/components/Admin/seasonCodeStrings.ts index 92d94ac5..496a989d 100644 --- a/src/components/Admin/seasonCodeStrings.ts +++ b/src/components/Admin/seasonCodeStrings.ts @@ -1,5 +1,5 @@ export const seasonCodeStrings = [ - {id: 0, name: 'Zimný'}, - {id: 1, name: 'Letný'}, - {id: 2, name: 'Iný'}, + {id: 0, name: 'content.seasons.winter'}, + {id: 1, name: 'content.seasons.summer'}, + {id: 2, name: 'content.seasons.other'}, ] diff --git a/src/components/Admin/translations/sk_SK.ts b/src/components/Admin/translations/sk_SK.ts new file mode 100644 index 00000000..46f12e6d --- /dev/null +++ b/src/components/Admin/translations/sk_SK.ts @@ -0,0 +1,197 @@ +import slovakMessages from 'ra-language-slovak' + +export const sk_SK = { + ra: { + ...slovakMessages.ra, + page: { + ...slovakMessages.ra.page, + list: '%{name}', + }, + sort: { + ASC: 'Vzostupne', + DESC: 'Zostupne', + }, + }, + resources: { + 'cms/post': { + name: 'Príspevky', + fields: { + caption: 'Názov', + short_text: 'Krátky text', + details: 'Detaily', + added_at: 'Vytvorené', + visible_after: 'Viditeľné po', + visible_until: 'Viditeľné do', + sites: 'Stránky', + links: 'Odkazy', + }, + }, + 'cms/flat-page': { + name: 'Ploché stránky', + fields: { + id: 'ID', + url: 'URL', + title: 'Názov', + content: 'Obsah', + sites: 'Stránky', + }, + }, + 'competition/competition': { + name: 'Súťaže', + fields: { + name: 'Názov', + slug: 'Slug', + start_year: 'Start Year', + description: 'Popis', + rules: 'Pravidlá', + competition_type: { + name: 'Názov súťaže', + }, + sites: 'Stránky', + who_can_participate: 'Who Can Participate', + min_years_until_graduation: 'min_years_until_graduation', + }, + }, + 'competition/event': { + name: 'Udalosti', + fields: { + competition: 'Súťaž', + year: 'Ročník', + season_code: 'season_code', + school_year: 'Školský rok', + start: 'Začiatok', + end: 'Koniec', + location: 'location', + additional_name: 'additional_name', + registration_link: { + id: 'ID', + url: 'Odkaz na registráciu', + start: 'registration_link.start', + end: 'registration_link.end', + additional_info: 'Ďalšie informácie', + }, + publication_set: 'Publikácie', + }, + }, + 'competition/semester': { + name: 'Semestre', + fields: { + competition: 'Súťaž', + year: 'Ročník', + season_code: 'season_code', + school_year: 'Školský rok', + start: 'Začiatok', + end: 'Koniec', + complete: 'complete', + additional_name: 'AddditionalName', + registration_link: 'Odkaz na registráciu', + series_set: 'Série', + publication_set: 'Publikácie', + late_tags: 'late_tags', + }, + }, + 'competition/series': { + name: 'Série', + fields: { + semester: 'Semester', + deadline: 'Deadline', + order: 'Poradie', + complete: 'Complete', + problems: 'Úlohy', + }, + }, + 'competition/problem': { + name: 'Úlohy', + fields: { + series: 'Séria', + order: 'Poradie', + text: 'Zadanie', + image: 'Obrázok', + num_comments: 'Počet komentárov', + }, + }, + 'competition/solution': { + name: 'Riešenia', + fields: { + problem: 'Úloha', + semester_registration: 'Riešiteľ', + late_tag: 'Po termíne', + is_online: 'Internetové riešenie', + solution: 'Riešenie', + }, + }, + 'competition/event-registration': { + name: 'Registrácie do súťaží', + fields: { + school: { + abbreviation: 'Škola', + }, + grade: { + tag: 'Ročník', + }, + event: 'Event', + }, + }, + 'personal/schools': { + name: 'Školy', + fields: { + name: 'Názov školy', + street: 'Ulica', + city: 'Mesto', + zip_code: 'PSČ', + district: 'Okres', + abbreviation: 'Skratka školy', + email: 'Email', + }, + }, + 'personal/profiles': { + name: 'Uživateľské profily', + fields: { + first_name: 'Meno', + last_name: 'Priezvisko', + school: { + verbose_name: 'Škola', + }, + grade: 'Ročník', + }, + }, + }, + + controls: { + back_home: 'Späť na hlavnú stránku', + logout: 'Odhlásiť sa', + }, + + content: { + labels: { + general: 'Všeobecné', + preview: 'Náhľad', + links: 'Odkazy', + publications: 'Publikácie', + series: 'Série', + late_tags: 'Late_tags', + problems: 'Úlohy', + history_events: 'History_Events', + back_to_list: 'Späť na list', + competition_type: 'Typ súťaže', + history_events_count: 'HE count', + name: 'Meno a priezvisko', + reg_link: 'Odkaz na registráciu', + reg_link_add: 'Pridať odkaz na registráciu', + problem_count: 'Počet úloh', + is_online: 'Internetové riešenie?', + is_late: 'Riešenie po termíne?', + next_event: 'Prebiehajúca alebo najbližšia akcia', + has_vzorak: 'Má vzorák', + has_solution: 'Má nahraté riešenie', + }, + footer: { + timezone_message: 'Všetky časy sú uvedené v časovom pásme Europe/Bratislava', + }, + seasons: { + winter: 'Zimný', + summer: 'Letný', + other: 'Iný', + }, + }, +} diff --git a/src/types.d.ts b/src/types.d.ts new file mode 100644 index 00000000..add9880e --- /dev/null +++ b/src/types.d.ts @@ -0,0 +1 @@ +declare module 'ra-language-slovak' diff --git a/yarn.lock b/yarn.lock index b9b73e63..cc6dce21 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9686,6 +9686,13 @@ __metadata: languageName: node linkType: hard +"ra-language-slovak@npm:^3.6.2": + version: 3.6.2 + resolution: "ra-language-slovak@npm:3.6.2" + checksum: 10/e707ed6519349d56ec10005c72ab31e1ec98ff59894a64c44e2c82faab116eaaabe08188de0fd18fdfbf1057284aa239b19de5e29580da5caa241542d94484ba + languageName: node + linkType: hard + "ra-ui-materialui@npm:^5.4.0": version: 5.4.0 resolution: "ra-ui-materialui@npm:5.4.0" @@ -11802,6 +11809,8 @@ __metadata: mathjax-react: "npm:^2.0.1" next: "npm:15.0.3" prettier: "npm:^3.3.3" + ra-i18n-polyglot: "npm:^5.4.0" + ra-language-slovak: "npm:^3.6.2" react: "npm:19.0.0-rc-66855b96-20241106" react-admin: "npm:^5.4.0" react-cookie: "npm:^4.1.1"