Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[l10n] Add Urdu (ur-PK) locale #35154

Merged
merged 3 commits into from Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/data/material/guides/localization/localization.md
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
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