Git Product home page Git Product logo

ezetranslate's People

Contributors

ericwyn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

markwendy

ezetranslate's Issues

在ubuntu22上,划词后未翻译

Dear Ericwyn,

您好,非常感谢您开源该划词翻译工具。我非常感兴趣,您对代码注释格式、空格、换行、驼峰格式等的翻译描述,这非常适用于代码阅读、文献阅读。很遗憾,我没有成功使用它,想要请教如何正确使用

我在ubuntu22上,通过 sudo dpkg -i eze-translate-v1.5-ubuntu-22.deb安装,并安装了相应的xclip 0.13-2。以下是一些使用记录,以及遇到的问题:

1. 通过ubuntu22的show applications中的EzeTranslate应用图标打开该工具,然后在pdf或网页端选中词汇,(执行或不执行 alt/ctrl + enter 快捷键),(执行或不执行 EzeTranslate -x ),并未触发翻译
2. 在EzeTranslate中,点击“设置”,”日志“,显示无法加载/opt/EzeTranslate/config.yaml ,由于权限不够。我检查发现是-rw-r--r-- 1 root root 480 Apr 17 12:02 /opt/EzeTranslate/config.yaml。我猜想也许是因为我是sudo dpkg -i的方式安装的原因;同时显示“IPC 消息发送失败”
3. 在网页端选中词汇,然后在终端执行EzeTranslate -x ,会打开该工具,并成功触发翻译。但是我重新划词,并未再触发翻译。
终端输出:
[04-17 12:00:57] [D] 程序运行目录:/opt/EzeTranslate/
[04-17 12:00:57] [D] config baiduTransAppId : baiduTransAppId-xxxxxxxxxxxxxxx
[04-17 12:00:57] [D] config baiduTransAppSecret : baiduTransAppSecret-xxxxxxxxxxxxxxx
[04-17 12:00:57] [D] config youdaoTransAppId : youdaoTransAppId-xxxxxxxxxxxxxxx
[04-17 12:00:57] [D] config youdaoTransAppSecret : youdaoTransAppSecret-xxxxxxxxxxxxxxx
[04-17 12:00:57] [D] config googleTranslateUrl : translate.google.com
[04-17 12:00:57] [D] config googleTranslateProxy : google.com
[04-17 12:00:57] [D] config formatSpace : false
[04-17 12:00:57] [D] config formatCarriageReturn : false
[04-17 12:00:57] [D] config formatAnnotation : false
[04-17 12:00:57] [D] config translateSelect : google
[04-17 12:00:57] [D] DialUnix failed.
[04-17 12:00:57] [D] IPC 消息发送失败
[04-17 12:00:57] [D] 开始监听 IPC 消息
Listening on /tmp/trans_utils.socket
[04-17 12:00:57] [D] load resource :/opt/EzeTranslate//res-static/icon/icon.png success !
[04-17 12:00:57] [D] load resource :/opt/EzeTranslate//res-static/fonts/NotoSansSC-Medium.ttf success !
[04-17 12:00:57] [E] 配置文件保存失败
[04-17 12:00:57] [E] open /opt/EzeTranslate/config.yaml: permission denied
[04-17 12:00:57] [D] load resource :/opt/EzeTranslate//res-static/fonts/NotoSansSC-Medium.ttf from buf map
[04-17 12:00:58] [D] 接收到 IPC 消息 : NEW_SELECTION

[shell_2024-04-17_12:00:58] xclip -out
获取的划词: d on the robot to execute SLAM online (in real time) with real sensors data.
[04-17 12:00:58] [I] 为 google 翻译设置 URL:translate.google.com
[04-17 12:00:58] [I] 为 google 翻译设置代理:google.com
[04-17 12:00:58] [D] Google 翻译文字:d on the robot to execute SLAM online (in real time) with real sensors data.
[04-17 12:00:58] [D] 总长度:76汉字长度:0
[04-17 12:00:58] [D] ipc response:PONG

[04-17 12:00:58] [D] 已发送给其他翻译进程 : NEW_SELECTION

翻译结果: d 在机器人上使用真实传感器数据在线(实时)执行 SLAM。

4. 由于之前发现的权限不够,因此在终端执行sudo EzeTranslate -x,然后划词并未触发翻译
[04-17 12:02:20] [D] 程序运行目录:/opt/EzeTranslate/
[04-17 12:02:20] [D] config baiduTransAppId : baiduTransAppId-xxxxxxxxxxxxxxx
[04-17 12:02:20] [D] config baiduTransAppSecret : baiduTransAppSecret-xxxxxxxxxxxxxxx
[04-17 12:02:20] [D] config youdaoTransAppId : youdaoTransAppId-xxxxxxxxxxxxxxx
[04-17 12:02:20] [D] config youdaoTransAppSecret : youdaoTransAppSecret-xxxxxxxxxxxxxxx
[04-17 12:02:20] [D] config googleTranslateUrl : translate.google.com
[04-17 12:02:20] [D] config googleTranslateProxy : google.com
[04-17 12:02:20] [D] config formatSpace : false
[04-17 12:02:20] [D] config formatCarriageReturn : false
[04-17 12:02:20] [D] config formatAnnotation : false
[04-17 12:02:20] [D] config translateSelect : google
[04-17 12:02:20] [D] DialUnix failed.
[04-17 12:02:20] [D] IPC 消息发送失败
[04-17 12:02:20] [D] 开始监听 IPC 消息
2024/04/17 12:02:20 Fyne error: Unable to connect to session D-Bus
2024/04/17 12:02:20 Cause: exec: "dbus-launch": executable file not found in $PATH
2024/04/17 12:02:20 At: /home/ericwyn/go/pkg/mod/fyne.io/fyne/[email protected]/app/app_xdg.go:40
Listening on /tmp/trans_utils.socket
[04-17 12:02:20] [D] load resource :/opt/EzeTranslate//res-static/icon/icon.png success !
2024/04/17 12:02:20 Fyne error: Unable to connect to session D-Bus
2024/04/17 12:02:20 Cause: exec: "dbus-launch": executable file not found in $PATH
2024/04/17 12:02:20 At: /home/ericwyn/go/pkg/mod/fyne.io/fyne/[email protected]/app/app_xdg.go:177
[04-17 12:02:20] [D] load resource :/opt/EzeTranslate//res-static/fonts/NotoSansSC-Medium.ttf success !
[04-17 12:02:20] [D] load resource :/opt/EzeTranslate//res-static/fonts/NotoSansSC-Medium.ttf from buf map
[04-17 12:02:20] [D] 接收到 IPC 消息 : NEW_SELECTION

[shell_2024-04-17_12:02:20] xclip -out
获取的划词: EzeTranslate -x
[04-17 12:02:20] [I] 为 google 翻译设置 URL:translate.google.com
[04-17 12:02:20] [I] 为 google 翻译设置代理:google.com
[04-17 12:02:20] [D] Google 翻译文字:EzeTranslate -x
[04-17 12:02:20] [D] 总长度:16汉字长度:0
[04-17 12:02:20] [D] ipc response:PONG

[04-17 12:02:20] [D] 已发送给其他翻译进程 : NEW_SELECTION

翻译结果: EzeTranslate -x

5. 在4中执行了sudo EzeTranslate -x之后,然后在终端输入ctrl+c关闭程序,然后输入EzeTranslate -x打开应用失败,显示该套接字绑定的地址已经被其他进程占用
[04-17 12:03:00] [D] 开始监听 IPC 消息
panic: Cannot listen to unix domain socket: listen unix /tmp/trans_utils.socket: bind: address already in use

goroutine 6 [running]:
github.com/Ericwyn/EzeTranslate/ipc.(*UnixSocket).createServer(0xc000118000)
/home/ericwyn/apps/EzeTranslate/ipc/socket.go:35 +0x294
github.com/Ericwyn/EzeTranslate/ipc.(*UnixSocket).StartServer(...)
/home/ericwyn/apps/EzeTranslate/ipc/socket.go:79
github.com/Ericwyn/EzeTranslate/ipc.StartUnixSocketListener(0xc85c28)
/home/ericwyn/apps/EzeTranslate/ipc/server.go:26 +0xe5
created by github.com/Ericwyn/EzeTranslate/ui.startUnixSocketServer in goroutine 1
/home/ericwyn/apps/EzeTranslate/ui/ui.go:146 +0x34

期待您的回复,非常感谢

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.