Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(i18n): add Danish as a display language
Elian Doran032f8b51a06d
diff --git a/apps/client/src/widgets/collections/calendar/index.tsx b/apps/client/src/widgets/collections/calendar/index.tsxindex 20cf648ddb..045c3b2532 100644--- a/apps/client/src/widgets/collections/calendar/index.tsx+++ b/apps/client/src/widgets/collections/calendar/index.tsx@@ -95,6 +95,7 @@ export const LOCALE_MAPPINGS: Record<DISPLAYABLE_LOCALE_IDS, (() => Promise<{ dega: null,cn: () => import("fullcalendar/locales/zh-cn"),cs: () => import("fullcalendar/locales/cs"),+ da: () => import("fullcalendar/locales/da"),tw: () => import("fullcalendar/locales/zh-tw"),ro: () => import("fullcalendar/locales/ro"),ru: () => import("fullcalendar/locales/ru"),diff --git a/apps/client/src/widgets/type_widgets/canvas/i18n.ts b/apps/client/src/widgets/type_widgets/canvas/i18n.tsindex 996375d200..09f1cedbac 100644--- a/apps/client/src/widgets/type_widgets/canvas/i18n.ts+++ b/apps/client/src/widgets/type_widgets/canvas/i18n.ts@@ -5,6 +5,7 @@ export const LANGUAGE_MAPPINGS: Record<DISPLAYABLE_LOCALE_IDS, Language["code"]ar: "ar-SA",cn: "zh-CN",cs: "cs-CZ",+ da: "da-DK",de: "de-DE",en: "en","en-GB": "en",diff --git a/apps/client/src/widgets/type_widgets/spreadsheet/locales.ts b/apps/client/src/widgets/type_widgets/spreadsheet/locales.tsindex 58dab654c1..86637ce42f 100644--- a/apps/client/src/widgets/type_widgets/spreadsheet/locales.ts+++ b/apps/client/src/widgets/type_widgets/spreadsheet/locales.ts@@ -83,6 +83,7 @@ export const UNIVER_LOCALES: Record<DISPLAYABLE_LOCALE_IDS, UniverLocaleSource |])},cs: null,+ da: null,de: null,en: null,"en-GB": null,diff --git a/packages/ckeditor5/src/i18n.spec.ts b/packages/ckeditor5/src/i18n.spec.tsindex ef04abcf2c..903f8a3f36 100644--- a/packages/ckeditor5/src/i18n.spec.ts+++ b/packages/ckeditor5/src/i18n.spec.ts@@ -209,6 +209,7 @@ describe("getCkLocale", () => {[ "ar", "ar" ],[ "cn", "zh" ],[ "cs", "cs" ],+ [ "da", "da" ],[ "de", "de" ],[ "es", "es" ],[ "fa", "fa" ],diff --git a/packages/ckeditor5/src/i18n.ts b/packages/ckeditor5/src/i18n.tsindex efbaca55b6..63a3be51c6 100644--- a/packages/ckeditor5/src/i18n.ts+++ b/packages/ckeditor5/src/i18n.ts@@ -27,6 +27,10 @@ const LOCALE_MAPPINGS: Record<DISPLAYABLE_LOCALE_IDS, LocaleMapping | null> = {languageCode: "cs",coreTranslation: () => import("ckeditor5/translations/cs.js"),},+ da: {+ languageCode: "da",+ coreTranslation: () => import("ckeditor5/translations/da.js"),+ },de: {languageCode: "de",coreTranslation: () => import("ckeditor5/translations/de.js"),diff --git a/packages/commons/src/lib/dayjs.ts b/packages/commons/src/lib/dayjs.tsindex edcf5cb563..3bafdda235 100644--- a/packages/commons/src/lib/dayjs.ts+++ b/packages/commons/src/lib/dayjs.ts@@ -34,6 +34,7 @@ export const DAYJS_LOADER: Record<DISPLAYABLE_LOCALE_IDS, () => Promise<typeof i"ar": () => import("dayjs/locale/ar.js"),"cn": () => import("dayjs/locale/zh-cn.js"),"cs": () => import("dayjs/locale/cs.js"),+ "da": () => import("dayjs/locale/da.js"),"de": () => import("dayjs/locale/de.js"),"en": () => import("dayjs/locale/en.js"),"en-GB": () => import("dayjs/locale/en-gb.js"),diff --git a/packages/commons/src/lib/i18n.ts b/packages/commons/src/lib/i18n.tsindex 4207805ff8..eb1f544349 100644--- a/packages/commons/src/lib/i18n.ts+++ b/packages/commons/src/lib/i18n.ts@@ -10,13 +10,14 @@ 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" | "tur" | "vie";+ 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" | "dan" | "uig" | "tur" | "vie";}// When adding a new locale, prefer the version with hyphen instead of underscore.const UNSORTED_LOCALES = [{ id: "cn", name: "简体中文", electronLocale: "zh_CN", tesseractCode: "chi_sim" },{ id: "cs", name: "Čeština", electronLocale: "cs", tesseractCode: "ces" },+ { id: "da", name: "Dansk", electronLocale: "da", tesseractCode: "dan" },{ id: "de", name: "Deutsch", electronLocale: "de", tesseractCode: "deu" },{ id: "en", name: "English (United States)", electronLocale: "en", tesseractCode: "eng" },{ id: "en-GB", name: "English (United Kingdom)", electronLocale: "en_GB", tesseractCode: "eng" },