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 Indonesian (id) as a selectable display language
Elian Doran28b9978f4448
diff --git a/apps/client/src/widgets/collections/calendar/index.tsx b/apps/client/src/widgets/collections/calendar/index.tsxindex 6994767f3a..e291a66ad7 100644--- a/apps/client/src/widgets/collections/calendar/index.tsx+++ b/apps/client/src/widgets/collections/calendar/index.tsx@@ -79,6 +79,7 @@ export const LOCALE_MAPPINGS: Record<DISPLAYABLE_LOCALE_IDS, (() => Promise<{ defr: () => import("@fullcalendar/core/locales/fr"),it: () => import("@fullcalendar/core/locales/it"),hi: () => import("@fullcalendar/core/locales/hi"),+ id: () => import("@fullcalendar/core/locales/id"),ga: null,cn: () => import("@fullcalendar/core/locales/zh-cn"),cs: () => import("@fullcalendar/core/locales/cs"),diff --git a/apps/client/src/widgets/type_widgets/canvas/i18n.ts b/apps/client/src/widgets/type_widgets/canvas/i18n.tsindex 59edc8bc5c..cb7803547e 100644--- a/apps/client/src/widgets/type_widgets/canvas/i18n.ts+++ b/apps/client/src/widgets/type_widgets/canvas/i18n.ts@@ -12,6 +12,7 @@ export const LANGUAGE_MAPPINGS: Record<DISPLAYABLE_LOCALE_IDS, Language["code"]es: "es-ES",fr: "fr-FR",ga: null,+ id: "id-ID",it: "it-IT",hi: "hi-IN",ja: "ja-JP",diff --git a/packages/ckeditor5/src/i18n.ts b/packages/ckeditor5/src/i18n.tsindex d64cebb330..4afe726601 100644--- a/packages/ckeditor5/src/i18n.ts+++ b/packages/ckeditor5/src/i18n.ts@@ -46,6 +46,11 @@ const LOCALE_MAPPINGS: Record<DISPLAYABLE_LOCALE_IDS, LocaleMapping | null> = {premiumFeaturesTranslation: () => import("ckeditor5-premium-features/translations/fr.js"),},ga: null,+ id: {+ languageCode: "id",+ coreTranslation: () => import("ckeditor5/translations/id.js"),+ premiumFeaturesTranslation: () => import("ckeditor5-premium-features/translations/id.js"),+ },it: {languageCode: "it",coreTranslation: () => import("ckeditor5/translations/it.js"),diff --git a/packages/commons/src/lib/dayjs.ts b/packages/commons/src/lib/dayjs.tsindex fe7e58b14c..09fac0f5ee 100644--- a/packages/commons/src/lib/dayjs.ts+++ b/packages/commons/src/lib/dayjs.ts@@ -45,6 +45,7 @@ export const DAYJS_LOADER: Record<DISPLAYABLE_LOCALE_IDS, () => Promise<typeof i"es": () => import("dayjs/locale/es.js"),"fr": () => import("dayjs/locale/fr.js"),"ga": () => import("dayjs/locale/ga.js"),+ "id": () => import("dayjs/locale/id.js"),"it": () => import("dayjs/locale/it.js"),"hi": () => import("dayjs/locale/hi.js"),"ja": () => import("dayjs/locale/ja.js"),diff --git a/packages/commons/src/lib/i18n.ts b/packages/commons/src/lib/i18n.tsindex 287000b87d..14249ff275 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" | "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";}// When adding a new locale, prefer the version with hyphen instead of underscore.@@ -23,6 +23,7 @@ const UNSORTED_LOCALES = [{ id: "es", name: "Español", electronLocale: "es", tesseractCode: "spa" },{ id: "fr", name: "Français", electronLocale: "fr", tesseractCode: "fra" },{ id: "ga", name: "Gaeilge", electronLocale: "en", tesseractCode: "gle" },+ { id: "id", name: "Bahasa Indonesia", electronLocale: "id", tesseractCode: "ind" },{ id: "it", name: "Italiano", electronLocale: "it", tesseractCode: "ita" },{ id: "hi", name: "हिन्दी", electronLocale: "hi", tesseractCode: "hin" },{ id: "ja", name: "日本語", electronLocale: "ja", tesseractCode: "jpn" },