深度翻译诞生记
Tofloor
poster avatar
186******98
deepin
2013-12-14 01:44
Author
在Windows和Mac下面都有好的屏幕取词软件, 但是Linux的屏幕取词都不尽如人意, 遇到图片、影印PDF、或者很多鼠标不能选中的时候, 就要自己输入, 然后拷贝粘贴到翻译工具上, 试想一下如果平时我们在专心看外文资料, 移动鼠标就能干的活要这么累, 那是多么的没有效率?

作为Linux Deepin团队一员, 我们有责任让Linux的每个特性都要比其他操作系统更好, 但是因为项目优先级, 一直没有开展深度翻译的工作, 只是有一天写新版深度影音写累了(新版深度影音功能更碉堡, 会在深度翻译正式版完成后快速开发, 期待的同学不要一直催哈 ), 突然想到实现Linux OCR 的核心技术的方法, 这才让这个项目得以完成任意软件的屏幕取词功能。

这里还要感谢侯哥(深度音乐的作者)在前后端的大力协作开发, 深度翻译才能这么快的面世, BTW 剧透一下, 侯哥的下一个作品 Deepin Talk 简直是太酷了, 同样值得大家期待。

好了, 先说一下测试版怎么安装吧:

1. 打开软件中心切换到 官方测试源

2. 点击右上角菜单选择 “更新软件列表”

3. 在软件中心首页搜索 deepin-translator 进行安装 (如果软件中心搜索不了, 请用  sudo apt-get install deepin-translator 来安装)

深度翻译使用 X11/QML/OCR 的技术实现65种语言的互相翻译, 安装完成以后, 在启动器中点击深度翻译启动, 会发现托盘区域深度翻译已经常驻了。 然后操作就很简单了, 在屏幕上任意位置双击单词就可以弹出翻译并自动朗读, 单词翻译默认用的是有道翻译, 还可以进行相关单词的搜索翻译, 选中一段英文也可以进行长句翻译和朗读。如果遇到图片或者不想点击就翻译光标处的单词, 按下Alt键即可进行屏幕取词翻译。

托盘点右键菜单可以对 “取词后发音”, “按住Alt键取词” 等选项进行自定义设置, 如果需要调整语言和切换翻译引擎, 可以在设置界面中调整。

深度翻译现在还处于测试版, 国际化、美化工作工作还没有做, 欢迎朋友们各种吐槽、建议和开发贡献, git 地址在: https://github.com/linuxdeepin/deepin-translator  , enjoy!

交互小细节:
1. 翻译平常虽然开着, 但是不是任何时候都想翻译,如果刚好要翻译光标处的单词, 双击都不够懒, 按一下Alt就行了

2. Alt 按键虽然方便, 但是对于大量开发人员平常在按组合键的时候就会非常多的触发翻译窗口弹出, 深度翻译已经细心的研究了用户按键的时间, 一般人按Alt组合键的间隔是小于 300 毫秒的, 所以我们只有在人只按住 Alt 键超过300毫秒才开始弹出翻译窗口, 如果深度翻译发现你只是按Ctrl组合键路过打酱油的, 它会乖乖的在后台不弹出任何窗口来干扰用户。

3. 经常我们都会查询单词, 但是有时候又不记得几天前差的单词是什么, 把单词翻译窗口的输入清空一下, 看到什么了? 深度翻译会记忆最后你查询的5个单词, 以帮你进行穿越回忆

4. 深度翻译在网络没有连接的时候, 会自动切换到本地词典和语音合成来满足用户的需求, 当
有网络的时候再自动选用效果更好的网络取词。

5. 有时候网络是通的, 但是自己在下载或者网速问题, 这时候可以点击托盘菜单中的 “启用本地翻译” 来避免网络延时问题。

6. 普通人大部分只在两种语言之间进行翻译, 深度翻译的菜单和设置界面都一个非常方便的 “反向翻译” 按钮让用户可以快速的在母语和英语之间来回切换。

7. 深度翻译词典支持: 有道、Google、星际译王, 语音合成引擎有 有道、Google、SVOX, 你可以任何组合词典和语音之间的配合。

8. 有时候图片或者超链的文字没法点, 我们可以用OCR识别后, 直接点击窗口右上角的插件小图标, 就可以直接复制到系统粘贴板, 当然也可以直接查询当前单词的维基百科和Google搜索。

9. 绑定按键到 deepin-translator --search 可以直接弹出输入框进行搜索翻译, 2014 应该会默认绑定到 Ctrl + Alt + f 上.

10. 更多智能化的小功能我还在做, 做完就第一时间给大家分享。 :)
Reply Favorite View the author
All Replies
...6 / 7
To page
171******81
deepin
2014-03-03 23:48
#101
The user is banned, and the content is hidden.
fredy4212
deepin
2014-03-05 07:48
#102
翻譯很多都還沒好
Reply View the author
cxbii
deepin
2014-03-05 17:32
#103
面前还只有测试源有吧。面前需要修复的bug还有很多啊,但是现在全力搞2014,延后了
Reply View the author
isunny
deepin
2014-03-06 07:14
#104
建议对于所有程序开启右键菜单  使用深度翻译查找     例如文本程序  和浏览器 pdf 阅读器  等
Reply View the author
aipie0066
deepin
2014-03-14 18:07
#105
这个功能看起来,很不错,支持
Reply View the author
kingskill
deepin
2014-03-31 05:14
#106
这软件还可以,但长句翻译容易卡死,任务栏图标点击无反应。一开始没反应还以为运行不了。。。另外离线包需要那啥星?这……

哦对了,还有个最要命的事情,第一次运行取词前,屏幕都会黑一下闪一下……这是肿么回事…… :?:
Reply View the author
cxbii
deepin
2014-04-01 16:58
#107
这软件还可以,但长句翻译容易卡死,任务栏图标点击无反应。一开始没反应还以为运行不了。。。另外离线包需要那啥星?这……

哦对了,还有个最要命的事情,第一次运行取词前,屏幕都会黑一下闪一下……这是肿么回事…… :?:
还只是测试版啦
Reply View the author
kayyang
deepin
2014-04-04 19:25
#108
支持!!!!!!!!!!!!!!!!
Reply View the author
slg1984
deepin
2014-04-06 03:50
#109
安装完找不到了。。。翻遍了没找到
Reply View the author
136******54
deepin
2014-04-08 19:04
#110
深度翻译忽然不能用了,选择单词后没反应,点击“设置”和“向导”也没反应
从终端启动后,报错如下
  1. QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
  2. Xlib.protocol.request.QueryExtension
  3. Xlib.protocol.request.QueryExtension
  4. file:///usr/share/deepin-translator/src/dict_plugins/youdao/Translate.qml:3:1: module "Deepin.Locale" is not installed
  5.      import Deepin.Locale 1.0
  6.      ^
  7. file:///usr/share/deepin-translator/src/dict_plugins/google_long/Translate.qml:2:1: module "Deepin.Locale" is not installed
  8.      import Deepin.Locale 1.0
  9.      ^
  10. file:///usr/share/deepin-translator/src/dict_plugins/sdcv/Translate.qml:4:1: module "Deepin.Widgets" is not installed
  11.      import Deepin.Widgets 1.0
  12.      ^
  13. file:///usr/share/deepin-translator/src/dict_plugins/sdcv/Translate.qml:3:1: module "Deepin.Locale" is not installed
  14.      import Deepin.Locale 1.0
  15.      ^
  16. file:///usr/share/deepin-translator/src/dict_plugins/sdcv/Translate.qml:4:1: module "Deepin.Widgets" is not installed
  17.      import Deepin.Widgets 1.0
  18.      ^
  19. file:///usr/share/deepin-translator/src/dict_plugins/sdcv/Translate.qml:3:1: module "Deepin.Locale" is not installed
  20.      import Deepin.Locale 1.0
  21.      ^
  22. file:///usr/share/deepin-translator/src/SettingView.qml:5:1: module "Deepin.Locale" is not installed
  23.      import Deepin.Locale 1.0
  24.      ^
  25. file:///usr/share/deepin-translator/src/SettingView.qml:6:1: module "Deepin.Widgets" is not installed
  26.      import Deepin.Widgets 1.0
  27.      ^
  28. file:///usr/share/deepin-translator/src/SettingView.qml:5:1: module "Deepin.Locale" is not installed
  29.      import Deepin.Locale 1.0
  30.      ^
  31. file:///usr/share/deepin-translator/src/SettingView.qml:6:1: module "Deepin.Widgets" is not installed
  32.      import Deepin.Widgets 1.0
Copy the Code
点击单词后报错
  1. Traceback (most recent call last):
  2.   File "/usr/bin/deepin-translator", line 63, in show_translate
  3.     translate_simple.show_translate(x, y, text)
  4.   File "/usr/share/deepin-translator/src/translate_window.py", line 97, in show_translate
  5.     self.rootObject().showTranslate(x, y, text)
  6. AttributeError: 'NoneType' object has no attribute 'showTranslate'
Copy the Code
点击“设置”后报错
  1. QSGContext::initialize: stencil buffer support missing, expect rendering errors
Copy the Code
Reply View the author
赫赫有鸣
deepin
2014-04-08 19:46
#111
优良的品质要发扬光大啊
Reply View the author
3***9@qq.com
deepin
2014-04-08 20:06
#112
能使用lingoes吗?貌似这个不开源
Reply View the author
136******54
deepin
2014-04-10 18:20
#113
能使用lingoes吗?貌似这个不开源
https://github.com/linuxdeepin?page=2
Reply View the author
lvtongyuan
deepin
2014-05-18 20:37
#114
这个不错,在用Ubuntu时星际译王的包已经很难找了。
深度翻译有本地化星际译王的词典吗?
Reply View the author
186******98
deepin
2014-06-23 08:29
#115
如果你在深度翻译的设置里面选择星际译王, 当深度翻译翻译的时候会提示你安装词典, 并在安装完成后要星际译王的词典翻译.
Reply View the author
186******98
deepin
2014-06-23 08:30
#116
今天在 git 版添加了 --search 选项, 当调用 deepin-translator --search 命令的时候 (2014 正式版应该会绑定到 Ctrl + alt + f ) , 会弹出一个空白的居中输入框让用户直接输入, 方便那些快捷键的用户快速查询翻译一个单词.
Reply View the author
jiffies
deepin
2014-08-25 22:28
#117
额 我也在写一个翻译程序,看到PyOCR,学习了。
Reply View the author
yretsym
deepin
2014-08-26 02:38
#118
挺好用
Reply View the author
sxJJZ
deepin
2014-08-30 22:18
#119
这个很实用
Reply View the author
thinksummer
deepin
2014-09-02 19:17
#120
首先感谢作者的辛苦劳动

不过,5555,我新安装的深度系统32位的,深度翻译不能启动,其它软件正常,不知为何原因。
Reply View the author
...6 / 7
To page