client: Translate rest of note types

This commit is contained in:
Elian Doran 2024-09-08 21:54:30 +03:00
parent e382a32ebd
commit 38ac4318b9
No known key found for this signature in database
3 changed files with 29 additions and 18 deletions

View File

@ -2,25 +2,26 @@ import server from '../services/server.js';
import mimeTypesService from '../services/mime_types.js'; import mimeTypesService from '../services/mime_types.js';
import NoteContextAwareWidget from "./note_context_aware_widget.js"; import NoteContextAwareWidget from "./note_context_aware_widget.js";
import dialogService from "../services/dialog.js"; import dialogService from "../services/dialog.js";
import { t } from '../services/i18n.js';
const NOTE_TYPES = [ const NOTE_TYPES = [
{ type: "file", title: "File", selectable: false }, { type: "file", title: t("note_types.file"), selectable: false },
{ type: "image", title: "Image", selectable: false }, { type: "image", title: t("note_types.image"), selectable: false },
{ type: "search", title: "Saved Search", selectable: false }, { type: "search", title: t("note_types.saved-search"), selectable: false },
{ type: "noteMap", mime: '', title: "Note Map", selectable: false }, { type: "noteMap", mime: '', title: t("note_types.note-map"), selectable: false },
{ type: "launcher", mime: '', title: "Launcher", selectable: false }, { type: "launcher", mime: '', title: t("note_types.launcher"), selectable: false },
{ type: "doc", mime: '', title: "Doc", selectable: false }, { type: "doc", mime: '', title: t("note_types.doc"), selectable: false },
{ type: "contentWidget", mime: '', title: "Widget", selectable: false }, { type: "contentWidget", mime: '', title: t("note_types.widget"), selectable: false },
{ type: "text", mime: "text/html", title: "Text", selectable: true }, { type: "text", mime: "text/html", title: t("note_types.text"), selectable: true },
{ type: "relationMap", mime: "application/json", title: "Relation Map", selectable: true }, { type: "relationMap", mime: "application/json", title: t("note_types.relation-map"), selectable: true },
{ type: "mindMap", mime: "application/json", "title": "Mind Map", selectable: true }, { type: "mindMap", mime: "application/json", "title": t("note_types.mind-map"), selectable: true },
{ type: "render", mime: '', title: "Render Note", selectable: true }, { type: "render", mime: '', title: t("note_types.render-note"), selectable: true },
{ type: "canvas", mime: 'application/json', title: "Canvas", selectable: true }, { type: "canvas", mime: 'application/json', title: t("note_types.canvas"), selectable: true },
{ type: "mermaid", mime: 'text/mermaid', title: "Mermaid Diagram", selectable: true }, { type: "mermaid", mime: 'text/mermaid', title: t("note_types.mermaid-diagram"), selectable: true },
{ type: "book", mime: '', title: "Book", selectable: true }, { type: "book", mime: '', title: t("note_types.book"), selectable: true },
{ type: "webView", mime: '', title: "Web View", selectable: true }, { type: "webView", mime: '', title: t("note_types.web-view"), selectable: true },
{ type: "code", mime: 'text/plain', title: "Code", selectable: true } { type: "code", mime: 'text/plain', title: t("note_types.code"), selectable: true }
]; ];
const NOT_SELECTABLE_NOTE_TYPES = NOTE_TYPES.filter(nt => !nt.selectable).map(nt => nt.type); const NOT_SELECTABLE_NOTE_TYPES = NOTE_TYPES.filter(nt => !nt.selectable).map(nt => nt.type);

View File

@ -1293,6 +1293,11 @@
"mermaid-diagram": "Mermaid Diagram", "mermaid-diagram": "Mermaid Diagram",
"canvas": "Canvas", "canvas": "Canvas",
"web-view": "Web View", "web-view": "Web View",
"mind-map": "Mind Map" "mind-map": "Mind Map",
"file": "File",
"image": "Image",
"launcher": "Launcher",
"doc": "Doc",
"widget": "Widget"
} }
} }

View File

@ -1293,6 +1293,11 @@
"render-note": "Randare notiță", "render-note": "Randare notiță",
"saved-search": "Căutare salvată", "saved-search": "Căutare salvată",
"text": "Text", "text": "Text",
"web-view": "Vizualizare web" "web-view": "Vizualizare web",
"doc": "Document",
"file": "Fișier",
"image": "Imagine",
"launcher": "Scurtătură",
"widget": "Widget"
} }
} }