94 lines
3.9 KiB
JavaScript
94 lines
3.9 KiB
JavaScript
import { getPickersLocalization } from './utils/getPickersLocalization';
|
|
// maps TimeView to its translation
|
|
var timeViews = {
|
|
hours: 'Óra',
|
|
minutes: 'Perc',
|
|
seconds: 'Másodperc',
|
|
meridiem: 'Délután'
|
|
};
|
|
var huHUPickers = {
|
|
// Calendar navigation
|
|
previousMonth: 'Előző hónap',
|
|
nextMonth: 'Következő hónap',
|
|
// View navigation
|
|
openPreviousView: 'Előző nézet megnyitása',
|
|
openNextView: 'Következő nézet megnyitása',
|
|
calendarViewSwitchingButtonAriaLabel: function calendarViewSwitchingButtonAriaLabel(view) {
|
|
return view === 'year' ? 'az évválasztó már nyitva, váltson a naptárnézetre' : 'a naptárnézet már nyitva, váltson az évválasztóra';
|
|
},
|
|
// DateRange placeholders
|
|
start: 'Kezdő dátum',
|
|
end: 'Záró dátum',
|
|
// Action bar
|
|
cancelButtonLabel: 'Mégse',
|
|
clearButtonLabel: 'Törlés',
|
|
okButtonLabel: 'OK',
|
|
todayButtonLabel: 'Ma',
|
|
// Toolbar titles
|
|
datePickerToolbarTitle: 'Dátum kiválasztása',
|
|
dateTimePickerToolbarTitle: 'Dátum és idő kiválasztása',
|
|
timePickerToolbarTitle: 'Idő kiválasztása',
|
|
dateRangePickerToolbarTitle: 'Dátumhatárok kiválasztása',
|
|
// Clock labels
|
|
clockLabelText: function clockLabelText(view, time, adapter) {
|
|
var _timeViews$view;
|
|
return "".concat((_timeViews$view = timeViews[view]) != null ? _timeViews$view : view, " kiv\xE1laszt\xE1sa. ").concat(time === null ? 'Nincs kiválasztva idő' : "A kiv\xE1lasztott id\u0151 ".concat(adapter.format(time, 'fullTime')));
|
|
},
|
|
hoursClockNumberText: function hoursClockNumberText(hours) {
|
|
return "".concat(hours, " ").concat(timeViews.hours.toLowerCase());
|
|
},
|
|
minutesClockNumberText: function minutesClockNumberText(minutes) {
|
|
return "".concat(minutes, " ").concat(timeViews.minutes.toLowerCase());
|
|
},
|
|
secondsClockNumberText: function secondsClockNumberText(seconds) {
|
|
return "".concat(seconds, " ").concat(timeViews.seconds.toLowerCase());
|
|
},
|
|
// Digital clock labels
|
|
selectViewText: function selectViewText(view) {
|
|
return "".concat(timeViews[view], " kiv\xE1laszt\xE1sa");
|
|
},
|
|
// Calendar labels
|
|
calendarWeekNumberHeaderLabel: 'Hét',
|
|
calendarWeekNumberHeaderText: '#',
|
|
calendarWeekNumberAriaLabelText: function calendarWeekNumberAriaLabelText(weekNumber) {
|
|
return "".concat(weekNumber, ". h\xE9t");
|
|
},
|
|
calendarWeekNumberText: function calendarWeekNumberText(weekNumber) {
|
|
return "".concat(weekNumber);
|
|
},
|
|
// Open picker labels
|
|
openDatePickerDialogue: function openDatePickerDialogue(value, utils) {
|
|
return value !== null && utils.isValid(value) ? "V\xE1lasszon d\xE1tumot, a kiv\xE1lasztott d\xE1tum: ".concat(utils.format(value, 'fullDate')) : 'Válasszon dátumot';
|
|
},
|
|
openTimePickerDialogue: function openTimePickerDialogue(value, utils) {
|
|
return value !== null && utils.isValid(value) ? "V\xE1lasszon id\u0151t, a kiv\xE1lasztott id\u0151: ".concat(utils.format(value, 'fullTime')) : 'Válasszon időt';
|
|
},
|
|
fieldClearLabel: 'Tartalom ürítése',
|
|
// Table labels
|
|
timeTableLabel: 'válasszon időt',
|
|
dateTableLabel: 'válasszon dátumot',
|
|
// Field section placeholders
|
|
fieldYearPlaceholder: function fieldYearPlaceholder(params) {
|
|
return 'É'.repeat(params.digitAmount);
|
|
},
|
|
fieldMonthPlaceholder: function fieldMonthPlaceholder(params) {
|
|
return params.contentType === 'letter' ? 'HHHH' : 'HH';
|
|
},
|
|
fieldDayPlaceholder: function fieldDayPlaceholder() {
|
|
return 'NN';
|
|
},
|
|
// fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'EEEE' : 'EE',
|
|
fieldHoursPlaceholder: function fieldHoursPlaceholder() {
|
|
return 'óó';
|
|
},
|
|
fieldMinutesPlaceholder: function fieldMinutesPlaceholder() {
|
|
return 'pp';
|
|
},
|
|
fieldSecondsPlaceholder: function fieldSecondsPlaceholder() {
|
|
return 'mm';
|
|
},
|
|
fieldMeridiemPlaceholder: function fieldMeridiemPlaceholder() {
|
|
return 'dd';
|
|
}
|
|
};
|
|
export var huHU = getPickersLocalization(huHUPickers); |