diff --git a/components/calendar/locale/tr_TR.tsx b/components/calendar/locale/tr_TR.tsx new file mode 100644 index 0000000000..d5ba572d46 --- /dev/null +++ b/components/calendar/locale/tr_TR.tsx @@ -0,0 +1,2 @@ +import tr_TR from '../../date-picker/locale/tr_TR'; +export default tr_TR; diff --git a/components/date-picker/locale/tr_TR.tsx b/components/date-picker/locale/tr_TR.tsx new file mode 100644 index 0000000000..9a9d90555d --- /dev/null +++ b/components/date-picker/locale/tr_TR.tsx @@ -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; diff --git a/components/locale-provider/__tests__/index.test.js b/components/locale-provider/__tests__/index.test.js index 4e7fcee7e0..4984b90cf9 100644 --- a/components/locale-provider/__tests__/index.test.js +++ b/components/locale-provider/__tests__/index.test.js @@ -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( @@ -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( diff --git a/components/locale-provider/tr_TR.tsx b/components/locale-provider/tr_TR.tsx new file mode 100644 index 0000000000..595ed83876 --- /dev/null +++ b/components/locale-provider/tr_TR.tsx @@ -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`, + }, +}; diff --git a/components/time-picker/locale/tr_TR.tsx b/components/time-picker/locale/tr_TR.tsx new file mode 100644 index 0000000000..66f860dca2 --- /dev/null +++ b/components/time-picker/locale/tr_TR.tsx @@ -0,0 +1,5 @@ +const locale = { + placeholder: 'Zaman Seç', +}; + +export default locale;