Giter VIP home page Giter VIP logo

utools-translate's Introduction

uTools-Translate

uTools 插件 - 翻译

自 v3.0.0 起,将插件《词典》和《Translate》合并为《翻译》

Translate

Screenshots

  • 翻译句子,列表模式

    translateSentence

  • 百度 API

    translateBaidu

  • 结果过长自动展开

    translateExpand

  • 设置页面

    translateSetting

  • 语言设置

    translateYouDao

  • 有道 WAP API,页面模式

    translatePage

  • 变量模式

    translateVariable

  • 列表模式,暗黑模式

    translateListDark

  • 页面模式,暗黑模式

    translatePageDark

  • 设置页面,暗黑模式

    translateSettingDark

Features

  1. 支持中英文等 214 种语言互译
  2. 支持切换翻译 API
  3. 支持单词、句子及段落翻译
  4. 支持查询音标
  5. 支持多个朗读引擎
  6. 支持朗读源文本及翻译结果
  7. 支持快捷键朗读(Windows:英式 Alt+S,美式 Alt+D | Mac OS:英式 Ctrl+S,美式 Ctrl+D
  8. 支持自动复制翻译结果
  9. 支持自动翻译剪贴板文本
  10. 支持单词变形
  11. 支持自动即时查询
  12. 支持源语言和目标语言设置
  13. 支持按变量格式化内容
  14. 支持翻译变量
  15. 支持代理设置
  16. 支持暗黑模式
  17. 支持LOGO显示翻译引擎
  18. 支持快捷键上下移动(向下:Down / Ctrl+N / Ctrl+J,向上:Up / Ctrl+P / Ctrl+K

API

  1. 有道词典
    • http://fanyi.youdao.com
    • 官方提示此版本 API 已经停用,但经测试现还能使用。
    • 不过调用频率不能太高,否则容易暂时被封禁。
  2. 有道翻译
    • https://m.youdao.com
    • 属于移动端网页 API,精准度不是非常高。
    • 为页面模式,翻译结果较多时显示效果更好。
  3. 有道翻译免费版
  4. 谷歌
  5. 谷歌
    • https://translate.google.com
    • 翻译内容较少,仅有基本翻译。
    • 若不能直接访问谷歌,可修改 hosts,或设置代理。
  6. 必应
  7. 爱词霸
  8. CNKI
  9. DeepL
  10. DeepL X
  11. DeepL API
  12. 有道翻译
    • http://openapi.youdao.com/api
    • 支持 112 种语言互译,其中自动可以识别中文、英文、日文、韩文、法文、西班牙文、葡萄牙文、俄文、越南文、德文、阿拉伯文、印尼文、意大利文
    • 需要到有道智云申请获取应用 ID 和应用密钥。
  13. 百度翻译
  14. 阿里翻译
    • https://mt.cn-hangzhou.aliyuncs.com/api/translate/web/general
    • 翻译内容较少,仅有基本翻译。
    • 支持 214 种语言互译。
      • 除繁体中文、蒙语、粤语外,其他 212 种语言,可支持任意两种语言之间互译。
      • 繁体中文、蒙语、粤语仅支持与中文之间的互译。
    • 需要到阿里云申请获取 Access Key ID 和 Secret Access Key。
  15. 腾讯翻译
  16. 火山翻译
  17. 华为翻译
  18. 彩云小译
  19. 小牛翻译

Reference

Contributors

License

Copyright (c) 2021-present, HaleShaw.

The project is licensed under the GNU General Public License v3.0.

utools-translate's People

Contributors

haleshaw avatar handsomewalker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

utools-translate's Issues

貌似utils.js里面的post函数有bug

如题
image
Fetch API在返回除200之外的其他状态时,不会抛出异常,而是仍然走then逻辑,于是碰到resolve(res.json())发生json解析失败,导致错误信息无法正常显示。

可作如下修改
image
并在所有用到post的地方都套上try catch保证捕获

一些小建议

  1. 源语言与目标语言的选择逻辑较简单, 容易误判, 目前是只要有中文字符就会中翻英. 例子: happy everyday, high 起来
  2. 不展示源语言与目标语言, 缺乏展示与手动变更功能
  3. 长本文列表展示不全, 似乎与快速翻译的原则不符, 建议可以加配置项: 是否自动分行展开全文, 并且默认展开

功能增强

添加正则匹配英文而不是必须使用(tr)关键字来触发

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.