2 Star 3 Fork 0

开源应用/CuteTranslation

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
guide.txt 5.41 KB
一键复制 编辑 原始数据 按行查看 历史
moriv4 提交于 2021-09-11 04:16 +08:00 . remove previous git log
CuteTranslation v0.4.3 用户手册
项目主页:https://github.com/jiangzc/CuteTranslation
安装
推荐下载deb包后用命令安装。安装失败、程序报警、出错请跳转到[故障排查](#jump)。
sudo apt-get install ./CuteTranslation_v0.1.0_amd64.deb
**基本功能**
CuteTranslation 是Linux系统上基于X11的一款取词翻译软件。打开软件,系统托盘栏会出现一个圆形图标。当你用鼠标选中一段文字后,鼠标旁边会出现一个小方块(FloatButton),点击后触发翻译功能。双击、右键托盘图标可以查看更多功能。
测试文本:
>Players around the world join forces on one of two teams of four in the Great Ghoul Duel. Exploring one of several spooky maps, players must collect as many wandering spirit flames as they can in two minutes and return them to their homebase. After time’s up, the team that has collected the most spirit flames wins. But beware! - opponents can intercept spirits from one another as they bring them back to homebase.
>パン業界では、品切れを嫌って多めに作るために売れ残りの廃棄が常態化しており、ロス率は平均3~5%といわれている。「食べ物を大事にしなさい」としつけられた前田さんは、「売れ残りや廃棄の問題に目をつぶったままで店を続けられない」。智美さんと新しい業態を考え、昨年6月にいったん休業。2カ月ほど後に新しい店として再出発した。
**截图翻译**
按下快捷键 alt+q 或 右键托盘栏图标选择“截图翻译” 触发截图翻译。这时鼠标会变成十字星,选中要翻译的区域即可。
**悬浮搜索框**
按下快捷键 alt+w 或 右键托盘栏图标选择“文字翻译” 打开悬浮搜索框。输入文字后按下回车键触发翻译。按下 alt+w 或 右侧隐藏的按钮关闭悬浮搜索框。
**OCR文字识别**
按下快捷键 alt+e 或 右键托盘栏图标选择“文字识别” 触发文字识别。这时鼠标会变成十字星,选中要识别的区域即可。
**取词模式**
有三种取词模式可供选择:全局、自定义、禁用。
自定义指的是只在某些窗口上启动取词功能,或只在某些窗口上禁用取词功能。
选中一段文字,右键鼠标旁边的小方块(FloatButton),点击“不要在XXX中显示”。被禁止取词的软件可以在配置窗口中看到。配置窗口中右键列表可移除选项。
**主题**
软件提供了两套不同颜色的主题:浅色和深色,与deepin v20的配色一致。在配置中修改。
**翻译界面附加功能**
翻译界面右上角有一排按钮:换行处理、刷新、固定、关闭等。
如果翻译结果为"time out",说明网络请求超时。点击翻译界面右上角的刷新按钮可重新翻译。
鼠标点击其他的地方,翻译界面会自动隐藏。点击翻译界面右上角的固定按钮可固定翻译界面。关闭被固定的界面需要点击右上角的关闭按钮。
换行处理可以忽略文本中的换行符。在某些软件如PDF阅读器中,如果直接选中以下段落翻译,效果会很差。这时点击翻译界面的N按钮,重新选中段落翻译,可以优化翻译效果。
The Python installers for the Windows platform usually
include the entire standard library and often also include
many additional components. For Unix-like operating systems
Python is normally provided as a collection of packages,
so it may be necessary to use the packaging tools provided
with the operating system to obtain some or all of the optional
components.
**配置文件**
CuteTranslation提供了多种多样的配置选项,例如界面大小、快捷键、缩放比例等等。配置文件位于 ~/.local/share/CuteTranslation/config.ini
术语表
```
ConfigTool 配置工具
Picker 取词功能
ConfigWindow 配置界面
MainWindow 翻译界面
FloatButton 悬浮按钮
SystemTrayIcon 托盘栏
ShortCut 快捷键
SearchBar 悬浮搜索框
```
CuteTranslation 默认配置 [config.ini](https://github.com/jiangzc/CuteTranslation/blob/master/template/config.ini)
因为每个人显示器大小和缩放比例不同,所以要把窗口大小调到合适的值。例如15.6寸笔记本电脑用以下配置比较合适。24寸左右屏幕推荐WebPageZoomFactor=1.0,增加 MainWindowWidth。
```ini
[MainWindow]
MainWindowHeight=400
MainWindowWidth=500
WebPageZoomFactor=1.2
```
您可以根据自己的喜好设置截图翻译和悬浮搜索框的快捷键
```ini
[ShortCut]
ScreenShot=alt+q
SearchBar=alt+w
```
设置网络请求最大延时
```ini
[Translate]
OCRTimeout=2.0
TextTimeout=3.0
```
故障排查
1. 配置文件版本v0.0.0,与程序版本不符合
检查 ~/.local/share/CuteTranslation/config.ini 是否缺失或内容不完整。如果是,则删除config.ini后重启程序。
2. 文件缺失
分析日志 ~/.local/share/CuteTranslation/log.txt 考虑重装软件
3. 缺少nodejs gnome-screenshot依赖
sudo apt-get install nodejs gnome-screenshot
4. 缺少其他依赖
Depends: nodejs, libqt5x11extras5, libqt5x11extras5, libqt5network5,
libqt5core5a, libqt5gui5, gnome-screenshot
5. 截图翻译出错
分析日志 ~/.local/share/CuteTranslation/log.txt ,检查 ~/.local/share/CuteTranslation/token 是否正确
6. 文字翻译出错
分析日志 ~/.local/share/CuteTranslation/log.txt
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/deepin-opensource/CuteTranslation.git
git@gitee.com:deepin-opensource/CuteTranslation.git
deepin-opensource
CuteTranslation
CuteTranslation
master

搜索帮助