diff options
author | 2022-08-17 22:54:41 +0100 | |
---|---|---|
committer | 2022-08-17 22:54:41 +0100 | |
commit | fb0cc81d1db0d88c90bb112a0caec66095fcc0f0 (patch) | |
tree | aaa5d0f92f55ccf3984af2cbf2ebbcb1da5fd7c6 /src/webview/contextMenu.ts | |
parent | 6.0.1-nightly.16 [skip ci] (diff) | |
download | ferdium-app-fb0cc81d1db0d88c90bb112a0caec66095fcc0f0.tar.gz ferdium-app-fb0cc81d1db0d88c90bb112a0caec66095fcc0f0.tar.zst ferdium-app-fb0cc81d1db0d88c90bb112a0caec66095fcc0f0.zip |
Feature: Add Ferdium Translator (#548)
Add feature to translate text natively using https://github.com/shikar/NODE_GOOGLE_TRANSLATE package and a LibreTranslate self-hosted option (already running on our server on https://translator.ferdium.org).
Diffstat (limited to 'src/webview/contextMenu.ts')
-rw-r--r-- | src/webview/contextMenu.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/webview/contextMenu.ts b/src/webview/contextMenu.ts index 72f927ef4..61771854f 100644 --- a/src/webview/contextMenu.ts +++ b/src/webview/contextMenu.ts | |||
@@ -9,6 +9,9 @@ export default async function setupContextMenu( | |||
9 | getSpellcheckerLanguage: () => void, | 9 | getSpellcheckerLanguage: () => void, |
10 | getSearchEngine: () => void, | 10 | getSearchEngine: () => void, |
11 | getClipboardNotifications: () => void, | 11 | getClipboardNotifications: () => void, |
12 | getEnableTranslator: () => void, | ||
13 | getTranslatorEngine: () => void, | ||
14 | getTranslatorLanguage: () => void, | ||
12 | ) { | 15 | ) { |
13 | const contextMenuBuilder = new ContextMenuBuilder(webContents); | 16 | const contextMenuBuilder = new ContextMenuBuilder(webContents); |
14 | 17 | ||
@@ -19,6 +22,9 @@ export default async function setupContextMenu( | |||
19 | ...props, | 22 | ...props, |
20 | searchEngine: getSearchEngine(), | 23 | searchEngine: getSearchEngine(), |
21 | clipboardNotifications: getClipboardNotifications(), | 24 | clipboardNotifications: getClipboardNotifications(), |
25 | enableTranslator: getEnableTranslator(), | ||
26 | translatorEngine: getTranslatorEngine(), | ||
27 | translatorLanguage: getTranslatorLanguage(), | ||
22 | }, | 28 | }, |
23 | // @ts-expect-error Expected 1 arguments, but got 4. | 29 | // @ts-expect-error Expected 1 arguments, but got 4. |
24 | isSpellcheckEnabled(), | 30 | isSpellcheckEnabled(), |