Skip to content

Commit

Permalink
[l10n] Add Arabic Saudi Arabia (ar-SA) locale (mui#33340)
Browse files Browse the repository at this point in the history
  • Loading branch information
rolule authored and Daniel Rabe committed Nov 29, 2022
1 parent fe66ef8 commit a9f7a84
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
Expand Up @@ -40,6 +40,7 @@ const theme = createTheme(
| :---------------------- | :------------------ | :---------- |
| Amharic | am-ET | `amET` |
| Arabic (Egypt) | ar-EG | `arEG` |
| Arabic (Saudi Arabia) | ar-SA | `arSA` |
| Arabic (Sudan) | ar-SD | `arSD` |
| Armenian | hy-AM | `hyAM` |
| Azerbaijani | az-AZ | `azAZ` |
Expand Down
71 changes: 71 additions & 0 deletions packages/mui-material/src/locale/index.ts
Expand Up @@ -170,6 +170,77 @@ export const arEG: Localization = {
},
};

export const arSA: 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 }) =>
`${from}${to} من ${count !== -1 ? count : ` أكثر من${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 `${selected ? '' : 'الانتقال إلى '} صفحة ${page}`;
}
if (type === 'first') {
return 'الانتقال إلى الصفحة الأولى';
}
if (type === 'last') {
return 'الانتقال الي الصفحة الأخيرة';
}
if (type === 'next') {
return 'الانتقال إلى الصفحة التالية';
}
// if (type === 'previous') {
return 'الانتقال إلى الصفحة السابقة';
},
},
},
},
};

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

0 comments on commit a9f7a84

Please sign in to comment.