Skip to content

Commit

Permalink
[pickers] Add deDE translations for x-date-pickers
Browse files Browse the repository at this point in the history
  • Loading branch information
felixh10r committed May 23, 2022
1 parent fa387fa commit 28660fb
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/data/date-pickers/localization/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ import bgLocale from 'date-fns/locale/bg';
| :---------------------- | :------------------ | :---------- |
| English (United States) | en-US | `enUS` |
| French | fr-FR | `frFR` |
| German | de-DE | `deDE` |

You can [find the source](https://github.com/mui/mui-x/tree/HEAD/packages/grid/x-date-pickers/src/locales) in the GitHub repository.

Expand Down
17 changes: 17 additions & 0 deletions packages/x-date-pickers/src/locales/deDE.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { PickersLocaleText } from './utils/pickersLocaleTextApi';
import { getPickersLocalization } from './utils/getPickersLocalization';

const deDEPickers: Partial<PickersLocaleText> = {
previousMonth: 'Letzter Monat',
nextMonth: 'Nächster Monat',
openPreviousView: 'Letzte Ansicht öffnen',
openNextView: 'Nächste Ansicht öffnen',
cancelButtonLabel: 'Abbrechen',
clearButtonLabel: 'Löschen',
okButtonLabel: 'OK',
todayButtonLabel: 'Heute',
start: 'Beginn',
end: 'Ende',
};

export const deDE = getPickersLocalization(deDEPickers);
1 change: 1 addition & 0 deletions packages/x-date-pickers/src/locales/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './deDE';
export * from './frFR';
export * from './enUS';
export * from './utils/pickersLocaleTextApi';
1 change: 1 addition & 0 deletions scripts/x-date-pickers-pro.exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
{ "name": "DateRangePickerProps", "kind": "Interface" },
{ "name": "DateTimePicker", "kind": "Variable" },
{ "name": "DateTimePickerProps", "kind": "Interface" },
{ "name": "deDE", "kind": "Variable" },
{ "name": "DEFAULT_LOCALE", "kind": "Variable" },
{ "name": "DesktopDatePicker", "kind": "Variable" },
{ "name": "DesktopDatePickerProps", "kind": "Interface" },
Expand Down
1 change: 1 addition & 0 deletions scripts/x-date-pickers.exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
{ "name": "DatePickerProps", "kind": "Interface" },
{ "name": "DateTimePicker", "kind": "Variable" },
{ "name": "DateTimePickerProps", "kind": "Interface" },
{ "name": "deDE", "kind": "Variable" },
{ "name": "DEFAULT_LOCALE", "kind": "Variable" },
{ "name": "DesktopDatePicker", "kind": "Variable" },
{ "name": "DesktopDatePickerProps", "kind": "Interface" },
Expand Down

0 comments on commit 28660fb

Please sign in to comment.