186******98
deepin
2013-12-24 17:42 请修改71楼,71楼是要删config.init。
但我现在已经删了config.init了,又把config.ini也删了,还是启动不了。
apt-get remove后手工删除了~/.config/下的deepin-translator文件夹,又install了一下。
还没有~/.config/deepin-translator文件夹,执行deeptranslator后,有了该文件夹,但是只有.ini。
删除.ini,还是一样,如下。
zhu@zhu-deepin:~/.config$ ls
autostart deepin-software-center gedit monitors.xml
blender deepin-system-settings gnome-session nautilus
chmsee deepin-terminal google-chrome network.conf
compiz-1 deepin-ui gtk-2.0 powers.xml
dconf deepin-user-manual gtk-3.0 pulse
deepin-game-center desktop inkscape pystorm
deepin-individuation dock iptux QuantiCode
deepin-media-player enchant Kingsoft Trolltech.conf
deepin-music-player eog launcher user-dirs.dirs
deepin-notifications fcitx libreoffice user-dirs.locale
deepin-screenshot FreeCAD lwqq yelp
zhu@zhu-deepin:~/.config$ deepin-translator
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
function get got error: No option 'two_way_translate' in section: 'Language Info'
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/deepin_utils/config.py", line 99, in get
return self.config_parser.get(section, option)
File "/usr/lib/python2.7/ConfigParser.py", line 340, in get
raise NoOptionError(option, section)
NoOptionError: No option 'two_way_translate' in section: 'Language Info'
Traceback (most recent call last):
File "/usr/bin/deepin-translator", line 51, in
from dict_interface import get_translate_simple, get_translate_long
File "/usr/share/deepin-translator/src/dict_interface.py", line 30, in
dict_plugin = DictPlugin()
File "/usr/share/deepin-translator/src/dict_plugin.py", line 40, in __init__
self.scan_plugin_info()
File "/usr/share/deepin-translator/src/dict_plugin.py", line 93, in scan_plugin_info
two_way_translate = is_true(plugin_config.get("Language Info", "two_way_translate"))
File "/usr/lib/python2.7/dist-packages/deepin_utils/core.py", line 97, in is_true
return string_value.lower() == "true"
AttributeError: 'NoneType' object has no attribute 'lower'
段错误
zhu@zhu-deepin:~/.config$ ls
autostart deepin-system-settings gnome-session network.conf
blender deepin-terminal google-chrome powers.xml
chmsee deepin-translator gtk-2.0 pulse
compiz-1 deepin-ui gtk-3.0 pystorm
dconf deepin-user-manual inkscape QuantiCode
deepin-game-center desktop iptux Trolltech.conf
deepin-individuation dock Kingsoft user-dirs.dirs
deepin-media-player enchant launcher user-dirs.locale
deepin-music-player eog libreoffice yelp
deepin-notifications fcitx lwqq
deepin-screenshot FreeCAD monitors.xml
deepin-software-center gedit nautilus
zhu@zhu-deepin:~/.config$ cd deepin-translator
zhu@zhu-deepin:~/.config/deepin-translator$ ls
config.ini
zhu@zhu-deepin:~/.config/deepin-translator$ rm config.ini
zhu@zhu-deepin:~/.config/deepin-translator$ cd ~
zhu@zhu-deepin:~$ deepin-translator
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
function get got error: No option 'two_way_translate' in section: 'Language Info'
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/deepin_utils/config.py", line 99, in get
return self.config_parser.get(section, option)
File "/usr/lib/python2.7/ConfigParser.py", line 340, in get
raise NoOptionError(option, section)
NoOptionError: No option 'two_way_translate' in section: 'Language Info'
Traceback (most recent call last):
File "/usr/bin/deepin-translator", line 51, in
from dict_interface import get_translate_simple, get_translate_long
File "/usr/share/deepin-translator/src/dict_interface.py", line 30, in
dict_plugin = DictPlugin()
File "/usr/share/deepin-translator/src/dict_plugin.py", line 40, in __init__
self.scan_plugin_info()
File "/usr/share/deepin-translator/src/dict_plugin.py", line 93, in scan_plugin_info
two_way_translate = is_true(plugin_config.get("Language Info", "two_way_translate"))
File "/usr/lib/python2.7/dist-packages/deepin_utils/core.py", line 97, in is_true
return string_value.lower() == "true"
AttributeError: 'NoneType' object has no attribute 'lower'
段错误
zhu@zhu-deepin:~$
Reply Like 0 View the author
作为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. 更多智能化的小功能我还在做, 做完就第一时间给大家分享。 :)