Skip to content

Commit

Permalink
Fix viewType translation
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasTy committed Feb 16, 2023
1 parent 0b2094d commit d1c00dc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/x-date-pickers/src/locales/huHU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ const timeViews = {
seconds: 'Másodperc',
};

const huHUPickers: Partial<PickersLocaleText<any>> = {
// maps PickersToolbar["viewType"] to its translation
const pickerViews = {
calendar: 'naptár',
clock: 'óra',
};

const huHUPickers: PickersLocaleText<any> = {
// Calendar navigation
previousMonth: 'Előző hónap',
nextMonth: 'Következő hónap',
Expand All @@ -20,10 +26,10 @@ const huHUPickers: Partial<PickersLocaleText<any>> = {
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',
inputModeToggleButtonAriaLabel: (isKeyboardInputOpen: boolean, viewType: 'calendar' | 'clock') =>
inputModeToggleButtonAriaLabel: (isKeyboardInputOpen, viewType) =>
isKeyboardInputOpen
? `szöveges beviteli nézet aktív, váltás ${viewType} nézetre`
: `${viewType} beviteli nézet aktív, váltás szöveges beviteli nézetre`,
? `szöveges beviteli nézet aktív, váltás ${pickerViews[viewType]} nézetre`
: `${pickerViews[viewType]} beviteli nézet aktív, váltás szöveges beviteli nézetre`,

// DateRange placeholders
start: 'Kezdő dátum',
Expand Down

0 comments on commit d1c00dc

Please sign in to comment.