mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-12 20:02:28 +08:00
add translation for image_context_menu.js and link_context_menu.js
This commit is contained in:
parent
d9ceca8cc5
commit
dedef69aec
@ -1,3 +1,4 @@
|
|||||||
|
import { t } from '../services/i18n.js';
|
||||||
import utils from "../services/utils.js";
|
import utils from "../services/utils.js";
|
||||||
import contextMenu from "./context_menu.js";
|
import contextMenu from "./context_menu.js";
|
||||||
import imageService from "../services/image.js";
|
import imageService from "../services/image.js";
|
||||||
@ -18,14 +19,14 @@ function setupContextMenu($image) {
|
|||||||
y: e.pageY,
|
y: e.pageY,
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
title: "Copy reference to clipboard",
|
title: t("image_context_menu.copy_reference_to_clipboard"),
|
||||||
command: "copyImageReferenceToClipboard",
|
command: "copyImageReferenceToClipboard",
|
||||||
uiIcon: "bx bx-directions"
|
uiIcon: "bx bx-directions"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Copy image to clipboard",
|
title: t("image_context_menu.copy_image_to_clipboard"),
|
||||||
command: "copyImageToClipboard",
|
command: "copyImageToClipboard",
|
||||||
uiIcon: "bx bx-copy"
|
uiIcon: "bx bx-copy"
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
selectMenuItemHandler: async ({ command }) => {
|
selectMenuItemHandler: async ({ command }) => {
|
||||||
@ -61,4 +62,4 @@ function setupContextMenu($image) {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
setupContextMenu
|
setupContextMenu
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { t } from "../services/i18n.js";
|
||||||
import contextMenu from "./context_menu.js";
|
import contextMenu from "./context_menu.js";
|
||||||
import appContext from "../components/app_context.js";
|
import appContext from "../components/app_context.js";
|
||||||
|
|
||||||
@ -6,9 +7,9 @@ function openContextMenu(notePath, e, viewScope = {}, hoistedNoteId = null) {
|
|||||||
x: e.pageX,
|
x: e.pageX,
|
||||||
y: e.pageY,
|
y: e.pageY,
|
||||||
items: [
|
items: [
|
||||||
{title: "Open note in a new tab", command: "openNoteInNewTab", uiIcon: "bx bx-link-external"},
|
{title: t("link_context_menu.open_note_in_new_tab"), command: "openNoteInNewTab", uiIcon: "bx bx-link-external"},
|
||||||
{title: "Open note in a new split", command: "openNoteInNewSplit", uiIcon: "bx bx-dock-right"},
|
{title: t("link_context_menu.open_note_in_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_window"), command: "openNoteInNewWindow", uiIcon: "bx bx-window-open"}
|
||||||
],
|
],
|
||||||
selectMenuItemHandler: ({command}) => {
|
selectMenuItemHandler: ({command}) => {
|
||||||
if (!hoistedNoteId) {
|
if (!hoistedNoteId) {
|
||||||
|
@ -1554,5 +1554,14 @@
|
|||||||
"paste": "粘贴",
|
"paste": "粘贴",
|
||||||
"paste-as-plain-text": "以纯文本粘贴",
|
"paste-as-plain-text": "以纯文本粘贴",
|
||||||
"search_online": "用 {{searchEngine}} 搜索 \"{{term}}\""
|
"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": "在新窗口中打开笔记"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1554,5 +1554,14 @@
|
|||||||
"paste": "Paste",
|
"paste": "Paste",
|
||||||
"paste-as-plain-text": "Paste as plain text",
|
"paste-as-plain-text": "Paste as plain text",
|
||||||
"search_online": "Search for \"{{term}}\" with {{searchEngine}}"
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user