i18n complete: all 16 components translated (CZ/HE/RU/UA)

- Custom i18n provider with React Context + localStorage
- Hebrew RTL support (dir=rtl on html)
- All pages + components use t() calls
- FullCalendar + dates locale-aware
- Language selector in Settings wired to context

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude CLI Agent
2026-03-29 13:19:02 +00:00
parent 235bcab97f
commit 4fae1c5a06
15 changed files with 386 additions and 114 deletions

View File

@@ -4,6 +4,7 @@ import FullCalendar from '@fullcalendar/react';
import dayGridPlugin from '@fullcalendar/daygrid';
import timeGridPlugin from '@fullcalendar/timegrid';
import interactionPlugin from '@fullcalendar/interaction';
import { useTranslation } from '@/lib/i18n';
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3000';
@@ -17,8 +18,16 @@ interface Task {
group_color: string;
}
const LOCALE_MAP: Record<string, string> = {
cs: 'cs',
he: 'he',
ru: 'ru',
ua: 'uk',
};
export default function CalendarPage() {
const [tasks, setTasks] = useState<Task[]>([]);
const { t, locale } = useTranslation();
useEffect(() => {
fetch(`${API_URL}/api/v1/tasks?limit=100`)
@@ -42,7 +51,7 @@ export default function CalendarPage() {
return (
<div className="p-4">
<h1 className="text-2xl font-bold mb-4">Kalendar</h1>
<h1 className="text-2xl font-bold mb-4">{t('calendar.title')}</h1>
<div className="bg-white dark:bg-gray-800 rounded-xl p-4 shadow">
<FullCalendar
plugins={[dayGridPlugin, timeGridPlugin, interactionPlugin]}
@@ -55,7 +64,8 @@ export default function CalendarPage() {
events={events}
editable={true}
selectable={true}
locale="cs"
locale={LOCALE_MAP[locale] || 'cs'}
direction={locale === 'he' ? 'rtl' : 'ltr'}
firstDay={1}
height="auto"
slotMinTime="06:00:00"