Skip to content

Commit

Permalink
[material-ui][docs] Add the Pashto locale (mui#42244)
Browse files Browse the repository at this point in the history
Co-authored-by: Danilo Leal <[email protected]>
  • Loading branch information
sayoubiaf and danilo-leal authored May 28, 2024
1 parent 70327ca commit a55cd51
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/data/material/guides/localization/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
73 changes: 72 additions & 1 deletion packages/mui-material/src/locale/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' : ''}`,
Expand Down Expand Up @@ -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: {
Expand Down

0 comments on commit a55cd51

Please sign in to comment.