Skip to content

Commit

Permalink
feat: improve Turkish translations (#25100)
Browse files Browse the repository at this point in the history
* Update Turkish translations

* feat: update Turkish translations

* /* eslint-disable no-template-curly-in-string */

* fix: minor change to a Turkish translation

* chore: update snapshots

Co-authored-by: Amumu <yoyo837@hotmail.com>
  • Loading branch information
smddzcy and yoyo837 committed Jun 20, 2020
1 parent 35f1b1b commit eadbd62
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 18 deletions.
12 changes: 10 additions & 2 deletions components/date-picker/locale/tr_TR.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@ import { PickerLocale } from '../generatePicker';
// Merge into a locale object
const locale: PickerLocale = {
lang: {
placeholder: 'Tarih Seç',
rangePlaceholder: ['Başlangıç Tarihi', 'Bitiş Tarihi'],
placeholder: 'Tarih seç',
yearPlaceholder: 'Yıl seç',
quarterPlaceholder: 'Çeyrek seç',
monthPlaceholder: 'Ay seç',
weekPlaceholder: 'Hafta seç',
rangePlaceholder: ['Başlangıç tarihi', 'Bitiş tarihi'],
rangeYearPlaceholder: ['Başlangıç yılı', 'Bitiş yılı'],
rangeMonthPlaceholder: ['Başlangıç ayı', 'Bitiş ayı'],
rangeWeekPlaceholder: ['Başlangıç haftası', 'Bitiş haftası'],

...CalendarLocale,
},
timePickerLocale: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243408,7 +243408,7 @@ exports[`Locale Provider should display the text as tr 1`] = `
>
<input
autocomplete="off"
placeholder="Tarih Seç"
placeholder="Tarih seç"
readonly=""
size="12"
title=""
Expand Down Expand Up @@ -244002,7 +244002,7 @@ exports[`Locale Provider should display the text as tr 1`] = `
>
<input
autocomplete="off"
placeholder="Zaman Seç"
placeholder="Zaman seç"
readonly=""
size="10"
title=""
Expand Down Expand Up @@ -245410,7 +245410,7 @@ exports[`Locale Provider should display the text as tr 1`] = `
>
<input
autocomplete="off"
placeholder="Başlangıç Tarihi"
placeholder="Başlangıç tarihi"
readonly=""
size="12"
value=""
Expand Down Expand Up @@ -245450,7 +245450,7 @@ exports[`Locale Provider should display the text as tr 1`] = `
>
<input
autocomplete="off"
placeholder="Bitiş Tarihi"
placeholder="Bitiş tarihi"
readonly=""
size="12"
value=""
Expand Down
90 changes: 79 additions & 11 deletions components/locale/tr_TR.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
/* eslint-disable no-template-curly-in-string */
import Pagination from 'rc-pagination/lib/locale/tr_TR';
import DatePicker from '../date-picker/locale/tr_TR';
import TimePicker from '../time-picker/locale/tr_TR';
import Calendar from '../calendar/locale/tr_TR';
import { Locale } from '../locale-provider';

const typeTemplate = '${label} geçerli bir ${type} değil';

const localeValues: Locale = {
locale: 'tr',
Pagination,
Expand All @@ -14,12 +17,19 @@ const localeValues: Locale = {
placeholder: 'Lütfen seçiniz',
},
Table: {
filterTitle: 'Menü Filtrele',
filterTitle: 'Filtre menüsü',
filterConfirm: 'Tamam',
filterReset: 'Sıfırla',
selectAll: 'Hepsini Seç',
selectInvert: 'Tersini Seç',
filterEmptyText: 'Filtre yok',
selectAll: 'Tüm sayfayı seç',
selectInvert: 'Tersini seç',
selectionAll: 'Tümünü seç',
sortTitle: 'Sırala',
expand: 'Satırı genişlet',
collapse: 'Satırı daralt',
triggerDesc: 'Azalan düzende sırala',
triggerAsc: 'Artan düzende sırala',
cancelSort: 'Sıralamayı kaldır',
},
Modal: {
okText: 'Tamam',
Expand All @@ -35,25 +45,83 @@ const localeValues: Locale = {
searchPlaceholder: 'Arama',
itemUnit: 'Öğe',
itemsUnit: 'Öğeler',
remove: 'Kaldır',
selectCurrent: 'Tüm sayfayı seç',
removeCurrent: 'Sayfayı kaldır',
selectAll: 'Tümünü seç',
removeAll: 'Tümünü kaldır',
selectInvert: 'Tersini seç',
},
Upload: {
uploading: 'Yükleniyor...',
removeFile: `Dosyayı kaldır`,
uploadError: 'Yükleme Hatası',
previewFile: `Dosyayı Önizle`,
removeFile: 'Dosyayı kaldır',
uploadError: 'Yükleme hatası',
previewFile: 'Dosyayı önizle',
downloadFile: 'Dosyayı indir',
},
Empty: {
description: 'Veri Yok',
},
Icon: {
icon: 'icon',
icon: 'ikon',
},
Text: {
edit: 'düzenle',
copy: 'kopyala',
copied: 'kopyalandı',
expand: 'genişlet',
edit: 'Düzenle',
copy: 'Kopyala',
copied: 'Kopyalandı',
expand: 'Genişlet',
},
PageHeader: {
back: 'Geri',
},
Form: {
defaultValidateMessages: {
default: 'Alan doğrulama hatası ${label}',
required: '${label} gerekli bir alan',
enum: '${label} şunlardan biri olmalı: [${enum}]',
whitespace: '${label} sadece boşluk olamaz',
date: {
format: '${label} tarih biçimi geçersiz',
parse: '${label} bir tarihe dönüştürülemedi',
invalid: '${label} geçersiz bir tarih',
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate,
},
string: {
len: '${label} ${len} karakter olmalı',
min: '${label} en az ${min} karakter olmalı',
max: '${label} en çok ${max} karakter olmalı',
range: '${label} ${min}-${max} karakter arası olmalı',
},
number: {
len: '${label} ${len} olmalı',
min: '${label} en az ${min} olmalı',
max: '${label} en çok ${max} olmalı',
range: '${label} ${min}-${max} arası olmalı',
},
array: {
len: '${label} sayısı ${len} olmalı',
min: '${label} sayısı en az ${min} olmalı',
max: '${label} sayısı en çok ${max} olmalı',
range: '${label} sayısı ${min}-${max} arası olmalı',
},
pattern: {
mismatch: '${label} şu kalıpla eşleşmeli: ${pattern}',
},
},
},
};

Expand Down
3 changes: 2 additions & 1 deletion components/time-picker/locale/tr_TR.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { TimePickerLocale } from '../index';

const locale: TimePickerLocale = {
placeholder: 'Zaman Seç',
placeholder: 'Zaman seç',
rangePlaceholder: ['Başlangıç zamanı', 'Bitiş zamanı'],
};

export default locale;

0 comments on commit eadbd62

Please sign in to comment.