|
1 | | -import { app, BrowserWindow, globalShortcut, ipcMain, Menu, SaveDialogOptions, Tray, Notification, shell, dialog } from "electron"; |
| 1 | +import { app, BrowserWindow, globalShortcut, ipcMain, Menu, SaveDialogOptions, Tray, Notification, shell } from "electron"; |
2 | 2 | import { join, resolve } from "path"; |
3 | 3 | import { writeJSONSync, readJSONSync, existsSync, mkdirSync } from "fs-extra"; |
4 | 4 | import chokidar from "chokidar"; |
5 | 5 | import { compressImage, pngToIco } from "./image"; |
6 | 6 | import { openDirectory, saveDialog, saveBase64File, selectDirectory, writeFile } from "./file"; |
7 | 7 | import { getFilePath, notification } from "./helper"; |
8 | | -import { youdaoTranslate } from "./developer"; |
| 8 | +import { translate } from "./developer"; |
9 | 9 | import config from "../config"; |
10 | 10 | import defaultUserConfig from "../data/config.json"; |
11 | 11 |
|
@@ -295,4 +295,4 @@ ipcMain.handle("get-config", () => userConfig); |
295 | 295 | ipcMain.handle("open-url", (e, url: string) => shell.openExternal(url)); |
296 | 296 |
|
297 | 297 | // 翻译 |
298 | | -ipcMain.handle("youdao-translate", (e, words: string) => youdaoTranslate(words)); |
| 298 | +ipcMain.handle("translate", (e, words: string) => translate(words)); |
0 commit comments