Skip to content

Commit

Permalink
merge from copytranslator
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottzheng committed Jan 13, 2019
1 parent 80b6d1c commit 6f647cf
Show file tree
Hide file tree
Showing 23 changed files with 625 additions and 642 deletions.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/-------.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: 请求增加新特性
about: 请求增加新特性,请务必使用该模板,节约大家时间
title: "[Features]"
labels: enhancement
assignees: elliottzheng

---

前言:
请务必先查看项目的[project](https://github.com/elliottzheng/CopyTranslator/projects),这里列出了CopyTranslator之后将会实现的特性,**您想要的特性有很大的可能已经被实现/已经在计划中**,CopyTranslator经过多次迭代,功能越来越丰富(~~复杂~~),不阅读完整使用指南无法完全发挥其功能,如果您阅读完Project,确定该特性未被实现/未计划实现。非常欢迎您继续下面的工作提出增加新特性的请求。

**您的功能请求是否与问题有关?请描述一下.**
简明扼要地描述了问题所在。

**描述您想要的解决方案**
简明扼要地描述您想要发生的事情。

**描述您考虑过的替代方案**
对您考虑的任何替代解决方案或功能的简明扼要描述。

**附加背景**
在此处添加有关功能请求的任何其他上下文或屏幕截图。
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/------.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: 反馈一个问题
about: 我可求求大家一定要使用这个模板啊,节约大家的时间
title: ''
labels: ''
assignees: ''

---

**描述问题**
(反馈前请先查看wiki中的使用指南,CopyTranslator经过多次迭代,功能越来越丰富(~~复杂~~),不阅读完整使用指南无法完全发挥其功能,查看使用指南能够解决您90%的疑惑,如果看完使用指南,疑问仍然存在,请到下载页面看看有没有最新预览版,并下载试用,如果最新版的问题解决了,那就不用再反馈问题了)

**系统环境(请填写以下信息):**
- CopyTranslator版本:如v0.0.6.1 x86 版
- 出现问题时的模式:MainMode/ FocusMode或者说对照模式或专注模式
- 操作系统:如win10 64位/win 7 32位
- 阅读器:如 chrome浏览器/福昕阅读器,最好附上下载地址
- 出现问题的文档:附上文档文件
- 出现问题的段落:第五段,第二句话

**如何复现这个问题**
重现行为的步骤:
1.
2.
3.
4.

**问题出现时,当时的CopyTranslator的设置截图**

请截取主模式窗口


**是只在这个阅读器上不能使用,还是在浏览器及其他的阅读器也不可以使用?**


**之前的版本有出现这种问题吗?如果没有出现的话,请提供一个已知无该bug的版本号**
905 changes: 285 additions & 620 deletions LICENSE

Large diffs are not rendered by default.

166 changes: 144 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,144 @@
# Copytranslator-Phoenix

## Project setup
```
npm install
pip install -r requirements.txt
```

## Compiles python script
```
npm run python:build
```

### Compiles and hot-reloads for development
```
npm run electron:serve
```

### Compiles and minifies for production
```
npm run electron:build
```
![logo](https://user-images.githubusercontent.com/22427645/50773452-d738dd80-12cb-11e9-9b7c-45e5d7f74c8a.png)

# CopyTranslator

[中文 Chinese](README_zh.md)

[![](https://img.shields.io/github/stars/elliottzheng/copytranslator.svg)](https://github.com/elliottzheng/CopyTranslator/stargazers)
[![](https://img.shields.io/github/release/elliottzheng/copytranslator.svg)](https://github.com/elliottzheng/CopyTranslator/releases)
[![](https://img.shields.io/gitter/room/elliottzheng/copytranslator.svg)](https://gitter.im/CopyTranslator/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link)
[![](https://img.shields.io/github/downloads/elliottzheng/copytranslator/total.svg)](https://github.com/elliottzheng/CopyTranslator/wiki/Downloads-%E4%B8%8B%E8%BD%BD%E4%B8%8E%E5%AE%89%E8%A3%85)
[![](https://img.shields.io/badge/Project%20Phoenix%20-ongoing-orange.svg)](https://github.com/elliottzheng/CopyTranslator-Phoenix)
[![](https://img.shields.io/github/license/elliottzheng/copytranslator.svg)](./LICENSE)


**Foreign language assisted reading and translation solution**

**Please update to ![Download](https://api.bintray.com/packages/elliottzheng/CopyTranslator/CopyTranslator/images/download.svg)as soon as possible. This is a new version that you have never experienced before. It is also the only available version (all the previous version is invalid now). Trust me, you will fall in love with it within minutes.**

**If you found it helpful to you, no need to follow or fork, just give me a star and recommend it to your friends around you.**

(Online translation resources come from the Internet, copyright belongs to related websites, and this software is only for academic exchange.)

**This software is free and open source. If you find someone selling this software , please report it in the Issue.**

## Introduction

### Foreword

Researchers always have to read a lot of literature, and understanding the content of the literature has become the norm in scientific research life. However, when we copy the PDF content and paste it into the webpage translation, there may be extra line breaks that lead to garbled translation, and the translation does not match the Chinese reading habits. The translation results are very poor and you need to manually delete the line break, and `CopyTranslator` can help us solve this problem quickly and perfectly.

Just open the `CopyTranslator` and copy the PDF text to clipboard, `CopyTranslator` will watch the clipboard changes, then it will process the clipboard contents (such as removing extra line breaks, etc.) and display the translation results. The translation effect is greatly improved compared to the direct copy and paste to the web version of the translation, and the time required for translation is greatly reduced. With the powerful Google translation API, the translation quality is guaranteed. There are also a wealth of options you can set, such as automatically copy translation results to the clipboard, [Incremental Copy](#Incremental Copy), [Smart Translation](#Smart Translation), etc., it effectively improve people's reading and translation efficiency of foreign literature.

**After several iterations, `CopyTranslator` has became more and more powerful as well as user-friendly. It is recommended to read the full usage guide [wiki](https://github.com/elliottzheng/CopyTranslator/wiki) to make best use of it**.

### Core usage

**Open a webpage/PDF, select the text to be translated, copy the text to the clipboard, `CopyTranslator` will listens to the clipboard change, and process the clipboard content (such as removing extra line breaks, etc.), translate it, and display**. Just copy the text,`CopyTranslator` will immediately give the translation result, effectively improving your work efficiency.**

![](https://s1.ax1x.com/2018/11/30/FmrNFS.gif)

## Features

### Copy=Translate

**Greatly simplify the steps required for translation**, just copy the text to the clipboard, and wait to view the translation results in the next second, enjoy the WYSIWYG pleasure, and we also have the [Tap to Copy](#Tap to Copy) mechanism , making it easier for you to copy text.

### Solve the problem of PDF copy translation

`CopyTranslator` is specifically optimized for English and Chinese pdf line breaks and sentence endings, basically solving the problem caused by extra sentence breaks and line breaks. The following figure shows the translation results using `CopyTranslator`. It's obvious that the translation effect is greatly improved compared to directly copy and paste to the online translator. At the same time, with the powerful google translation API, the translation quality is guaranteed, and the translation.google.cn used is also faster to connect, no need to worry about network problems.

![](https://s1.ax1x.com/2018/09/13/iEiIRx.png)



### Multi segments Co-translation

More efficient, while keeping the original segment as much as possible.

![entoch](./screenshot/entoch.png)

### Tap to Copy

After turning on the `listen Clipboard` option, just select the text, and hover the mouse over the selected text to release the mouse over 0.3s. That is, **after long press and release, it can be copied.** This can prevent us from over moving the mouse (right click to choose Copy) or tired of pressing `Ctrl+C`.

![longpresscopy](/screenshot/longpresscopy.gif)

### Powerful Focus Mode

Unparalleled powerful focus mode, while it's just a simple text box, it can meet the needs of 90% of daily translation!

- **The translation is displayed in the `Focus mode` and `Contrast Mode` at the same time**.
- **The result of [Smart Dictionary](#Smart Dictionary) is only displayed in `Focus Mode`, colorful text helps you quickly distinguish between items**.
- **Drag text to focus mode box, you can get translation results directly**.
- **When the cursor is in the focus mode result box, `Ctrl+Enter` to translate the contents of the box, `Ctrl+B` to use Baidu to search the contents of the box, and `Ctrl+G` to use Google to search the contents of the box**.
- **The right-click menu of `Focus mode` can be used to set up almost all options as well as all the function**.

### Smart Translation

`CopyTranslator` will automatically recognize the copied text, **intelligently translate according to the set`source language` and `target language`**, for example, set `source language` to English,and the ` target language` to be Simplified Chinese. If you copy English, it will be translated into Chinese, and if you copy Chinese, it will be translated into English.

### Smart Dictionary

Sentences with words less than 3 will be view as phrase or word, you will see a more detailed explanations in `Focus Mode`. Check the `Smart Dict ` option to enable it. **Note: It is limited to the languages `Youdao` supported , but you don't need and cannot manually choose language**.Based on API provided by [Youdao](https://github.com/longcw/youdao)

![1537871607106](assets/1537871607106.png)

### Incremental Copy

Append the copied text to the source other than replace it, especially useful when the paragraph is separated in different page. Check the `Incremental Copy ` option to enable it.

### Dual Mode Free Switching to Cope with Different Scenes

- The `Contrast Mode` is in accordance with the user's previous usage habits, and the original text is displayed against the translation.
- `Focus mode` only provides a translation window for you to follow the translation. When using the focus mode, please check the `Stay on top` and `Listen Clipboard`. Check the `Auto copy` if necessary,

### Other features

- Support for rich languages, `CopyTranslator` support whatever Google translation supports.
- Many automated customization options are available, such as `Auto Copy`, `Config Memorization`, `Auto Hide`, `Auto Display`.
- Support global hotkeys and convenient shortcut operations.
- International, interface language can choose from English or Simplified Chinese.
- It occupies less memory and has only a few ten megabytes of resident memory.
- There will be more new features in`CopyTranslator` , so stay tuned.

Please refer to the [User Manual](https://github.com/elliottzheng/CopyTranslator/wiki/Usage-%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97) to know more about `CopyTranslator`

## User Manual and download and installation methods

Please refer to the project [WIKI](https://github.com/elliottzheng/CopyTranslator/wiki) .

**After several iterations, `CopyTranslator` has became more and more powerful as well as user-friendly. It is recommended to read the full project [wiki](https://github.com/elliottzheng/CopyTranslator/wiki) to make best use of it**.

## Reprint statement

This software is free open source software, the developer is [Elliott Zheng](https://github.com/elliottzheng), STAR and PR are welcomed. **Please attach the project address when forwarding, and the reprinting `CopyTranslator`without project address/software official website is infringement.**

## Related Links

- [Software official website](https://hypercube.top/copytranslator/)
- [Project homepage on Github ](https://github.com/elliottzheng/CopyTranslator)
- [Project homepage on Gitee](https://gitee.com/ylzheng/CopyTranslator)
- [Offical Blogs](https://www.cnblogs.com/elliottzheng/p/9060159.html)
- [Official Email](mailto:copytranslator@hypercube.top)

## Acknowledgements

`CopyTranslator`'s rebirth depends on the contributions of the following people

### UI and UX Design

Designer: [Mārtiņš Zemlickis](http://mzemlickis.lv/)

### Libraries

- [Electron](https://electronjs.org)
- [Vue](http://vuejs.org)
- [Vuetify](https://vuetifyjs.com): to build user interface.
- [NODE_GOOGLE_TRANSLATE](https://github.com/shikar/NODE_GOOGLE_TRANSLATE): core translate engine.
- [iohook](https://github.com/wilix-team/iohook): For handling mouse and keyboard event
- [robotjs](http://robotjs.io/): For simulating keyboard input.

## License

The code is licensed under GNU GENERAL PUBLIC LICENSE 2.0. For more details, read the [LICENSE](./LICENSE) file.
Loading

0 comments on commit 6f647cf

Please sign in to comment.