-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[l10n] Add Hungarian (hu-HU) locale from @noherczeg (#7796)
Co-authored-by: Norbert Csaba Herczeg <noherczeg@gmail.com> Co-authored-by: Lukas <llukas.tyla@gmail.com>
- Loading branch information
1 parent
5f1ef01
commit 452cefb
Showing
5 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import { PickersLocaleText } from './utils/pickersLocaleTextApi'; | ||
import { getPickersLocalization } from './utils/getPickersLocalization'; | ||
|
||
// maps TimeView to its translation | ||
const timeViews = { | ||
hours: 'Óra', | ||
minutes: 'Perc', | ||
seconds: 'Másodperc', | ||
}; | ||
|
||
// 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', | ||
|
||
// View navigation | ||
openPreviousView: 'Előző nézet megnyitása', | ||
openNextView: 'Következő nézet megnyitása', | ||
calendarViewSwitchingButtonAriaLabel: (view) => | ||
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, viewType) => | ||
isKeyboardInputOpen | ||
? `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', | ||
end: 'Záró dátum', | ||
|
||
// Action bar | ||
cancelButtonLabel: 'Mégse', | ||
clearButtonLabel: 'Törlés', | ||
okButtonLabel: 'OK', | ||
todayButtonLabel: 'Ma', | ||
|
||
// Toolbar titles | ||
datePickerDefaultToolbarTitle: 'Dátum kiválasztása', | ||
dateTimePickerDefaultToolbarTitle: 'Dátum és idő kiválasztása', | ||
timePickerDefaultToolbarTitle: 'Idő kiválasztása', | ||
dateRangePickerDefaultToolbarTitle: 'Dátumhatárok kiválasztása', | ||
|
||
// Clock labels | ||
clockLabelText: (view, time, adapter) => | ||
`${timeViews[view] ?? view} kiválasztása. ${ | ||
time === null | ||
? 'Nincs kiválasztva idő' | ||
: `A kiválasztott idő ${adapter.format(time, 'fullTime')}` | ||
}`, | ||
hoursClockNumberText: (hours) => `${hours} ${timeViews.hours.toLowerCase()}`, | ||
minutesClockNumberText: (minutes) => `${minutes} ${timeViews.minutes.toLowerCase()}`, | ||
secondsClockNumberText: (seconds) => `${seconds} ${timeViews.seconds.toLowerCase()}`, | ||
|
||
// Open picker labels | ||
openDatePickerDialogue: (value, utils) => | ||
value !== null && utils.isValid(value) | ||
? `Válasszon dátumot, a kiválasztott dátum: ${utils.format(value, 'fullDate')}` | ||
: 'Válasszon dátumot', | ||
openTimePickerDialogue: (value, utils) => | ||
value !== null && utils.isValid(value) | ||
? `Válasszon időt, a kiválasztott idő: ${utils.format(value, 'fullTime')}` | ||
: 'Válasszon időt', | ||
|
||
// Table labels | ||
timeTableLabel: 'válasszon időt', | ||
dateTableLabel: 'válasszon dátumot', | ||
}; | ||
|
||
export const huHU = getPickersLocalization(huHUPickers); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters