Merge branch 'feature-2.9' of github.com:ant-design/ant-design into feature-2.9

This commit is contained in:
afc163 2017-03-30 14:34:24 +08:00
commit 5460d29db0
5 changed files with 74 additions and 2 deletions

View File

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

View File

@ -0,0 +1,17 @@
import CalendarLocale from 'rc-calendar/lib/locale/en_US';
import TimePickerLocale from '../../time-picker/locale/tr_TR';
import assign from 'object-assign';
// Merge into a locale object
const locale = {
lang: assign({
placeholder: 'Tarih Seç',
rangePlaceholder: ['Başlangıç Tarihi', 'Bitiş Tarihi'],
}, CalendarLocale),
timePickerLocale: assign({}, TimePickerLocale),
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
export default locale;

View File

@ -17,6 +17,7 @@ import koKR from '../ko_KR';
import etEE from '../et_EE';
import skSK from '../sk_SK';
import jaJP from '../ja_JP';
import trTR from '../tr_TR';
const Option = Select.Option;
const RangePicker = DatePicker.RangePicker;
@ -62,7 +63,7 @@ const App = () => (
describe('Locale Provider', () => {
it('should display the text as locale changed', () => {
[enUS, ptBR, ruRU, esES, svSE, frBE, deDE, nlNL, caES, csCZ, koKR, etEE, skSK, jaJP].forEach((locale) => {
[enUS, ptBR, ruRU, esES, svSE, frBE, deDE, nlNL, caES, csCZ, koKR, etEE, skSK, jaJP, trTR].forEach((locale) => {
const wrapper = mount(
<LocaleProvider locale={locale}>
<App />
@ -84,7 +85,7 @@ describe('Locale Provider', () => {
return null;
}
}
[enUS, ptBR, ruRU, esES, svSE, frBE, deDE, nlNL, caES, csCZ, koKR].forEach((locale) => {
[enUS, ptBR, ruRU, esES, svSE, frBE, deDE, nlNL, caES, csCZ, koKR, trTR].forEach((locale) => {
mount(
<LocaleProvider locale={locale}>
<ModalDemo />

View File

@ -0,0 +1,47 @@
import moment from 'moment';
moment.locale('tr');
import Pagination from 'rc-pagination/lib/locale/en_US';
import DatePicker from '../date-picker/locale/tr_TR';
import TimePicker from '../time-picker/locale/tr_TR';
import Calendar from '../calendar/locale/en_US';
export default {
locale: 'tr',
Pagination,
DatePicker,
TimePicker,
Calendar,
Table: {
filterTitle: 'Menü Filtrele',
filterConfirm: 'Tamam',
filterReset: 'Sıfırla',
emptyText: 'Veri Yok',
selectAll: 'Hepsini Seç',
selectInvert: 'Select Invert',
},
Modal: {
okText: 'Tamam',
cancelText: 'İptal',
justOkText: 'Tamam',
},
Popconfirm: {
okText: 'Tamam',
cancelText: 'İptal',
},
Transfer: {
notFoundContent: 'Bulunamadı',
searchPlaceholder: 'Arama',
itemUnit: 'Öğe',
itemsUnit: 'Öğeler',
},
Select: {
notFoundContent: 'Bulunamadı',
},
Upload: {
uploading: 'Yükleniyor...',
removeFile: `Dosya'ı kaldır`,
uploadError: 'Yükleme Hatası',
previewFile: `Dosya'ı Önizle`,
},
};

View File

@ -0,0 +1,5 @@
const locale = {
placeholder: 'Zaman Seç',
};
export default locale;