Adding Turkish translation

Change-Id: I2b50699427c836e2dfb098c9f42c7ae06b385a34
This commit is contained in:
Numan MENEKŞE 2023-08-07 07:22:28 +00:00 committed by Numan Menekşe
parent 5a31563316
commit 4d606d4742
6 changed files with 3114 additions and 1 deletions

View File

@ -19,7 +19,7 @@ module.exports = function (grunt) {
src: ['src/**/*.{jsx,js}'],
dest: 'src',
options: {
lngs: ['en', 'zh-hans', 'ko-kr'],
lngs: ['en', 'zh-hans', 'ko-kr', 'tr'],
removeUnusedKeys: true,
sort: true,
keySeparator: false,

View File

@ -0,0 +1,4 @@
---
features:
- |
Add Turkish language support

View File

@ -45,6 +45,13 @@ const SUPPORT_LOCALES_ALL = [
icon: 'ko',
momentName: 'ko',
},
{
name: 'Türkçe',
value: 'tr-tr',
shortname: 'tr',
icon: 'tr',
momentName: 'tr',
},
];
const getDefaultLanguageInConfig = () => {
@ -158,6 +165,63 @@ const init = () => {
future: '在%s后',
},
});
} else if (lang === 'tr-tr') {
moment.locale('tr', {
months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(
'_'
),
monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(
'_'
),
weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),
weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
meridiem: function (hours, minutes, isLower) {
if (hours < 12) {
return isLower ? 'öö' : 'ÖÖ';
} else {
return isLower ? 'ös' : 'ÖS';
}
},
meridiemParse: /öö|ÖÖ|ös|ÖS/,
isPM: function (input) {
return input === 'ös' || input === 'ÖS';
},
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
calendar: {
sameDay: '[bugün saat] LT',
nextDay: '[yarın saat] LT',
nextWeek: '[gelecek] dddd [saat] LT',
lastDay: '[dün] LT',
lastWeek: '[geçen] dddd [saat] LT',
sameElse: 'L',
},
relativeTime: {
future: '%s sonra',
past: '%s önce',
s: '1 saniye',
ss: '%d saniye',
m: '1 dakika',
mm: '%d dakika',
h: '1 saat',
hh: '%d saat',
d: '1 gün',
dd: '%d gün',
w: '1 hafta',
ww: '%d hafta',
M: '1 ay',
MM: '%d ay',
y: '1 yıl',
yy: '%d yıl',
},
});
}
return { locales };

View File

@ -24,6 +24,7 @@ import variables from 'styles/variables.less';
import zhCN from 'antd/es/locale/zh_CN';
import enUS from 'antd/es/locale/en_US';
import koKR from 'antd/es/locale/ko_KR';
import trTR from 'antd/es/locale/tr_TR';
import i18n from './i18n';
import App from './App';
@ -39,6 +40,7 @@ const antdLanguageMap = {
en: enUS,
'zh-hans': zhCN,
'ko-kr': koKR,
'tr-tr': trTR,
};
const getAntdLocale = (locale) => {

View File

@ -15,9 +15,11 @@
import zhHansData from './zh-hans.json';
import enData from './en.json';
import krData from './ko-kr.json';
import trData from './tr-tr.json';
export default {
'zh-hans': zhHansData,
en: enData,
'ko-kr': krData,
'tr': trData,
};

3041
src/locales/tr-tr.json Normal file

File diff suppressed because it is too large Load Diff