Skip to content

Build your personal knowledge base with Trilium Notes

feat(i18n): add Turkish as a display language

Erkan Doğan8a39545a0f4e
diff --git a/apps/client/src/widgets/collections/calendar/index.tsx b/apps/client/src/widgets/collections/calendar/index.tsx
index 26464144f8..21a9a4d7a1 100644
--- a/apps/client/src/widgets/collections/calendar/index.tsx
+++ b/apps/client/src/widgets/collections/calendar/index.tsx
@@ -112,6 +112,7 @@ export const LOCALE_MAPPINGS: Record<DISPLAYABLE_LOCALE_IDS, (() => Promise<{ de
pt: () => import("fullcalendar/locales/pt"),
pl: () => import("fullcalendar/locales/pl"),
"pt_br": () => import("fullcalendar/locales/pt-br"),
+ tr: () => import("fullcalendar/locales/tr"),
uk: () => import("fullcalendar/locales/uk"),
en: null,
"en-GB": () => import("fullcalendar/locales/en-gb"),
diff --git a/apps/client/src/widgets/type_widgets/canvas/i18n.ts b/apps/client/src/widgets/type_widgets/canvas/i18n.ts
index 5fd322ab21..0dcbdd4ce1 100644
--- a/apps/client/src/widgets/type_widgets/canvas/i18n.ts
+++ b/apps/client/src/widgets/type_widgets/canvas/i18n.ts
@@ -22,6 +22,7 @@ export const LANGUAGE_MAPPINGS: Record<DISPLAYABLE_LOCALE_IDS, Language["code"]
pt_br: "pt-BR",
ro: "ro-RO",
ru: "ru-RU",
+ tr: "tr-TR",
tw: "zh-TW",
uk: "uk-UA"
};
diff --git a/apps/client/src/widgets/type_widgets/spreadsheet/locales.ts b/apps/client/src/widgets/type_widgets/spreadsheet/locales.ts
index e668fb5555..812a4b09f0 100644
--- a/apps/client/src/widgets/type_widgets/spreadsheet/locales.ts
+++ b/apps/client/src/widgets/type_widgets/spreadsheet/locales.ts
@@ -180,6 +180,7 @@ export const UNIVER_LOCALES: Record<DISPLAYABLE_LOCALE_IDS, UniverLocaleSource |
import('@univerjs/preset-sheets-hyper-link/locales/zh-TW')
])
},
+ tr: null,
uk: null
};
diff --git a/packages/ckeditor5/src/i18n.spec.ts b/packages/ckeditor5/src/i18n.spec.ts
index 09fa19d903..1b75eb6559 100644
--- a/packages/ckeditor5/src/i18n.spec.ts
+++ b/packages/ckeditor5/src/i18n.spec.ts
@@ -213,6 +213,7 @@ describe("getCkLocale", () => {
[ "pt", "pt" ],
[ "pt_br", "pt-br" ],
[ "ro", "ro" ],
+ [ "tr", "tr" ],
[ "tw", "zh-tw" ],
[ "uk", "uk" ],
[ "ru", "ru" ]
diff --git a/packages/ckeditor5/src/i18n.ts b/packages/ckeditor5/src/i18n.ts
index c6330235d3..af1b1e4d18 100644
--- a/packages/ckeditor5/src/i18n.ts
+++ b/packages/ckeditor5/src/i18n.ts
@@ -88,6 +88,10 @@ const LOCALE_MAPPINGS: Record<DISPLAYABLE_LOCALE_IDS, LocaleMapping | null> = {
languageCode: "ru",
coreTranslation: () => import("ckeditor5/translations/ru.js"),
},
+ tr: {
+ languageCode: "tr",
+ coreTranslation: () => import("ckeditor5/translations/tr.js"),
+ },
};
/**
diff --git a/packages/commons/src/lib/dayjs.ts b/packages/commons/src/lib/dayjs.ts
index 7819991209..50651629f9 100644
--- a/packages/commons/src/lib/dayjs.ts
+++ b/packages/commons/src/lib/dayjs.ts
@@ -51,6 +51,7 @@ export const DAYJS_LOADER: Record<DISPLAYABLE_LOCALE_IDS, () => Promise<typeof i
"pl": () => import("dayjs/locale/pl.js"),
"ro": () => import("dayjs/locale/ro.js"),
"ru": () => import("dayjs/locale/ru.js"),
+ "tr": () => import("dayjs/locale/tr.js"),
"tw": () => import("dayjs/locale/zh-tw.js"),
"uk": () => import("dayjs/locale/uk.js"),
}
diff --git a/packages/commons/src/lib/i18n.ts b/packages/commons/src/lib/i18n.ts
index 55cc8039c5..9c225a18a1 100644
--- a/packages/commons/src/lib/i18n.ts
+++ b/packages/commons/src/lib/i18n.ts
@@ -10,7 +10,7 @@ export interface Locale {
/** The value to pass to `--lang` for the Electron instance in order to set it as a locale. Not setting it will hide it from the list of supported locales. */
electronLocale?: "en" | "de" | "es" | "fr" | "zh_CN" | "zh_TW" | "ro" | "af" | "am" | "ar" | "bg" | "bn" | "ca" | "cs" | "da" | "el" | "en_GB" | "es_419" | "et" | "fa" | "fi" | "fil" | "gu" | "he" | "hi" | "hr" | "hu" | "id" | "it" | "ja" | "kn" | "ko" | "lt" | "lv" | "ml" | "mr" | "ms" | "nb" | "nl" | "pl" | "pt_BR" | "pt_PT" | "ru" | "sk" | "sl" | "sr" | "sv" | "sw" | "ta" | "te" | "th" | "tr" | "uk" | "ur" | "vi";
/** The Tesseract OCR language code for this locale (e.g. "eng", "fra", "deu"). See https://tesseract-ocr.github.io/tessdoc/Data-Files-in-different-versions.html */
- tesseractCode?: "eng" | "deu" | "spa" | "fra" | "gle" | "ita" | "hin" | "ind" | "jpn" | "por" | "pol" | "ron" | "rus" | "chi_sim" | "chi_tra" | "ukr" | "ara" | "heb" | "kur" | "fas" | "kor" | "ces" | "uig";
+ tesseractCode?: "eng" | "deu" | "spa" | "fra" | "gle" | "ita" | "hin" | "ind" | "jpn" | "por" | "pol" | "ron" | "rus" | "chi_sim" | "chi_tra" | "ukr" | "ara" | "heb" | "kur" | "fas" | "kor" | "ces" | "uig" | "tur";
}
// When adding a new locale, prefer the version with hyphen instead of underscore.
@@ -33,6 +33,7 @@ const UNSORTED_LOCALES = [
{ id: "pl", name: "Polski", electronLocale: "pl", tesseractCode: "pol" },
{ id: "ro", name: "Română", electronLocale: "ro", tesseractCode: "ron" },
{ id: "ru", name: "Русский", electronLocale: "ru", tesseractCode: "rus" },
+ { id: "tr", name: "Türkçe", electronLocale: "tr", tesseractCode: "tur" },
{ id: "tw", name: "繁體中文", electronLocale: "zh_TW", tesseractCode: "chi_tra" },
{ id: "uk", name: "Українська", electronLocale: "uk", tesseractCode: "ukr" },