Skip to content

Commit

Permalink
docs: update README_EN grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry23011 committed Oct 14, 2023
1 parent 7c301a6 commit 57e5523
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
24 changes: 12 additions & 12 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

## Easydict

`Easydict` is a concise and easy-to-use translation dictionary macOS App that allows you to easily and elegantly look up words or translate text. Easydict is ready to use out of the box, can automatically recognize the language of the input text, supports input translate, select translate, and OCR screenshot translate, and can query multiple translation services result at the same time. Currently, it supports [Youdao Dictionary](https://www.youdao.com/), [**🍎Apple System Dictionary**](./docs/How-to-use-macOS-system-dictionary-in-Easydict-en.md), [**🍎macOS System Translation**](./docs/How-to-use-macOS-system-dictionary-in-Easydict-zh.md), [OpenAI(ChatGPT)](https://chat.openai.com/), [DeepL](https://www.deepl.com/translator), [Google](https://translate.google.com/), [Bing Translate](https://www.bing.com/translator), [Baidu](https://fanyi.baidu.com/), and [Volcano Translation](https://translate.volcengine.com/translate).
`Easydict` is a concise and easy-to-use translation dictionary macOS App that allows you to easily and elegantly look up words or translate text. Easydict is ready to use out of the box, can automatically recognize the language of the input text, supports input translate, select translate, and OCR screenshot translate, and can query multiple translation services results at the same time. Currently, it supports [Youdao Dictionary](https://www.youdao.com/), [**🍎Apple System Dictionary**](./docs/How-to-use-macOS-system-dictionary-in-Easydict-en.md), [**🍎macOS System Translation**](./docs/How-to-use-macOS-system-dictionary-in-Easydict-zh.md), [OpenAI(ChatGPT)](https://chat.openai.com/), [DeepL](https://www.deepl.com/translator), [Google](https://translate.google.com/), [Bing Translate](https://www.bing.com/translator), [Baidu](https://fanyi.baidu.com/), and [Volcano Translation](https://translate.volcengine.com/translate).

![Log](https://raw.githubusercontent.com/tisfeng/ImageBed/main/uPic/Log-1688378715.png)

Expand Down Expand Up @@ -316,14 +316,14 @@ easydict://writeKeyValue?EZOpenAIAPIKey=sk-xxx
```
<bar>

Lookup for APIKey (similar to other keys), if the query succeeded, the result will be written to the clipboard.
Lookup for APIKey (similar to other keys), if the query succeeds, the result will be written to the clipboard.
```
easydict://readValueOfKey?EZOpenAIAPIKey
```

#### Query Mode

Currently, OpenAI translation supports three query modes: word lookup, sentence translations, and long-text translation. They are all enabled by default, while words and sentences can be disabled.
Currently, OpenAI translation supports three query modes: word lookup, sentence translation, and long-text translation. They are all enabled by default, while words and sentences can be disabled.

<table>
<td> <img src="https://raw.githubusercontent.com/tisfeng/ImageBed/main/uPic/2KIWfp-1695612945.png">
Expand All @@ -344,7 +344,7 @@ easydict://writeKeyValue?EZOpenAIDictionaryKey=0
// Disable sentence analysis
easydict://writeKeyValue?EZOpenAISentenceKey=0
```
Quick tip: If you only want to exclude occasional sentence analysis without turning off the Sentence mode, simply append a tilde (~) after `[Sentence]`. This will convert it into the Translation mode.
A quick tip: If you only want to exclude occasional sentence analysis without turning off the Sentence mode, simply append a tilde (~) after `[Sentence]`. This will convert it into the Translation mode.

<img width="475" alt="image" src="https://github.com/tisfeng/Easydict/assets/25194972/b8c2f0e3-a263-42fb-9cb0-efc68b8201c3">

Expand All @@ -354,7 +354,7 @@ Quick tip: If you only want to exclude occasional sentence analysis without turn
Support custom domains and models

```
// xxx is the hostthe default one is api.openai.com
// xxx is the host, the default one is api.openai.com
easydict://writeKeyValue?EZOpenAIDomainKey=xxx
// xxx is the complete address of the request; for example, https://api.ohmygpt.com/azure/v1/chat/completions
Expand Down Expand Up @@ -406,13 +406,13 @@ easydict://writeKeyValue?EZDeepLTranslationAPIKey=2

At present, Bing Translator uses a web interface. When encountering a 429 error due to triggering rate limits, you can extend the usage by manually setting request cookies, aside from switching proxies. The exact duration of the time extension is currently unclear.

The specific steps are, use the browser to log in [Bing Translator](https://www.bing.com/translator), then get the cookie in the console by running the following command.
The specific steps are, to use the browser to log in [Bing Translator](https://www.bing.com/translator), then get the cookie in the console by running the following command.

```js
cookieStore.get("MUID").then(result => console.log(encodeURIComponent("MUID=" +result.value)));
```

Finally, use command to write the cookie in Easydict
Finally, use the command to write the cookie in Easydict

```
// xxx is the obtained cookie
Expand All @@ -421,7 +421,7 @@ easydict://writeKeyValue?EZBingCookieKey=xxx

## Smart query mode

Currently, there are two main types of lookup services: vocabularies lookup (e.g., Apple Dictionary) and translating text (e.g., DeepL), and there are also some services (e.g., Yudao and Google) that support both words lookup and translating text.
Currently, there are two main types of lookup services: vocabulary lookup (e.g., Apple Dictionary) and translating text (e.g., DeepL), and there are also some services (e.g., Yudao and Google) that support both vocabulary lookup and translating text.

```objc
typedef NS_OPTIONS(NSUInteger, EZQueryTextType) {
Expand All @@ -444,7 +444,7 @@ By default, all translation services support vocabularies lookup (vocabularies a
easydict://writeKeyValue?Google-IntelligentQueryTextType=5
```
Similarly, for some services that support looking up vocabularies and translating text at the same time, such as Youdao Dictionary, you can set its query mode to look up only vocabularies by setting the type to `dictionary`.
Similarly, for some services that support looking up vocabulary and translating text at the same time, such as Youdao Dictionary, you can set its query mode to look up only vocabulary by setting the type to `dictionary`.
```
easydict://writeKeyValue?Youdao-IntelligentQueryTextType=2
Expand All @@ -455,9 +455,9 @@ By default, only [Mini Window] is enabled for Smart Query Mode, users can also e
```
easydict://writeKeyValue?IntelligentQueryMode-window2=1
```
window1 represents mini window, while window2 represents hover window, 0 represents disabled while 1 represents enabled.
window1 represents the mini window, while window2 represents hover window, 0 represents disabled, while 1 represents enabled.
> Attention: Smart query mode only indicates whether this query service is enabled or not, and the user can manually click on the arrow to the right in the service view to expand the query at any time.
> Attention: Smart query mode only indicates whether this query service is enabled or not, and the user can manually click on the arrow to the right in the service view to expand the query at any time.
<table>
<td> <img src="https://raw.githubusercontent.com/tisfeng/ImageBed/main/uPic/image-20231001112741097-1696130861.png">
Expand All @@ -468,7 +468,7 @@ window1 represents mini window, while window2 represents hover window, 0 represe
Easydict supports fast lookup for URL scheme: `easydict://xxx`, such as easydict://good.
If the query content xxx contains special characters, URL encode is needed, such as easydict://good%2Fgirl
If the query content xxx contains special characters, URL encoding is needed, such as easydict://good%2Fgirl
## Use with PopClip
Expand Down
14 changes: 7 additions & 7 deletions docs/How-to-use-macOS-system-dictionary-in-Easydict-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Furthermore, Apple Dictionary also supports custom import dictionaries. This mea

### Adding third-party dictionaries

> ⚠️ To alleviate concerns related to copyright, acquire your own paperback copy or app.
> ⚠️ To alleviate concerns related to copyright, acquire your paperback copy or app.
The easiest way for adding a dictionary to macOS is to find a converted .dictionary file, drag it into the Dictionary folder of Apple Dictionary, and then restart Dictionary.app to ensure the new dictionary appears in the Settings.
The easiest way to add a dictionary to macOS is to find a converted .dictionary file, drag it into the Dictionary folder of Apple Dictionary, and then restart the Dicionary.app to ensure the new dictionary appears in the Settings.

Attention: Each time a new dictionary is added, Easydict needs to be restarted to see the changes in effect. Also, modifying the dictionary application settings may cause Easydict to crash; this is an expected behaviour.

Expand Down Expand Up @@ -83,9 +83,9 @@ I can't remember the source of this dictionary, but the point is that the css of

### How to make a .dictionary dictionary

> Attention: This part of the doc is aimed at advanced users, who need a bit of programming knowledge and loves to spend time on this.
> Attention: This part of the doc is aimed at advanced users, who need a bit of programming knowledge and love to spend time on this.
Below is an introduction on how to use the open-source project [pyglossary](https://github.com/ilius/pyglossary) to convert Mdict dictionaries into .dictionary files. This doc is based on [pyglossary apple](https://github.com/ilius/pyglossary/blob/master/doc/apple.md).
Below is an introduction to how to use the open-source project [pyglossary](https://github.com/ilius/pyglossary) to convert Mdict dictionaries into .dictionary files. This doc is based on [pyglossary apple](https://github.com/ilius/pyglossary/blob/master/doc/apple.md).


### Preparations
Expand All @@ -104,7 +104,7 @@ sudo pip3 install lxml beautifulsoup4 html5lib

4. Download [pyglossary](https://github.com/ilius/pyglossary)

Please move the downloaded pyglossary library to a fixed directory, you will need it everytime you convert a dictionary.
Please move the downloaded pyglossary library to a fixed directory, you will need it every time you convert a dictionary.

Assuming that pyglossary-master is located at `~/Downloads/pyglossary-master`

Expand All @@ -115,7 +115,7 @@ Mdict dictionary resources are available from the following website:

Now let's begin.

### Steps of convertion
### Steps of conversion

Suppose the dictionary file in Mdict format is located in `~/Downloads/oald8/oald8.mdx`, and the picture and speech file `oald8.mdd` are also in the same folder.

Expand All @@ -135,7 +135,7 @@ If all goes well, you will end up with an `objects` file in that directory, with

Note that the dictionary generated above has a very simple interface, and usually Mdicts circulating on the web will come with a copy of beautified css, such as `oald8.css`. Since pyglossary does not handle css automatically, we need to do it manually by copying the contents of `oald8.css` and appending it to the `DefaultStyle.css` inside the `oald8-apple.dictionary` file. If you want to customize the css, you also modify this file.

The name of the dictionary can be changed via `Info.plist`, where `Bundle name` is the name of the dictionary to be displayed in the application interface, and `Bundle display name` is the name of the dictionary to be displayed in the settings page. For convenience, it is recommended that both be set to the same value.
The name of the dictionary can be changed via `Info.plist`, where the `Bundle name` is the name of the dictionary to be displayed in the application interface, and the `Bundle display name` is the name of the dictionary to be displayed in the settings page. For convenience, it is recommended that both be set to the same value.

END.

Expand Down

0 comments on commit 57e5523

Please sign in to comment.