diff --git a/docs/data/material/guides/localization/localization.md b/docs/data/material/guides/localization/localization.md index 9f047bfea14351..2e69ae6826197d 100644 --- a/docs/data/material/guides/localization/localization.md +++ b/docs/data/material/guides/localization/localization.md @@ -77,6 +77,7 @@ The [Data Grid and Data Grid Pro](/x/react-data-grid/) components have their own | Nepali | ne-NP | `neNP` | | Norwegian (bokmål) | nb-NO | `nbNO` | | Norwegian (nynorsk) | nn-NO | `nnNO` | +| Pashto (Afghanistan) | ps-AF | `psAF` | | Persian | fa-IR | `faIR` | | Polish | pl-PL | `plPL` | | Portuguese | pt-PT | `ptPT` | diff --git a/packages/mui-material/src/locale/index.ts b/packages/mui-material/src/locale/index.ts index c6c494c16f96f8..21a691b2c62cfc 100644 --- a/packages/mui-material/src/locale/index.ts +++ b/packages/mui-material/src/locale/index.ts @@ -1007,7 +1007,7 @@ export const enUS: Localization = { }, labelRowsPerPage: 'Rows per page:', labelDisplayedRows: ({ from, to, count }) => - `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`, + `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`, }}, MuiRating: { defaultProps: { getLabelText: value => `${value} Star${value !== 1 ? 's' : ''}`, @@ -3006,6 +3006,77 @@ export const plPL: Localization = { }, }; +export const psAF: Localization = { + components: { + MuiBreadcrumbs: { + defaultProps: { + expandText: 'لاره ښکاره کړه', + }, + }, + MuiTablePagination: { + defaultProps: { + getItemAriaLabel: (type) => { + if (type === 'first') { + return 'لومړۍ پاڼې ته لاړ شه'; + } + if (type === 'last') { + return 'ورستۍ پاڼې ته لاړ شه'; + } + if (type === 'next') { + return 'بلی پاڼې ته لاړ شه'; + } + // if (type === 'previous') { + return 'مخکینۍ پاڼې ته لاړ شه'; + }, + labelRowsPerPage: 'په پاڼه کی د کرښو شمیر', + labelDisplayedRows: ({ from, to, count }) => + `${count !== -1 ? count : `${to} زیات له`} ${to}- ${from} د`, + }, + }, + MuiRating: { + defaultProps: { + getLabelText: (value) => `${value} ستوری`, + emptyLabelText: 'خالی', + }, + }, + MuiAutocomplete: { + defaultProps: { + clearText: 'پاک کول', + closeText: 'تړل', + loadingText: '... لوډ کیږی', + noOptionsText: 'بی پایلی', + openText: 'خلاصول', + }, + }, + MuiAlert: { + defaultProps: { + closeText: 'تړل', + }, + }, + MuiPagination: { + defaultProps: { + 'aria-label': 'د پاڼو ترتیب', + getItemAriaLabel: (type, page, selected) => { + if (type === 'page') { + return `${selected ? '' : ' ته لاړ شه'}پاڼې ${page}`; + } + if (type === 'first') { + return 'لومړۍ پاڼی ته لاړ شه'; + } + if (type === 'last') { + return 'وروستۍ پاڼې ته لاړه شه'; + } + if (type === 'next') { + return 'بلې پاڼې ته لاړ شه'; + } + // if (type === 'previous') { + return 'مخکنۍ پاڼې ته لاړ شه'; + }, + }, + }, + }, +}; + export const ptBR: Localization = { components: { MuiBreadcrumbs: {