Skip to content

Commit

Permalink
[l10n] Add Urdu (ur-PK) locale (#35154)
Browse files Browse the repository at this point in the history
  • Loading branch information
MBilalShafi committed Nov 21, 2022
1 parent 96d1525 commit f551fbf
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
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 @@ -86,6 +86,7 @@ const theme = createTheme(
| Thai | th-TH | `thTH` |
| Turkish | tr-TR | `trTR` |
| Ukrainian | uk-UA | `ukUA` |
| Urdu (Pakistan) | ur-PK | `urPK` |
| Vietnamese | vi-VN | `viVN` |

<!-- #default-branch-switch -->
Expand Down
71 changes: 71 additions & 0 deletions packages/mui-material/src/locale/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3305,6 +3305,77 @@ export const ukUA: Localization = {
},
};

export const urPK: 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} سے ذیادہ میں سے`} ${from} سے ${to} قطاریں`,
},
},
MuiRating: {
defaultProps: {
getLabelText: (value) => `${value} ستار${value !== 1 ? 'ے' : 'ہ'}`,
emptyLabelText: 'خالی',
},
},
MuiAutocomplete: {
defaultProps: {
clearText: 'کلئیر',
closeText: 'بند کریں',
loadingText: 'لوڈ ہو رہا ہے۔۔۔',
noOptionsText: 'کوئی آپشن نہیں',
openText: 'کھولیں',
},
},
MuiAlert: {
defaultProps: {
closeText: 'بند کریں',
},
},
MuiPagination: {
defaultProps: {
'aria-label': 'صفحات کی ترتیب',
getItemAriaLabel: (type, page, selected) => {
if (type === 'page') {
return `صفحہ نمبر ${page}${selected ? '' : ' پر جائیں'}`;
}
if (type === 'first') {
return 'پہلے صفحے پر جائیں';
}
if (type === 'last') {
return 'آخری صفحے پر جائیں';
}
if (type === 'next') {
return 'اگلے صفحے پر جائیں';
}
// if (type === 'previous') {
return 'پچھلے صفحے پر جائیں';
},
},
},
},
};

export const viVN: Localization = {
components: {
MuiBreadcrumbs: {
Expand Down

0 comments on commit f551fbf

Please sign in to comment.