安装环境Ubuntu16.04
sudo apt install goldendict gawk
- 下载translate-shell, 并手动编译
$ git clone https://github.com/soimort/translate-shell
$ cd translate-shell/
$ make
$ [sudo] make install
In case you have only zsh but not bash in your system, build with:
$ make TARGET=zsh
The default PREFIX of installation is /usr/local. To install the program to somewhere else (e.g. /usr, ~/.local), use:
$ [sudo] make PREFIX=/usr install
- 开启 GoldenDict ,选择「编辑」-「字典」-「字典来源」-「程式」。
点选右边的「新增」,勾选「已启用」并选择「纯文字类型」, 填写「名称」栏位后,在「命令列」填上:
trans -e google -s auto -t zh-CN -show-original y -show-original-phonetics n -show-translation y -no-ansi -show-translation-phonetics n -show-prompt-message n -show-languages y -show-original-dictionary n -show-dictionary n -show-alternatives n "%GDWORD%"
任何语言auto自动翻译成简体中文
trans -e google -s zh-CN -t en -show-original y -show-original-phonetics n -show-translation y -no-ansi -show-translation-phonetics n -show-prompt-message n -show-languages y -show-original-dictionary n -show-dictionary n -show-alternatives n "%GDWORD%"
中译英 - 记得关闭其他已启用字典
网友评论