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 Arabic Saudi Arabia (ar-SA) locale #33340

Merged
merged 2 commits into from Oct 3, 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 @@ -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