mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
* Add new locale (ar-EG: Arabic Egypt) * resolve snapshot testing problem * Add new locale (ar-EG: Arabic Egypt) to docs
This commit is contained in:
parent
31d1ce91f7
commit
fa315e9f6d
2
components/calendar/locale/ar_EG.tsx
Normal file
2
components/calendar/locale/ar_EG.tsx
Normal file
@ -0,0 +1,2 @@
|
||||
import ar_EG from '../../date-picker/locale/ar_EG';
|
||||
export default ar_EG;
|
19
components/date-picker/locale/ar_EG.tsx
Normal file
19
components/date-picker/locale/ar_EG.tsx
Normal file
@ -0,0 +1,19 @@
|
||||
import CalendarLocale from 'rc-calendar/lib/locale/ar_EG';
|
||||
import TimePickerLocale from '../../time-picker/locale/ar_EG';
|
||||
|
||||
// Merge into a locale object
|
||||
const locale = {
|
||||
lang: {
|
||||
placeholder: 'اختيار التاريخ',
|
||||
rangePlaceholder: ['البداية', 'النهاية'],
|
||||
...CalendarLocale,
|
||||
},
|
||||
timePickerLocale: {
|
||||
...TimePickerLocale,
|
||||
},
|
||||
};
|
||||
|
||||
// All settings at:
|
||||
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
|
||||
|
||||
export default locale;
|
@ -35,8 +35,9 @@ import elGR from '../el_GR';
|
||||
import nbNO from '../nb_NO';
|
||||
import srRS from '../sr_RS';
|
||||
import isIS from '../is_IS';
|
||||
import arEG from '../ar_EG';
|
||||
|
||||
const locales = [enUS, ptBR, ptPT, ruRU, esES, svSE, frBE, deDE, nlNL, caES, csCZ, koKR, etEE, skSK, jaJP, trTR, zhTW, fiFI, plPL, bgBG, enGB, frFR, nlBE, itIT, viVN, thTH, faIR, elGR, nbNO, srRS, isIS];
|
||||
const locales = [enUS, ptBR, ptPT, ruRU, esES, svSE, frBE, deDE, nlNL, caES, csCZ, koKR, etEE, skSK, jaJP, trTR, zhTW, fiFI, plPL, bgBG, enGB, frFR, nlBE, itIT, viVN, thTH, faIR, elGR, nbNO, srRS, isIS, arEG];
|
||||
|
||||
const { Option } = Select;
|
||||
const { RangePicker } = DatePicker;
|
||||
|
47
components/locale-provider/ar_EG.tsx
Normal file
47
components/locale-provider/ar_EG.tsx
Normal file
@ -0,0 +1,47 @@
|
||||
import moment from 'moment';
|
||||
moment.locale('ar');
|
||||
|
||||
import Pagination from 'rc-pagination/lib/locale/ar_EG';
|
||||
import DatePicker from '../date-picker/locale/ar_EG';
|
||||
import TimePicker from '../time-picker/locale/ar_EG';
|
||||
import Calendar from '../calendar/locale/ar_EG';
|
||||
|
||||
export default {
|
||||
locale: 'ar',
|
||||
Pagination,
|
||||
DatePicker,
|
||||
TimePicker,
|
||||
Calendar,
|
||||
Table: {
|
||||
filterTitle: 'الفلاتر',
|
||||
filterConfirm: 'تأكيد',
|
||||
filterReset: 'إعادة ضبط',
|
||||
emptyText: 'لا توجد بيانات',
|
||||
selectAll: 'اختيار الكل',
|
||||
selectInvert: 'إلغاء الاختيار',
|
||||
},
|
||||
Modal: {
|
||||
okText: 'تأكيد',
|
||||
cancelText: 'إلغاء',
|
||||
justOkText: 'تأكيد',
|
||||
},
|
||||
Popconfirm: {
|
||||
okText: 'تأكيد',
|
||||
cancelText: 'إلغاء',
|
||||
},
|
||||
Transfer: {
|
||||
notFoundContent: 'لا يوجد محتوى',
|
||||
searchPlaceholder: 'ابحث هنا',
|
||||
itemUnit: 'عنصر',
|
||||
itemsUnit: 'عناصر',
|
||||
},
|
||||
Select: {
|
||||
notFoundContent: 'لايوجد محتوى',
|
||||
},
|
||||
Upload: {
|
||||
uploading: 'جاري الرفع...',
|
||||
removeFile: 'احذف الملف',
|
||||
uploadError: 'مشكلة فى الرفع',
|
||||
previewFile: 'استعرض الملف',
|
||||
},
|
||||
};
|
5
components/time-picker/locale/ar_EG.tsx
Normal file
5
components/time-picker/locale/ar_EG.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
const locale = {
|
||||
placeholder: 'اختيار الوقت',
|
||||
};
|
||||
|
||||
export default locale;
|
@ -27,6 +27,7 @@ Supported languages:
|
||||
|
||||
|Language|Filename|
|
||||
|---|---|
|
||||
|Arabic|ar_EG|
|
||||
|Bulgarian|bg_BG|
|
||||
|Catalan|ca_ES|
|
||||
|Chinese (Traditional)|zh_TW|
|
||||
|
@ -25,6 +25,7 @@ return (
|
||||
|
||||
|语言|文件名|
|
||||
|---|---|
|
||||
|阿拉伯|ar_EG|
|
||||
|保加利亚语|bg_BG|
|
||||
|加泰罗尼亚语|ca_ES|
|
||||
|繁体中文|zh_TW|
|
||||
|
Loading…
Reference in New Issue
Block a user