Skip to content

Commit 5e4af03

Browse files
committed
feat(i18n): add Turkish login locale
1 parent 78aad47 commit 5e4af03

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

‎src/node/i18n/index.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import i18next, { init } from "i18next"
33
import * as en from "./locales/en.json"
44
import * as ja from "./locales/ja.json"
55
import * as th from "./locales/th.json"
6+
import * as tr from "./locales/tr.json"
67
import * as ur from "./locales/ur.json"
78
import * as zhCn from "./locales/zh-cn.json"
89

@@ -16,6 +17,9 @@ const defaultResources = {
1617
th: {
1718
translation: th,
1819
},
20+
tr: {
21+
translation: tr,
22+
},
1923
ja: {
2024
translation: ja,
2125
},

‎src/node/i18n/locales/tr.json‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"LOGIN_TITLE": "{{app}} girişi",
3+
"LOGIN_BELOW": "Lütfen aşağıdan giriş yapın.",
4+
"WELCOME": "{{app}} uygulamasına hoş geldiniz",
5+
"LOGIN_PASSWORD": "Parola için yapılandırma dosyasını kontrol edin.",
6+
"LOGIN_USING_ENV_PASSWORD": "Parola $PASSWORD ortam değişkeninden ayarlandı.",
7+
"LOGIN_USING_HASHED_PASSWORD": "Parola $HASHED_PASSWORD ortam değişkeninden ayarlandı.",
8+
"SUBMIT": "GÖNDER",
9+
"PASSWORD_PLACEHOLDER": "PAROLA",
10+
"LOGIN_RATE_LIMIT": "Giriş denemesi sınırına ulaşıldı!",
11+
"MISS_PASSWORD": "Parola eksik",
12+
"INCORRECT_PASSWORD": "Parola yanlış."
13+
}

‎test/unit/node/i18n.test.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import { promises as fs } from "fs"
22
import * as os from "os"
33
import * as path from "path"
4-
import { loadCustomStrings } from "../../../src/node/i18n"
4+
import i18n, { loadCustomStrings } from "../../../src/node/i18n"
55

66
describe("i18n", () => {
7+
it("includes Turkish translations", () => {
8+
expect(i18n.getResource("tr", "translation", "WELCOME")).toBe("{{app}} uygulamasına hoş geldiniz")
9+
})
10+
711
let tempDir: string
812
let validJsonFile: string
913
let invalidJsonFile: string

0 commit comments

Comments
 (0)