mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-26 04:00:13 +08:00
Merge branch 'feature-2.9' of github.com:ant-design/ant-design into feature-2.9
This commit is contained in:
commit
5460d29db0
2
components/calendar/locale/tr_TR.tsx
Normal file
2
components/calendar/locale/tr_TR.tsx
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
import tr_TR from '../../date-picker/locale/tr_TR';
|
||||||
|
export default tr_TR;
|
17
components/date-picker/locale/tr_TR.tsx
Normal file
17
components/date-picker/locale/tr_TR.tsx
Normal 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;
|
@ -17,6 +17,7 @@ import koKR from '../ko_KR';
|
|||||||
import etEE from '../et_EE';
|
import etEE from '../et_EE';
|
||||||
import skSK from '../sk_SK';
|
import skSK from '../sk_SK';
|
||||||
import jaJP from '../ja_JP';
|
import jaJP from '../ja_JP';
|
||||||
|
import trTR from '../tr_TR';
|
||||||
|
|
||||||
const Option = Select.Option;
|
const Option = Select.Option;
|
||||||
const RangePicker = DatePicker.RangePicker;
|
const RangePicker = DatePicker.RangePicker;
|
||||||
@ -62,7 +63,7 @@ const App = () => (
|
|||||||
|
|
||||||
describe('Locale Provider', () => {
|
describe('Locale Provider', () => {
|
||||||
it('should display the text as locale changed', () => {
|
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(
|
const wrapper = mount(
|
||||||
<LocaleProvider locale={locale}>
|
<LocaleProvider locale={locale}>
|
||||||
<App />
|
<App />
|
||||||
@ -84,7 +85,7 @@ describe('Locale Provider', () => {
|
|||||||
return null;
|
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(
|
mount(
|
||||||
<LocaleProvider locale={locale}>
|
<LocaleProvider locale={locale}>
|
||||||
<ModalDemo />
|
<ModalDemo />
|
||||||
|
47
components/locale-provider/tr_TR.tsx
Normal file
47
components/locale-provider/tr_TR.tsx
Normal 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`,
|
||||||
|
},
|
||||||
|
};
|
5
components/time-picker/locale/tr_TR.tsx
Normal file
5
components/time-picker/locale/tr_TR.tsx
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
const locale = {
|
||||||
|
placeholder: 'Zaman Seç',
|
||||||
|
};
|
||||||
|
|
||||||
|
export default locale;
|
Loading…
Reference in New Issue
Block a user