From f551fbfcd10cb4cced2c772c7aed0aa1d23f8e78 Mon Sep 17 00:00:00 2001 From: Bilal Shafi Date: Mon, 21 Nov 2022 16:30:43 +0500 Subject: [PATCH] [l10n] Add Urdu (ur-PK) locale (#35154) --- .../guides/localization/localization.md | 1 + packages/mui-material/src/locale/index.ts | 71 +++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/docs/data/material/guides/localization/localization.md b/docs/data/material/guides/localization/localization.md index 8dfca3ee5e3cd5..ce6cb5fa5452ce 100644 --- a/docs/data/material/guides/localization/localization.md +++ b/docs/data/material/guides/localization/localization.md @@ -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` | diff --git a/packages/mui-material/src/locale/index.ts b/packages/mui-material/src/locale/index.ts index 8c3e85ea88c2da..40ed432473b9e9 100644 --- a/packages/mui-material/src/locale/index.ts +++ b/packages/mui-material/src/locale/index.ts @@ -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: {