Coder Social home page Coder Social logo

raffeyang / raycast-easydict Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tisfeng/raycast-easydict

0.0 0.0 0.0 101.14 MB

A Raycast Extension for looking up words or translating text in an easy way. Support 23 languages, support Linguee and Youdao dictionary, support DeepL, Google, Bing, Apple, Baidu, Tencent, Youdao and Caiyun translation.

Home Page: https://www.raycast.com/isfeng/easydict

License: MIT License

Shell 0.09% JavaScript 2.41% TypeScript 97.50%

raycast-easydict's Introduction

Easydict

Easily look up words or translate text.

๐Ÿ‡จ๐Ÿ‡ณ ๐Ÿ‡บ๐Ÿ‡ธ ๐Ÿ‡ฏ๐Ÿ‡ต ๐Ÿ‡ฐ๐Ÿ‡ท ๐Ÿ‡ซ๐Ÿ‡ท ๐Ÿ‡ช๐Ÿ‡ธ ๐Ÿ‡ต๐Ÿ‡น ๐Ÿ‡ฎ๐Ÿ‡น ๐Ÿ‡ท๐Ÿ‡บ ๐Ÿ‡ฉ๐Ÿ‡ช ๐Ÿ‡ธ๐Ÿ‡ฆ ๐Ÿ‡ธ๐Ÿ‡ช ๐Ÿ‡ณ๐Ÿ‡ฑ ๐Ÿ‡ท๐Ÿ‡ด ๐Ÿ‡น๐Ÿ‡ญ ๐Ÿ‡ธ๐Ÿ‡ฐ ๐Ÿ‡ญ๐Ÿ‡บ ๐Ÿ‡ฌ๐Ÿ‡ท ๐Ÿ‡ฉ๐Ÿ‡ฐ ๐Ÿ‡ซ๐Ÿ‡ฎ ๐Ÿ‡ต๐Ÿ‡ฑ ๐Ÿ‡จ๐Ÿ‡ฟ ๐Ÿ‡น๐Ÿ‡ท ๐Ÿ‡ฑ๐Ÿ‡น ๐Ÿ‡ฑ๐Ÿ‡ป ๐Ÿ‡บ๐Ÿ‡ฆ ๐Ÿ‡ง๐Ÿ‡ฌ ๐Ÿ‡ฎ๐Ÿ‡ฉ ๐Ÿ‡ฒ๐Ÿ‡พ ๐Ÿ‡ธ๐Ÿ‡ฎ ๐Ÿ‡ช๐Ÿ‡ช ๐Ÿ‡ป๐Ÿ‡ณ ๐Ÿ‡ฎ๐Ÿ‡ท ๐Ÿ‡ต๐Ÿ‡ฐ ๐Ÿ‡น๐Ÿ‡ฑ ๐Ÿ‡น๐Ÿ‡ฆ ๐Ÿ‡ฎ๐Ÿ‡ณ ๐Ÿ‡ต๐Ÿ‡ญ ๐Ÿ‡ซ๐Ÿ‡ฎ ๐Ÿ‡ฐ๐Ÿ‡ญ ๐Ÿ‡ฑ๐Ÿ‡ฆ ๐Ÿ‡ง๐Ÿ‡ณ ๐Ÿ‡ฒ๐Ÿ‡ฒ ๐Ÿ‡ณ๐Ÿ‡ด ๐Ÿ‡ท๐Ÿ‡ธ ๐Ÿ‡ญ๐Ÿ‡ท ๐Ÿ‡ฒ๐Ÿ‡ณ ๐Ÿ‡ฎ๐Ÿ‡ฑ

Easydict is an easy dictionary, for looking up words or translating text easily. Use it out of the box, automatically detect the input text language, and support Linguee and Youdao Dictionary, ๐ŸŽ MacOS system translation, DeepL, Google, Bing, Baidu, Tencent, Volcano, Youdao, and Caiyun translation.

easydict-1

Features

  • Out of the box, easy to look up words or translate text.
  • Automatically detect the input language and automatically query the preferred language.
  • Provide word-rich query information, including basic translation, pronunciation, the types of exams that include the word, multiple parts of speech and explanations, forms and tenses, web translations, and web phrases.
  • Support automatic query selected text, enabled by default.
  • Support to open the Eudic Dictionary and quickly look up words, if installed on your Mac.
  • Support automatic playback of word pronunciation. Use Cmd + S to play the pronunciation of words manually.
  • Support Youdao Text to Speech(TTS).
  • Support to sort query results manually.
  • Support Arguments.
  • Support system proxy.
  • Support Linguee and Youdao Dictionary.
  • Support macOS system translation. (Please see How to use ๐ŸŽ macOS system translation in Easydict?)
  • Support DeepL, Google, Bing, Baidu, Tencent, Volcano, Youdao, and Caiyun translation.
  • Support 48+ languages.

Next:

  • Desktop Electron App.
  • Support to view query history.

If you like this extension, please give it a Star โญ๏ธ, thanks!


Arguments

arguments-1666060638

hello-1666060655

Youdao Modern Chinese Dict

xiaxi-1665674049

yi-1665582552

ai

่‰พ

ai-1665582690

Linguee Dictionary๏ผšEnglish <--> Chinese

easydict-3

image-20220822170315915

Linguee Dictionary๏ผšEnglish <--> French

easydict-3

image-20220822163332948

Show More Details๏ผˆShortcut Cmd + M๏ผ‰

showMore-1664440735

uk

Translation

easydict-4-1663604001

easydict-5-1663604086

easydict-6-1666538717

Installation

Easydict is an extension of Raycast, so you need to install Raycast first.

Raycast is a blazingly fast, totally extendable launcher. Similar to Alfred but it's completely free!

Install from Raycast Store

Manually Install

git clone https://github.com/tisfeng/Raycast-Easydict.git && cd Raycast-Easydict

npm install && npm run dev

Advanced

Actually, it works well without you having to do any extra work. The next are advanced documents for those who want to use Easydict better or understand how the extension works.

setting-1664441069

Supported Languages

Currently we support 48 languages: Chinese-Simplified, Chinese-Traditional, English, Japanese, Korean, French, Spanish, Portuguese, Italian, German, Russian, Arabic, Swedish, Romanian, Thai, Slovak, Dutch, Hungarian, Greek, Danish, Finnish, Polish, Czech, Turkish, Lithuanian, Latvian, Ukrainian, Bulgarian, Indonesian, Malay, Slovenian, Estonian, Vietnamese, Persian, Hindi, Telugu, Tamil, Urdu, Filipino, Khmer, Lao, Bengali, Burmese, Norwegian, Serbian, Croatian, Mongolian, Hebrew.

Language Detection

Currently, we support 5 language detection APIs, including Baidu, Tencent, Volcano, Apple and Bing. Apple language detection is a macOS feature, but you need to install a shortcut to use it.

Considering user privacy, only Bing language detection is enabled by default (no App Key is required, and no user personal data is recorded!) Other language detection APIs are enabled only when the corresponding translation feature is enabled. Note, however, that in general, the more language detection APIs are enabled, the more accurate the text will be and the faster the response time will be.

Details of the languages supported by each language detection service are as follows:

Languages Bing ๐ŸŽ Apple Baidu Volcano Tencent
Chinese (Simplified) โœ… โœ… โœ… โœ… โœ…
Chinese (Traditional) โœ… โŒ โŒ โœ… โŒ
English โœ… โœ… โœ… โœ… โœ…
Japanese โœ… โœ… โœ… โœ… โœ…
Korean โœ… โœ… โœ… โœ… โœ…
French โœ… โœ… โœ… โœ… โœ…
Spanish โœ… โœ… โœ… โœ… โœ…
Portuguese โœ… โœ… โœ… โœ… โœ…
Italian โœ… โœ… โœ… โœ… โœ…
German โœ… โœ… โœ… โœ… โœ…
Russian โœ… โœ… โœ… โœ… โœ…
Arabic โœ… โœ… โœ… โœ… โŒ
Swedish โœ… โœ… โœ… โœ… โŒ
Romanian โœ… โœ… โœ… โœ… โŒ
Thai โœ… โœ… โœ… โœ… โœ…
Slovak โœ… โœ… โœ… โœ… โŒ
Dutch โœ… โœ… โœ… โœ… โŒ
Hungarian โœ… โœ… โœ… โœ… โŒ
Greek โœ… โœ… โœ… โœ… โŒ
Danish โœ… โœ… โœ… โœ… โŒ
Finnish โœ… โœ… โœ… โœ… โŒ
Polish โœ… โœ… โœ… โœ… โŒ
Czech โœ… โœ… โœ… โœ… โŒ
Turkish โœ… โœ… โœ… โœ… โœ…
Lithuanian โœ… โœ… โœ… โœ… โŒ
Latvian โœ… โœ… โœ… โœ… โŒ
Ukrainian โœ… โœ… โœ… โœ… โŒ
Bulgarian โœ… โœ… โœ… โœ… โŒ
Indonesian โœ… โœ… โœ… โœ… โœ…
Malay โœ… โœ… โœ… โœ… โœ…
Slovenian โœ… โœ… โœ… โœ… โŒ
Estonian โœ… โœ… โœ… โœ… โŒ
Vietnamese โœ… โœ… โœ… โœ… โœ…
Persian โœ… โœ… โœ… โœ… โŒ
Hindi โœ… โœ… โœ… โœ… โŒ
Telugu โœ… โœ… โœ… โœ… โŒ
Tamil โœ… โœ… โœ… โœ… โŒ
Urdu โœ… โœ… โœ… โœ… โŒ
Filipino โœ… โœ… โœ… โœ… โŒ
Khmer โœ… โœ… โœ… โœ… โŒ
Lao โœ… โœ… โœ… โœ… โŒ
Bengali โœ… โœ… โœ… โœ… โŒ
Burmese โœ… โœ… โœ… โœ… โŒ
Georgian โœ… โœ… โœ… โœ… โŒ
Serbian โœ… โœ… โœ… โœ… โŒ
Croatian โœ… โœ… โœ… โœ… โŒ
Mongolian โœ… โœ… โœ… โœ… โŒ
Hebrew โœ… โœ… โœ… โœ… โŒ

Dictionary

Youdao Dictionary

Support 5 langauges, (Chinese), English, French, Japanese, Korean.

Linguee Dictionary

Support 19 langauges, (Chinese, Japanese, Russian), English, French, Spanish, Portuguese, Italian, German, Swedish, Romanian, Slovak, Dutch, Hungarian, Greek, Danish, Finnish, Polish, Czech.

Translation

Currently, we support DeepL, Google, Bing, ๐ŸŽ Apple, Baidu, Tencent, Volcano, Youdao and Caiyun translation, total 9 translation services.

Google and DeepL translations will use the system proxy by default. (DeepL works without a proxy, but sometimes requests time out)

Note โš ๏ธ: Since the Chinese version of Google Translate is currently unavailable, you can only use the international version, so you need to use a proxy to use Google Translate.

Supported translation languages:

Languages Youdao DeepL Google Bing ๐ŸŽ Apple Baidu Volcano Tencent Caiyun
Chinese (Simplified) โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ…
Chinese (Traditional) โœ… โš ๏ธ โœ… โœ… โš ๏ธ โœ… โœ… โœ… โš ๏ธ
English โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ…
Japanese โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ…
Korean โœ… โŒ โœ… โœ… โœ… โœ… โœ… โœ… โŒ
French โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ… โŒ
Spanish โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ… โŒ
Portuguese โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ… โŒ
Italian โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ… โŒ
German โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ… โŒ
Russian โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ… โŒ
Arabic โœ… โŒ โœ… โœ… โœ… โœ… โœ… โœ… โŒ
Swedish โœ… โœ… โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Romanian โœ… โœ… โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Thai โœ… โŒ โœ… โœ… โœ… โœ… โœ… โœ… โŒ
Slovak โœ… โœ… โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Dutch โœ… โœ… โœ… โœ… โœ… โœ… โœ… โŒ โŒ
Hungarian โœ… โœ… โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Greek โœ… โœ… โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Danish โœ… โœ… โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Finnish โœ… โœ… โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Polish โœ… โœ… โœ… โœ… โœ… โœ… โœ… โŒ โŒ
Czech โœ… โœ… โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Turkish โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ… โŒ
Lithuanian โœ… โœ… โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Latvian โœ… โœ… โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Ukrainian โœ… โœ… โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Bulgarian โœ… โœ… โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Indonesian โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ… โŒ
Malay โœ… โŒ โœ… โœ… โŒ โœ… โœ… โœ… โŒ
Slovenian โœ… โœ… โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Estonian โœ… โœ… โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Vietnamese โœ… โŒ โœ… โœ… โœ… โœ… โœ… โœ… โŒ
Persian โœ… โŒ โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Hindi โœ… โŒ โœ… โœ… โŒ โœ… โœ… โœ… โŒ
Telugu โœ… โŒ โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Tamil โœ… โŒ โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Urdu โœ… โŒ โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Filipino โœ… โŒ โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Khmer โœ… โŒ โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Lao โœ… โŒ โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Bengali โœ… โŒ โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Burmese โœ… โŒ โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Norwegian โœ… โŒ โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Serbian โœ… โŒ โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Croatian โœ… โŒ โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Mongolian โœ… โŒ โœ… โœ… โŒ โœ… โœ… โŒ โŒ
Hebrew โœ… โŒ โœ… โœ… โŒ โœ… โœ… โŒ โŒ

Note: โš ๏ธ means the translation of source language to Traditional Chinese is not supported, such as DeepL. If you enter Traditional Chinese for translation, it will be treated as Simplified Chinese.

Preferred Languages

The default preferred languages are simplified Chinese and English. You can change them according to your preferences.

Preference language has two main functions:

First, it improves the accuracy of automatic detection of input text language.

Preference language will be given priority in order during automatic detection. This is because some words may represent multiple languages at the same time, and the automatic detection program cannot work as expected. In most cases, the automatic detection of input text is very useful, except for very few special cases. For example, the English word heel will be automatically recognized into Dutch by Youdao translation, and then the translation results are not what we expect. At this time, if your Easydict preferred language contains English, it will be recognized into English first and translated correctly.

Second, it is used to confirm your target translation language.

For example, if you input a sentence arbitrarily, it will be translated into the first preferred language. If the automatically recognized language is the same as your first preferred language, it will be automatically translated into the second preferred language.

Automatic Query Selected Text

Automatic query selected text of the frontmost application, this option is turned on by default.

In order to better match the automatic selected text feature, it is a good idea to set a hotkey for Easydict, such as Cmd + E, so that after selected the text, you can directly query words through the hotkey, which is very smooth and elegant.

Automatic Play Query Word Pronunciation

Automatically play the word audio after querying the word, turned on by default.

Note that when this option is started, the voice will be played only when the query is judged to be is_Word and in English, e.g. good, look for, etc. For other queries, the voice can be played with the shortcut Cmd + S.

The content of playing voice: English words are pronounced by the online Youdao dictionary first, and other words are pronounced by the TTS service of Youdao translation. For long text playback, use the say command.

Use Cmd + S to play the pronunciation of words manually.

beauty

Select Target Language

Specify the target language. This option is turned off by default.

By default, the extension will automatically select the preferred language as the target translation language. However, sometimes if you want to manually specify a language as the target language, you can turn on this option in the preferences and then you can temporarily select another target language in the action panel.

Sort Query Results Manually

You can sort query results by your preference, default is Youao Dictionary, Linguee Dictionary, DeepL, Google, Bing, Apple, Baidu, Tencent, Volcano, Youdao, Caiyun.

Name case are insensitive, use comma to separate. Example: youdao dictionary, linguee dictionary, deepl, google, bing, apple, baidu, tencent, volcano, youdao, caiyun. You can also specify a part of the sort, for example: youdao dictionary, apple, tencent๏ผŒthe actual sort is: youdao dictionary, apple, tencent, linguee dictionary, deepl, google, bing, baidu, volcano, youdao, caiyun.

Note: This sort is the overall sort, if a translation service is not enabled, the sort will be automatically ignored.

๐ŸŽ Apple Translate

Easydict support MacOS system translate, for more information, please see How to use macOS Apple System Translation in Easydict?

System Proxy

When this feature is turned on, Easydict will try to get the Mac system agent, and if successful, all subsequent network requests will be sent through the system agent. It is disabled by default. This feature is intended to counter IP blocking (some services such as Linguee have frequency restrictions on IPs), **but it can slow down the response time to requests, so please enable it only when needed. **

Note โš ๏ธ: Please don't turn on Use System Proxy while using the developer tools with MitM, otherwise some service requests will report certificate errors, for example: tisfeng#18 .

Use with PopClip

You need to install PopClip first, then add a shortcut key for Easydict, such as Cmd + E, then you can open Easydict quickly with PopClip!

Usage: Select the following code block, PopClip will show "Install Easydict", just click it.

  # popclip
  name: Easydict
  icon: search E
  key combo: command E

Ref: https://github.com/pilotmoon/PopClip-Extensions#extension-snippets-examples

Translation Services

For easy to use, we provide some built-in translation APIs appid and appkey, but these Services have request frequency limits. If many people use them at the same time, it is likely to slow down or even stop. Therefore, for a better use experience, you'd better apply for a dedicated appid and appkey, and then replace the built-in services on the Preferences page.

Don't worry, these translation services have free quotas. Generally speaking, personal use is enough.

The following application tutorial is from Bob. Follow the tutorial and you should be able to complete the application soon.

A2ECFJ-1664270926

Friendly Recommendation

Bob is a MacOS translation and OCR application.

image-20220620150946277

Thanks

This project is inspired by raycast-Parrot and Bob, and the first version is based on raycast-Parrot. Easydict has improved many UI displays, added more practical features, deleted some complex or inappropriate operations, and made a lot of optimization && improvements on the original project.

Finally, all those interested in this project are welcome to contribute to the project, issues and PRs are fine. The project is still in the rapid development stage, any practical suggestions or interesting ideas are OK. There is no guarantee that they will be accepted, but they will be definitely considered. In addition, if submitting a PR, it is recommended to open a issue to briefly describe the content of the PR to avoid conflicts between PR and the features I am currently developing. Thank you.

raycast-easydict's People

Contributors

tisfeng avatar raffeyang avatar dependabot[bot] avatar kxxoling avatar

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.