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
add translation for image_context_menu.js and link_context_menu.js
Nriverdedef69aec46
diff --git a/src/public/app/menus/image_context_menu.js b/src/public/app/menus/image_context_menu.jsindex 6da4363249..04860fe7e7 100644--- a/src/public/app/menus/image_context_menu.js+++ b/src/public/app/menus/image_context_menu.js@@ -1,3 +1,4 @@+import { t } from '../services/i18n.js';import utils from "../services/utils.js";import contextMenu from "./context_menu.js";import imageService from "../services/image.js";@@ -18,14 +19,14 @@ function setupContextMenu($image) {y: e.pageY,items: [{- title: "Copy reference to clipboard",+ title: t("image_context_menu.copy_reference_to_clipboard"),command: "copyImageReferenceToClipboard",uiIcon: "bx bx-directions"},- {- title: "Copy image to clipboard",+ {+ title: t("image_context_menu.copy_image_to_clipboard"),command: "copyImageToClipboard",- uiIcon: "bx bx-copy"+ uiIcon: "bx bx-copy"},],selectMenuItemHandler: async ({ command }) => {@@ -61,4 +62,4 @@ function setupContextMenu($image) {export default {setupContextMenu-};\ No newline at end of file+};diff --git a/src/public/app/menus/link_context_menu.js b/src/public/app/menus/link_context_menu.jsindex 8070e4020e..fda888f142 100644--- a/src/public/app/menus/link_context_menu.js+++ b/src/public/app/menus/link_context_menu.js@@ -1,3 +1,4 @@+import { t } from "../services/i18n.js";import contextMenu from "./context_menu.js";import appContext from "../components/app_context.js";@@ -6,9 +7,9 @@ function openContextMenu(notePath, e, viewScope = {}, hoistedNoteId = null) {x: e.pageX,y: e.pageY,items: [- {title: "Open note in a new tab", command: "openNoteInNewTab", uiIcon: "bx bx-link-external"},- {title: "Open note in a new split", command: "openNoteInNewSplit", uiIcon: "bx bx-dock-right"},- {title: "Open note in a new window", command: "openNoteInNewWindow", uiIcon: "bx bx-window-open"}+ {title: t("link_context_menu.open_note_in_new_tab"), command: "openNoteInNewTab", uiIcon: "bx bx-link-external"},+ {title: t("link_context_menu.open_note_in_new_split"), command: "openNoteInNewSplit", uiIcon: "bx bx-dock-right"},+ {title: t("link_context_menu.open_note_in_new_window"), command: "openNoteInNewWindow", uiIcon: "bx bx-window-open"}],selectMenuItemHandler: ({command}) => {if (!hoistedNoteId) {diff --git a/src/public/translations/cn/translation.json b/src/public/translations/cn/translation.jsonindex 03d2fed19a..de5f96277f 100644--- a/src/public/translations/cn/translation.json+++ b/src/public/translations/cn/translation.json@@ -1554,5 +1554,14 @@"paste": "粘贴","paste-as-plain-text": "以纯文本粘贴","search_online": "用 {{searchEngine}} 搜索 \"{{term}}\""+ },+ "image_context_menu": {+ "copy_reference_to_clipboard": "复制引用到剪贴板",+ "copy_image_to_clipboard": "复制图片到剪贴板"+ },+ "link_context_menu": {+ "open_note_in_new_tab": "在新标签页中打开笔记",+ "open_note_in_new_split": "在新分屏中打开笔记",+ "open_note_in_new_window": "在新窗口中打开笔记"}}diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.jsonindex 23ca47bccb..2982ef55a0 100644--- a/src/public/translations/en/translation.json+++ b/src/public/translations/en/translation.json@@ -1554,5 +1554,14 @@"paste": "Paste","paste-as-plain-text": "Paste as plain text","search_online": "Search for \"{{term}}\" with {{searchEngine}}"+ },+ "image_context_menu": {+ "copy_reference_to_clipboard": "Copy reference to clipboard",+ "copy_image_to_clipboard": "Copy image to clipboard"+ },+ "link_context_menu": {+ "open_note_in_new_tab": "Open note in a new tab",+ "open_note_in_new_split": "Open note in a new split",+ "open_note_in_new_window": "Open note in a new window"}}