chore: handle requested changes

This commit is contained in:
Elian Doran 2025-11-16 21:32:08 +02:00
parent 5281e8e5b4
commit 17298edfcc
No known key found for this signature in database
3 changed files with 4 additions and 3 deletions

View File

@ -136,7 +136,7 @@ function MindElixir({ containerRef: externalContainerRef, containerProps, apiRef
const mind = new VanillaMindElixir({
el: containerRef.current,
locale: LOCALE_MAPPINGS[locale],
locale: LOCALE_MAPPINGS[locale as DISPLAYABLE_LOCALE_IDS] ?? undefined,
editable
});

View File

@ -10,6 +10,7 @@ import { NonDeletedExcalidrawElement } from "@excalidraw/excalidraw/element/type
import { goToLinkExt } from "../../../services/link";
import useCanvasPersistence from "./persistence";
import { LANGUAGE_MAPPINGS } from "./i18n";
import { DISPLAYABLE_LOCALE_IDS } from "@triliumnext/commons";
// currently required by excalidraw, in order to allows self-hosting fonts locally.
// this avoids making excalidraw load the fonts from an external CDN.
@ -60,7 +61,7 @@ export default function Canvas({ note, noteContext }: TypeWidgetProps) {
detectScroll={false}
handleKeyboardGlobally={false}
autoFocus={false}
langCode={LANGUAGE_MAPPINGS[locale]}
langCode={LANGUAGE_MAPPINGS[locale as DISPLAYABLE_LOCALE_IDS] ?? undefined}
UIOptions={{
canvasActions: {
saveToActiveFile: false,

View File

@ -15,7 +15,7 @@ One important aspect is the fact that we are using a key-based approach. This me
The key-based approach allows a hierarchical structure. For example, a key of `about.title` would be added in `translation.json` as follows:
```
```json
{
"about": {
"title": "About Trilium Notes"