Git Product home page Git Product logo

translationplugin's Introduction

TranslationPlugin TranslationPlugin

Plugin Homepage Build Status License GitHub releases Version Downloads Financial Contributors on Open Collective

Translation plugin for IntelliJ based IDEs/Android Studio.

screenshots




Getting Started 开始使用 はじめに 시작하기


Microsoft Translator      Google Translate      OpenAI Translator      DeepL Translator      Youdao Translate      Baidu Translate      Alibaba Translate


Features

  • Multiple Translation Engines
    • Microsoft Translator
    • Google Translate
    • DeepL Translator
    • OpenAI Translator
    • Youdao Translate
    • Baidu Translate
    • Alibaba Translate
  • Multilingual translation
  • Document translation
  • Text-to-speech
  • Automatic word selection
  • Automatic word breaks
  • Word Book

Compatibility

  • Android Studio
  • AppCode
  • CLion
  • DataGrip
  • GoLand
  • HUAWEI DevEco Studio
  • IntelliJ IDEA Ultimate
  • IntelliJ IDEA Community
  • IntelliJ IDEA Educational
  • MPS
  • PhpStorm
  • PyCharm Professional
  • PyCharm Community
  • PyCharm Educational
  • Rider
  • RubyMine
  • WebStorm

Installation

Get from Marketplace
  • Installing from the plugin repository within the IDE:

    • Preferences(Settings) > Plugins > Marketplace > Search and find " Translation" > Install Plugin.
  • Installing manually:

    • Download the plugin package on GitHub Releases or in the JetBrains Plugin Repository.
    • Preferences(Settings) > Plugins > ⚙️ > Install plugin from disk... > Select the plugin package and install (no need to unzip)

Restart the IDE after installation.

Using The Plugin

  1. Sign up for a translation service (optional)

    Most translation services require user registration to access their services (such as OpenAI, DeepL, Youdao Translate, etc.). Therefore, you may need to create an account, obtain an Authentication Key, and then bind the Authentication Key within the plugin:Preferences(Settings) > Tools > Translation > General > Translation Engine > Configure...

  2. Begin translating

    Select a text or hover the mouse over the text > Right-click > Translate

    Or use shortcuts for translation, as detailed in Actions.

  3. Translate and replace

    Translate the target text and replace it. If the target language is English, the output has several formats: in camel case, with a word separator (when the output contains multiple words, the separator can be configured in the plugin configuration page: Translation Settings > Translate and replace > Separator) and in the original format.

    Instructions: Select a text or hover the mouse over the text > Right-click > Translate and Replace... (Or use shortcuts for translation, as detailed in Actions).

  4. Translate documents

    Preferences(Settings) > Tools > Translation > Other > Translate documents: When you check this option, the document will be automatically translated when you view it.

  5. Switch translation engines

    Click the translation engine icon in the status bar or use the shortcut Ctrl + Shift + S (Mac OS: Control + Meta + Y) to switch between translation engines quickly.

Actions

  • Show Translation Dialog...

    Open the translation dialog, which appears by default on the toolbar. Default shortcut:

    • Windows - Ctrl + Shift + O
    • Mac OS - Control + Meta + I
  • Translate

    Extract words and translate them. If you have already selected a text, extract the words from the portion of the text you'd like to translate. Otherwise, words are extracted automatically from the maximum range (this extraction can be configured in Settings). This action is displayed by default in the editor's right-click context menu. Default shortcut:

    • Windows - Ctrl + Shift + Y
    • Mac OS - Control + Meta + U
  • Translate(Inclusive)

    Extract words and translate them. Automatically extract and translate all words from a specific range, ignoring manually selected text. Default shortcut: (None)

  • Translate(Exclusive)

    Extract words and translate them. Automatically extract the nearest single word, ignoring manually selected text. Default shortcut: (None)

  • Translate and Replace...

    Translate and replace. The word extraction method works the same as when translating. Default shortcut:

    • Windows - Ctrl + Shift + X
    • Mac OS - Control + Meta + O
  • Translate Documentation

    Translate the contents of document comments. This option is displayed by default in the editor's context menu (right-click to access) and is available when the cursor is in the document's comment block. Default shortcut: (None)

  • Toggle Quick Documentation Translation

    Toggle between the original and translated texts in Quick Documentation. This option is available when the focus is on the Quick Documentation pop-up window or the documentation tool window. Default shortcut (same as translation shortcut):

    • Windows - Ctrl + Shift + Y
    • Mac OS - Control + Meta + U
  • Translate Text Component

    Translate selected text in some text components (e.g. Quick Docs, popup hints, input boxes...). This does not support automatic word extraction. Default shortcut (same as translation shortcut):

    • Windows - Ctrl + Shift + Y
    • Mac OS - Control + Meta + U
  • Choose Translation Engine

    Quickly toggle between translation engines. Default shortcut:

    • Windows - Ctrl + Shift + S
    • Mac OS - Control + Meta + Y
  • Word of the Day

    Display the 'Word of the Day' dialog box. Default shortcut: (None)

  • Other

    • Translation dialog shortcuts:

      • Display the list of source languages - Alt + S
      • Display the list of target languages - Alt + T
      • Switch between languages - Alt + Shift + S
      • Pin/unpin a window - Alt + P
      • Play TTS - Alt/Meta/Shift + Enter
      • Save to Word Book - Ctrl/Meta + F
      • Show history - Ctrl/Meta + H
      • Copy translation - Ctrl/Meta + Shift + C
      • Clear input - Ctrl/Meta + Shift + BackSpace/Delete
      • Expand more translations - Ctrl/Meta + Down
      • Hide more translations - Ctrl/Meta + UP
    • Translation balloon shortcuts:

      • Open dialog - Ctrl + Shift + Y / Control + Meta + U
    • Quick Documentation window shortcuts:

      • Enable/disable automatic translation - Ctrl + Shift + Y / Control
        • Meta + U

FAQ

If you have any questions, please ask here.

  1. What should I do if there is a network error or the network connection times out?

    A:

    • Check the network environment and make sure the network is running smoothly.
    • Check whether a proxy is preventing the plugin from accessing the translation API.
    • Check the IDE proxy configuration to see if that is the cause of the problem.
  2. What should I do if the translated content appears garbled?

    A: Garbled code generally appears when there is a lack of corresponding characters in the font. You can go to the Settings page of the plugin to modify the font in order to fix the garbled code (as shown below).

    screenshots

  3. What if I can't save the application key?

    A: You can try changing the way passwords are saved to In KeePass (Settings > Appearance & Behavior > System Settings > Passwords). For more details:

    • For macOS, please refer to #81
    • For Linux, please refer to #115
  4. What if the shortcuts don't work?

    A: The shortcut keys are most likely not working because they are being used in other plugins or external applications. You can reset shortcut keys for the corresponding operations.

Support and Donations

You can contribute and support this project by doing any of the following:

  • Star the project on GitHub

  • Give feedback

  • Commit PR

  • Contribute your ideas/suggestions

  • Share the plugin with your friends/colleagues

  • If you love this plugin, please consider donating. It will inspire me to continue development on the project:

    Open Collective WeChat Pay Alipay
    Donate To Our Collective WeChat Play Alipay

    Note

    After using Alipay/WeChat to pay for your donation, please provide your name/nickname and website by leaving a message or via email in the following format:

    Name/Nickname [<website>][: message] (website and message are optional.)

    Example: Yii.Guxing <github.com/YiiGuxing>: I like the plugin!

    If you choose to send an email, please also provide the following information:

    Donation Amount: <amount>
    Payment Platform: Alipay/WeChat Pay
    Payment Number (last 5 digits): <number>
    

    Email address: [email protected] (click to send email)

    The name, website and total donation amount you provide will be added to the donor list.

Thank you for your support!

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Backers

Thank you to all our backers! ❤️ [Become a backer]

Sponsors

Support this project by becoming a sponsor! Your logo will show up here with a link to your website. [Become a sponsor]

Donors

Name Website Amount
丿初音 425.00 CNY
剑平 120.00 CNY
山有扶苏 github.com/fobgochod 110.00 CNY
LiMingjun 100.00 CNY
DarknessTM github.com/darknesstm 100.00 CNY
Sunlife95 100.00 CNY
马强@咔丘互娱 100.00 CNY
Rrtt_2323 100.00 CNY
唐嘉 github.com/qq1427998646 100.00 CNY
凌高 100.00 CNY

More donors

translationplugin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

translationplugin's Issues

部分地方无法翻译

插件使用很顺手,但是发现有些地方翻译快捷键无效
2 4injx8 vz gv_a q3h5m
比如像这里的改进建议
是目前没有这个功能还是我的用法不对?
谢谢

添加百度翻译

再添加一个百度翻译的API吧,有些翻译会有差别,两处翻译对比之后,更好确定正确意义

键位冲突

alt+r,alt+t可能会与idea的标题栏的refactor和tool栏目冲突

支持网络代理

你好,我用公司的网络无法做查询,怀疑是因为公司的网络需要代理设置。在IDEA中已经设置的代理仍然不起作用。
请问是否没有网络代理这部分功能?后续能否添加?

持久化存储问题

你好,我也在写一款翻译插件。但是我做的是本地存储,用IO的方式放在本地。但出现了一个问题。
在windows平台上权限是足够的。到了linux和mac平台就无法直接操作io了。目前没有找到很好的办法解决。 除非用户将文件夹权限改为777才可以写入。但是这个太麻烦了。不方便。求给点提示。

Key name, Key value?

而网站上是给出的是

API key:
keyfrom:

刚测试了下,key value 对应 API key, 还望修改下啊,否则第一眼还有些疑惑 😄

API KEY 出问题

翻译的时候提示:请求过于频繁,请重试更换API KEY

乱码

请问乱码怎么解决?

修改成java6,偶尔会闪退

你好,我把java8新特性的相关语句修改为java6以后,可以正常使用,但是偶尔会闪退。
选中单词,右键,点击翻译以后,弹出来的窗口直接闪退了,能隐约看到单词已经翻译过来了。
请问能否指点一二,是哪里漏改了么?

aaaaaaa

alt+1翻译面板改进

当IDEA设置了背景图片时,使用alt+1调出来的面板会把背景也展现出来,但风格不太协调。能不能改进下把背景去掉,如alt+0的面板效果?

提几个建议

1.英文首字母不要大写
2.我的translation dialog没有文字颜色啊
3.打开dialog的时候自动聚焦到文本框里
4.添加英文单词发音的功能

Translate Error

上午11:30:35 Plugin Error: Translation threw an uncaught PluginException. Disable Plugin
上午11:30:35 PluginException: cannot create class "cn.yiiguxing.plugin.translate.action.TranslationAction" [Plugin: cn.yiiguxing.plugin.translate]
上午11:30:44 PluginException: cannot create class "cn.yiiguxing.plugin.translate.action.EditorPopupMenuAction" [Plugin: cn.yiiguxing.plugin.translate]
上午11:30:45 EmptyThrowable: Null child action in group Main Toolbar () of class class com.intellij.openapi.actionSystem.DefaultActionGroup, id=TranslationAction
上午11:30:56 EmptyThrowable: Null child action in group Main Toolbar () of class class com.intellij.openapi.actionSystem.DefaultActionGroup, id=TranslationAction
上午11:31:00 EmptyThrowable: Null child action in group Main Toolbar () of class class com.intellij.openapi.actionSystem.DefaultActionGroup, id=TranslationAction

如何删除查询记录?

这个翻译插件很不错,辛苦了。

当Alt+0,弹出Show Translation Dialog,怎么删除下拉菜单里的单词记录?

应该类似于缓存这样的?

Action命名

TranslationPlugin有四个操作动作,它们分别是:Translation, Translate, Translate(Inclusive) 和 Translate(Exclusive).

这命名真感人。。我想自定义keymap很容易搞混。。建议改成具体点含义的Action,比如'Translation bar', 'Translate(Full)', 'Translate(Single)'等等。。(不过好像Inclusive这个词很准确,可惜我不认识:P)

对话框在非聚焦状态下按ESC键关闭对话框的问题

插件版本 1.2.1,此外,安装了插件 ideavim,因为ideavim默认按esc会回到normal mode,所以无法关闭取词时自动弹出的对话框。
因此建议:
能否增加一个关闭对话框的action,我来自定义快捷键关闭对话框..
或者,修改一下插件,能兼容ideavim。

谢谢:)

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.