-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy pathptPT.ts
96 lines (81 loc) · 3.19 KB
/
ptPT.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: 'horas',
minutes: 'minutos',
seconds: 'segundos',
meridiem: 'meridiano',
};
const ptPTPickers: Partial<PickersLocaleText> = {
// Calendar navigation
previousMonth: 'Mês anterior',
nextMonth: 'Próximo mês',
// View navigation
openPreviousView: 'Abrir seleção anterior',
openNextView: 'Abrir próxima seleção',
calendarViewSwitchingButtonAriaLabel: (view) =>
view === 'year'
? 'A seleção do ano está aberta, altere para a seleção do calendário'
: 'A seleção do calendários está aberta, altere para a seleção do ano',
// DateRange labels
start: 'Início',
end: 'Fim',
startDate: 'Data de início',
startTime: 'Hora de início',
endDate: 'Data de fim',
endTime: 'Hora de fim',
// Action bar
cancelButtonLabel: 'Cancelar',
clearButtonLabel: 'Limpar',
okButtonLabel: 'OK',
todayButtonLabel: 'Hoje',
// Toolbar titles
datePickerToolbarTitle: 'Selecione a data',
dateTimePickerToolbarTitle: 'Selecione a data e a hora',
timePickerToolbarTitle: 'Selecione a hora',
dateRangePickerToolbarTitle: 'Selecione o intervalo de datas',
// Clock labels
clockLabelText: (view, formattedTime) =>
`Selecione ${timeViews[view]}. ${!formattedTime ? 'Hora não selecionada' : `Selecionado a hora ${formattedTime}`}`,
hoursClockNumberText: (hours) => `${hours} horas`,
minutesClockNumberText: (minutes) => `${minutes} minutos`,
secondsClockNumberText: (seconds) => `${seconds} segundos`,
// Digital clock labels
selectViewText: (view) => `Selecione ${timeViews[view]}`,
// Calendar labels
calendarWeekNumberHeaderLabel: 'Número da semana',
calendarWeekNumberHeaderText: 'N.º',
calendarWeekNumberAriaLabelText: (weekNumber) => `Semana ${weekNumber}`,
calendarWeekNumberText: (weekNumber) => `${weekNumber}`,
// Open picker labels
openDatePickerDialogue: (formattedDate) =>
formattedDate ? `Escolha uma data, a data selecionada é ${formattedDate}` : 'Escolha uma data',
openTimePickerDialogue: (formattedTime) =>
formattedTime ? `Escolha uma hora, a hora selecionada é ${formattedTime}` : 'Escolha uma hora',
fieldClearLabel: 'Limpar valor',
// Table labels
timeTableLabel: 'escolha uma hora',
dateTableLabel: 'escolha uma data',
// Field section placeholders
fieldYearPlaceholder: (params) => 'A'.repeat(params.digitAmount),
fieldMonthPlaceholder: (params) => (params.contentType === 'letter' ? 'MMMM' : 'MM'),
fieldDayPlaceholder: () => 'DD',
fieldWeekDayPlaceholder: (params) => (params.contentType === 'letter' ? 'SSSS' : 'SS'),
fieldHoursPlaceholder: () => 'hh',
fieldMinutesPlaceholder: () => 'mm',
fieldSecondsPlaceholder: () => 'ss',
fieldMeridiemPlaceholder: () => 'aa',
// View names
year: 'Ano',
month: 'Mês',
day: 'Dia',
weekDay: 'Dia da Semana',
hours: 'Horas',
minutes: 'Minutos',
seconds: 'Segundos',
meridiem: 'Meridiano',
// Common
empty: 'Vazio',
};
export const ptPT = getPickersLocalization(ptPTPickers);