From 41cf6f7eaffd34eed01a985b6e843e09b0f98ed7 Mon Sep 17 00:00:00 2001 From: KeuqS <50778230+KeuqS@users.noreply.github.com> Date: Sat, 10 Oct 2026 01:50:17 +0300 Subject: [PATCH] Add Turkish locale (#8050) --- src/node/i18n/index.ts | 4 ++++ src/node/i18n/locales/tr.json | 13 +++++++++++++ test/unit/node/i18n.test.ts | 6 +++++- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 src/node/i18n/locales/tr.json diff --git a/src/node/i18n/index.ts b/src/node/i18n/index.ts index e8186067b..491f2291b 100644 --- a/src/node/i18n/index.ts +++ b/src/node/i18n/index.ts @@ -3,6 +3,7 @@ import i18next, { init } from "i18next" import * as en from "./locales/en.json" import * as ja from "./locales/ja.json" import * as th from "./locales/th.json" +import * as tr from "./locales/tr.json" import * as ur from "./locales/ur.json" import * as zhCn from "./locales/zh-cn.json" @@ -16,6 +17,9 @@ const defaultResources = { th: { translation: th, }, + tr: { + translation: tr, + }, ja: { translation: ja, }, diff --git a/src/node/i18n/locales/tr.json b/src/node/i18n/locales/tr.json new file mode 100644 index 000000000..3016a7ec4 --- /dev/null +++ b/src/node/i18n/locales/tr.json @@ -0,0 +1,13 @@ +{ + "LOGIN_TITLE": "{{app}} girişi", + "LOGIN_BELOW": "Lütfen aşağıdan giriş yapın.", + "WELCOME": "{{app}} uygulamasına hoş geldiniz", + "LOGIN_PASSWORD": "Parola için yapılandırma dosyasını kontrol edin.", + "LOGIN_USING_ENV_PASSWORD": "Parola $PASSWORD ortam değişkeninden ayarlandı.", + "LOGIN_USING_HASHED_PASSWORD": "Parola $HASHED_PASSWORD ortam değişkeninden ayarlandı.", + "SUBMIT": "GÖNDER", + "PASSWORD_PLACEHOLDER": "PAROLA", + "LOGIN_RATE_LIMIT": "Giriş denemesi sınırına ulaşıldı!", + "MISS_PASSWORD": "Parola eksik", + "INCORRECT_PASSWORD": "Parola yanlış." +} diff --git a/test/unit/node/i18n.test.ts b/test/unit/node/i18n.test.ts index 90b10d048..8670f55a1 100644 --- a/test/unit/node/i18n.test.ts +++ b/test/unit/node/i18n.test.ts @@ -1,9 +1,13 @@ import { promises as fs } from "fs" import * as os from "os" import * as path from "path" -import { loadCustomStrings } from "../../../src/node/i18n" +import i18n, { loadCustomStrings } from "../../../src/node/i18n" describe("i18n", () => { + it("includes Turkish translations", () => { + expect(i18n.getResource("tr", "translation", "WELCOME")).toBe("{{app}} uygulamasına hoş geldiniz") + }) + let tempDir: string let validJsonFile: string let invalidJsonFile: string