From 38ac4318b9d5f193f281a39d137dbb306fb0ad13 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 8 Sep 2024 21:54:30 +0300 Subject: [PATCH] client: Translate rest of note types --- src/public/app/widgets/note_type.js | 33 +++++++++++---------- src/public/translations/en/translation.json | 7 ++++- src/public/translations/ro/translation.json | 7 ++++- 3 files changed, 29 insertions(+), 18 deletions(-) diff --git a/src/public/app/widgets/note_type.js b/src/public/app/widgets/note_type.js index 66e699eff..1bf121888 100644 --- a/src/public/app/widgets/note_type.js +++ b/src/public/app/widgets/note_type.js @@ -2,25 +2,26 @@ import server from '../services/server.js'; import mimeTypesService from '../services/mime_types.js'; import NoteContextAwareWidget from "./note_context_aware_widget.js"; import dialogService from "../services/dialog.js"; +import { t } from '../services/i18n.js'; const NOTE_TYPES = [ - { type: "file", title: "File", selectable: false }, - { type: "image", title: "Image", selectable: false }, - { type: "search", title: "Saved Search", selectable: false }, - { type: "noteMap", mime: '', title: "Note Map", selectable: false }, - { type: "launcher", mime: '', title: "Launcher", selectable: false }, - { type: "doc", mime: '', title: "Doc", selectable: false }, - { type: "contentWidget", mime: '', title: "Widget", selectable: false }, + { type: "file", title: t("note_types.file"), selectable: false }, + { type: "image", title: t("note_types.image"), selectable: false }, + { type: "search", title: t("note_types.saved-search"), selectable: false }, + { type: "noteMap", mime: '', title: t("note_types.note-map"), selectable: false }, + { type: "launcher", mime: '', title: t("note_types.launcher"), selectable: false }, + { type: "doc", mime: '', title: t("note_types.doc"), selectable: false }, + { type: "contentWidget", mime: '', title: t("note_types.widget"), selectable: false }, - { type: "text", mime: "text/html", title: "Text", selectable: true }, - { type: "relationMap", mime: "application/json", title: "Relation Map", selectable: true }, - { type: "mindMap", mime: "application/json", "title": "Mind Map", selectable: true }, - { type: "render", mime: '', title: "Render Note", selectable: true }, - { type: "canvas", mime: 'application/json', title: "Canvas", selectable: true }, - { type: "mermaid", mime: 'text/mermaid', title: "Mermaid Diagram", selectable: true }, - { type: "book", mime: '', title: "Book", selectable: true }, - { type: "webView", mime: '', title: "Web View", selectable: true }, - { type: "code", mime: 'text/plain', title: "Code", selectable: true } + { type: "text", mime: "text/html", title: t("note_types.text"), selectable: true }, + { type: "relationMap", mime: "application/json", title: t("note_types.relation-map"), selectable: true }, + { type: "mindMap", mime: "application/json", "title": t("note_types.mind-map"), selectable: true }, + { type: "render", mime: '', title: t("note_types.render-note"), selectable: true }, + { type: "canvas", mime: 'application/json', title: t("note_types.canvas"), selectable: true }, + { type: "mermaid", mime: 'text/mermaid', title: t("note_types.mermaid-diagram"), selectable: true }, + { type: "book", mime: '', title: t("note_types.book"), selectable: true }, + { type: "webView", mime: '', title: t("note_types.web-view"), 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); diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json index 848b3c083..73bcc112d 100644 --- a/src/public/translations/en/translation.json +++ b/src/public/translations/en/translation.json @@ -1293,6 +1293,11 @@ "mermaid-diagram": "Mermaid Diagram", "canvas": "Canvas", "web-view": "Web View", - "mind-map": "Mind Map" + "mind-map": "Mind Map", + "file": "File", + "image": "Image", + "launcher": "Launcher", + "doc": "Doc", + "widget": "Widget" } } diff --git a/src/public/translations/ro/translation.json b/src/public/translations/ro/translation.json index 4113cfedd..a4c174456 100644 --- a/src/public/translations/ro/translation.json +++ b/src/public/translations/ro/translation.json @@ -1293,6 +1293,11 @@ "render-note": "Randare notiță", "saved-search": "Căutare salvată", "text": "Text", - "web-view": "Vizualizare web" + "web-view": "Vizualizare web", + "doc": "Document", + "file": "Fișier", + "image": "Imagine", + "launcher": "Scurtătură", + "widget": "Widget" } }