forked from mui/mui-x
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] Prettify the l10n issue (mui#4928)
Co-authored-by: Matheus Wichman <matheushw@outlook.com>
- Loading branch information
1 parent
8df2da0
commit ffcaa4f
Showing
5 changed files
with
230 additions
and
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,40 @@ | ||
import { PickersLocaleText } from './utils/pickersLocaleTextApi'; | ||
import { getPickersLocalization } from './utils/getPickersLocalization'; | ||
// import { CalendarPickerView } from '../internals/models'; | ||
|
||
const deDEPickers: Partial<PickersLocaleText<any>> = { | ||
// Calendar navigation | ||
previousMonth: 'Letzter Monat', | ||
nextMonth: 'Nächster Monat', | ||
|
||
// View navigation | ||
openPreviousView: 'Letzte Ansicht öffnen', | ||
openNextView: 'Nächste Ansicht öffnen', | ||
// calendarViewSwitchingButtonAriaLabel: (view: CalendarPickerView) => view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view', | ||
|
||
// DateRange placeholders | ||
start: 'Beginn', | ||
end: 'Ende', | ||
|
||
// Action bar | ||
cancelButtonLabel: 'Abbrechen', | ||
clearButtonLabel: 'Löschen', | ||
okButtonLabel: 'OK', | ||
todayButtonLabel: 'Heute', | ||
start: 'Beginn', | ||
end: 'Ende', | ||
|
||
// Clock labels | ||
// clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`}`, | ||
// hoursClockNumberText: hours => `${hours} hours`, | ||
// minutesClockNumberText: minutes => `${minutes} minutes`, | ||
// secondsClockNumberText: seconds => `${seconds} seconds`, | ||
|
||
// Open picker labels | ||
// openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose date, selected date is ${utils.format(utils.date(rawValue)!, 'fullDate')}` : 'Choose date', | ||
// openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose time, selected time is ${utils.format(utils.date(rawValue)!, 'fullTime')}` : 'Choose time', | ||
|
||
// Table labels | ||
// timeTableLabel: 'pick time', | ||
// dateTableLabel: 'pick date', | ||
}; | ||
|
||
export const deDE = getPickersLocalization(deDEPickers); |
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 |
---|---|---|
@@ -1,17 +1,40 @@ | ||
import { PickersLocaleText } from './utils/pickersLocaleTextApi'; | ||
import { getPickersLocalization } from './utils/getPickersLocalization'; | ||
// import { CalendarPickerView } from '../internals/models'; | ||
|
||
const frFRPickers: Partial<PickersLocaleText<any>> = { | ||
// Calendar navigation | ||
previousMonth: 'Mois précédent', | ||
nextMonth: 'Mois suivant', | ||
|
||
// View navigation | ||
openPreviousView: 'Ouvrir la vue précédente', | ||
openNextView: 'Ouvrir la vue suivante', | ||
// calendarViewSwitchingButtonAriaLabel: (view: CalendarPickerView) => view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view', | ||
|
||
// DateRange placeholders | ||
start: 'Début', | ||
end: 'Fin', | ||
|
||
// Action bar | ||
cancelButtonLabel: 'Annuler', | ||
clearButtonLabel: 'Vider', | ||
okButtonLabel: 'OK', | ||
todayButtonLabel: "Aujourd'hui", | ||
start: 'Début', | ||
end: 'Fin', | ||
|
||
// Clock labels | ||
// clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`}`, | ||
// hoursClockNumberText: hours => `${hours} hours`, | ||
// minutesClockNumberText: minutes => `${minutes} minutes`, | ||
// secondsClockNumberText: seconds => `${seconds} seconds`, | ||
|
||
// Open picker labels | ||
// openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose date, selected date is ${utils.format(utils.date(rawValue)!, 'fullDate')}` : 'Choose date', | ||
// openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose time, selected time is ${utils.format(utils.date(rawValue)!, 'fullTime')}` : 'Choose time', | ||
|
||
// Table labels | ||
// timeTableLabel: 'pick time', | ||
// dateTableLabel: 'pick date', | ||
}; | ||
|
||
export const frFR = getPickersLocalization(frFRPickers); |
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 |
---|---|---|
@@ -1,18 +1,41 @@ | ||
import { PickersLocaleText } from './utils/pickersLocaleTextApi'; | ||
import { getPickersLocalization } from './utils/getPickersLocalization'; | ||
// import { CalendarPickerView } from '../internals/models'; | ||
|
||
// This object is not Partial<PickersLocaleText> because it is the default values | ||
const trTRPickers: Partial<PickersLocaleText<any>> = { | ||
// Calendar navigation | ||
previousMonth: 'Önceki ay', | ||
nextMonth: 'Sonraki ay', | ||
|
||
// View navigation | ||
openPreviousView: 'sonraki görünüm', | ||
openNextView: 'önceki görünüm', | ||
// calendarViewSwitchingButtonAriaLabel: (view: CalendarPickerView) => view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view', | ||
|
||
// DateRange placeholders | ||
start: 'Başlangıç', | ||
end: 'Bitiş', | ||
|
||
// Action bar | ||
cancelButtonLabel: 'iptal', | ||
clearButtonLabel: 'Temizle', | ||
okButtonLabel: 'Tamam', | ||
todayButtonLabel: 'Bugün', | ||
start: 'Başlangıç', | ||
end: 'Bitiş', | ||
|
||
// Clock labels | ||
// clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`}`, | ||
// hoursClockNumberText: hours => `${hours} hours`, | ||
// minutesClockNumberText: minutes => `${minutes} minutes`, | ||
// secondsClockNumberText: seconds => `${seconds} seconds`, | ||
|
||
// Open picker labels | ||
// openDatePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose date, selected date is ${utils.format(utils.date(rawValue)!, 'fullDate')}` : 'Choose date', | ||
// openTimePickerDialogue: (rawValue, utils) => rawValue && utils.isValid(utils.date(rawValue)) ? `Choose time, selected time is ${utils.format(utils.date(rawValue)!, 'fullTime')}` : 'Choose time', | ||
|
||
// Table labels | ||
// timeTableLabel: 'pick time', | ||
// dateTableLabel: 'pick date', | ||
}; | ||
|
||
export const trTR = getPickersLocalization(trTRPickers); |
Oops, something went wrong.