Add new locale (ar-EG: Arabic Egypt) #3 (#7888)

* 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:
Mohamed Seada 2017-10-14 08:30:54 +02:00 committed by 偏右
parent 31d1ce91f7
commit fa315e9f6d
7 changed files with 77 additions and 1 deletions

View File

@ -0,0 +1,2 @@
import ar_EG from '../../date-picker/locale/ar_EG';
export default ar_EG;

View 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;

View File

@ -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;

View 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: 'استعرض الملف',
},
};

View File

@ -0,0 +1,5 @@
const locale = {
placeholder: 'اختيار الوقت',
};
export default locale;

View File

@ -27,6 +27,7 @@ Supported languages:
|Language|Filename|
|---|---|
|Arabic|ar_EG|
|Bulgarian|bg_BG|
|Catalan|ca_ES|
|Chinese (Traditional)|zh_TW|

View File

@ -25,6 +25,7 @@ return (
|语言|文件名|
|---|---|
|阿拉伯|ar_EG|
|保加利亚语|bg_BG|
|加泰罗尼亚语|ca_ES|
|繁体中文|zh_TW|