随着AI智能,尤其是chatGPT4的出现,传统的翻译工具,如Google Translate、DeepL等显得有点落伍,或者不那么cool了。

这几天看到OpenAI-Translator更新了,顺手体验了Mac桌面端,做的很用心,应该说比大部份的付费工具还好。

可以使用Google Gemini的免费key,在这里生成即可。

刚好最近(2024年3月)Groq出了免费的API,可以无门槛申请使用。注册进入api keys的页面,即可生成api key:

1、在OpenAI-Translator的github release页面下载dmg(Mac OS)或exe(windows)

2、下载完毕安装,打开,先去系统设置里面,把权限加上。系统设置,隐私与安全privacy & security,Accessibility中,选上权限:

3、按照步骤把刚groq生成的key放进去。默认服务商default service provider选groq,Groq API Key粘贴key进去,API Model任选,API URL如图中4,设置好切记点save保存。

4、如此即可使用groq翻译文本了。

5、接下来讲解如何利用宝玉老师的翻译。如果想了解背后逻辑的请直接点链接去看blog。

首先点击右上角三个点按钮打开动作管理器

6、点击创建

7、动作名字随便写,自己好识别的就行。图标随便选,自己顺眼的就行。

角色提示词:

You are a professional translator who is proficient in ${targetLang}. You have participated in the translation work of the ${targetLang} versions of The New York Times and The Economist, so you have an in-depth understanding of the translation of news and current affairs articles. I hope you can help me translate the following ${sourceLang} paragraphs into ${targetLang} in a style similar to the ${targetLang} version of the above magazine.

命令提示词:

Rule:
- Translate to accurately convey news facts and context.
- Reserve specific ${sourceLang} terms or names with spaces before and after them, for example: "中文文".
- Divide into two translations and print the results of each time:
1. Translate literally according to the news content without missing any information
2. Re-translate based on the results of the first literal translation, making the content more understandable and in line with ${targetLang} expression habits while adhering to the original meaning.

如下图所示:

8、翻译结果测试。1为直译,2为基于直译的润色。

9、快捷键设置

进入设置,快捷键。我用的是Mac,设置了 shift + command + T 快捷键。大家可以各自设置自己好记的快捷键。

10、每当需要用到翻译或者需要润色的时候,按住你设置的快捷键呼唤它出来,相当的方便呀。

以我在outlook收到的一封垃圾邮件为例,我先选中文字,然后按shift + command + T呼出

效果非常完美

11、如果你首先的需求不是翻译,而是润色,只需要在动作管理器里设置润色为首选即可:

发表回复