-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy pathukUA.ts
96 lines (81 loc) · 3.63 KB
/
ukUA.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import { PickersLocaleText } from './utils/pickersLocaleTextApi';
import { getPickersLocalization } from './utils/getPickersLocalization';
import { TimeViewWithMeridiem } from '../internals/models';
const timeViews: Record<TimeViewWithMeridiem, string> = {
hours: 'годин',
minutes: 'хвилин',
seconds: 'секунд',
meridiem: 'Південь',
};
const ukUAPickers: Partial<PickersLocaleText> = {
// Calendar navigation
previousMonth: 'Попередній місяць',
nextMonth: 'Наступний місяць',
// View navigation
openPreviousView: 'Відкрити попередній вигляд',
openNextView: 'Відкрити наступний вигляд',
calendarViewSwitchingButtonAriaLabel: (view) =>
view === 'year'
? 'річний вигляд відкрито, перейти до календарного вигляду'
: 'календарний вигляд відкрито, перейти до річного вигляду',
// DateRange labels
start: 'Початок',
end: 'Кінець',
startDate: 'День початку',
startTime: 'Час початку',
endDate: 'День закінчення',
endTime: 'Час закінчення',
// Action bar
cancelButtonLabel: 'Відміна',
clearButtonLabel: 'Очистити',
okButtonLabel: 'OK',
todayButtonLabel: 'Сьогодні',
// Toolbar titles
datePickerToolbarTitle: 'Вибрати дату',
dateTimePickerToolbarTitle: 'Вибрати дату і час',
timePickerToolbarTitle: 'Вибрати час',
dateRangePickerToolbarTitle: 'Вибрати календарний період',
// Clock labels
clockLabelText: (view, formattedTime) =>
`Вибрати ${timeViews[view]}. ${!formattedTime ? 'Час не вибраний' : `Вибрано час ${formattedTime}`}`,
hoursClockNumberText: (hours) => `${hours} годин`,
minutesClockNumberText: (minutes) => `${minutes} хвилин`,
secondsClockNumberText: (seconds) => `${seconds} секунд`,
// Digital clock labels
selectViewText: (view) => `Вибрати ${timeViews[view]}`,
// Calendar labels
calendarWeekNumberHeaderLabel: 'Номер тижня',
calendarWeekNumberHeaderText: '#',
calendarWeekNumberAriaLabelText: (weekNumber) => `Тиждень ${weekNumber}`,
calendarWeekNumberText: (weekNumber) => `${weekNumber}`,
// Open picker labels
openDatePickerDialogue: (formattedDate) =>
formattedDate ? `Оберіть дату, обрана дата ${formattedDate}` : 'Оберіть дату',
openTimePickerDialogue: (formattedTime) =>
formattedTime ? `Оберіть час, обраний час ${formattedTime}` : 'Оберіть час',
fieldClearLabel: 'Очистити дані',
// Table labels
timeTableLabel: 'оберіть час',
dateTableLabel: 'оберіть дату',
// Field section placeholders
fieldYearPlaceholder: (params) => 'Y'.repeat(params.digitAmount),
fieldMonthPlaceholder: (params) => (params.contentType === 'letter' ? 'MMMM' : 'MM'),
fieldDayPlaceholder: () => 'DD',
fieldWeekDayPlaceholder: (params) => (params.contentType === 'letter' ? 'EEEE' : 'EE'),
fieldHoursPlaceholder: () => 'hh',
fieldMinutesPlaceholder: () => 'mm',
fieldSecondsPlaceholder: () => 'ss',
fieldMeridiemPlaceholder: () => 'aa',
// View names
year: 'Рік',
month: 'Місяць',
day: 'День',
weekDay: 'День тижня',
hours: 'Годин',
minutes: 'Хвилин',
seconds: 'Секунд',
meridiem: 'Меридіем',
// Common
empty: 'Порожній',
};
export const ukUA = getPickersLocalization(ukUAPickers);