YiiGuxing / TranslationPlugin

Translation plugin for IntelliJ based IDEs/Android Studio.
https://intellij-translation.yiiguxing.top
MIT License
11.35k stars 790 forks source link

When the target language is English, the DeepL API Key does not work #6123

Closed viaSeunghyun closed 1 month ago

viaSeunghyun commented 2 months ago

📝 Issue Description

My DeepL API key is fine, but I get an error saying that it cannot be translated when the selected language is English. If I specify another language, it appears fine. image image

🏷 Plugin Version

3.6.5

🔁 Translation Engine(s)

DeepL Translator

💻 IDE and Operating Environment

PyCharm 2024.2.1 (Professional Edition)
Build #PY-242.21829.153, built on August 29, 2024
Seunghyun Baek에 라이선스 부여됨
구독이 2025년 3월 31일 전까지 유효합니다.
Runtime version: 21.0.3+13-b509.11 aarch64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 14.6.1
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 8
Metal Rendering is ON
Registry:
  debugger.new.tool.window.layout=true
  ide.experimental.ui=true
  i18n.locale=
Non-Bundled Plugins:
  com.intellij.ideolog (242.21829.162)
  GrepConsole (13.1.0-IJ2023.3)
  ru.adelf.idea.dotenv (2024.2.1)
  net.ashald.envfile (3.4.2)
  org.jetbrains.plugins.github (242.21829.162)
  com.github.copilot (1.5.21.6667)
  cn.yiiguxing.plugin.translate (3.6.5)

📋 Stacktrace

No response

YiiGuxing commented 2 months ago

Thank you for your feedback!

As a temporary workaround, you need to manually select "English (American)" or "English (British)".

OlnyBigRoc commented 2 months ago

原来如此,中文也有这个问题 image 改成这样就好使了

viaSeunghyun commented 1 month ago

Thank you, @YiiGuxing and @OlnyBigRoc

The temporary solution you suggested works.

image

It functions when I explicitly specify the default language (field 3, [기본 언어]) and clearly select the target language (field 4, [대상 언어]). Specifying the target language (field 4) precisely means that the "default language or English[기본 언어 또는 영어]" feature also doesn't work. (Due to a translation error, the default language here refers to the IDE's display language.)

Ultimately, it appears that both the target language (field 4) and default language (field 3) auto-detection are not functioning.

If this is a bug that's difficult to fix quickly or a feature not provided by the API in some engines, could you create a shortcut key or context menu in the next version to quickly switch between two pre-configured language sets until the issue is resolved?

YiiGuxing commented 1 month ago

This issue will be fixed in the next release.

wonsuc commented 1 month ago

@YiiGuxing Your suggested solution still can't translate Korean to English.

Another temporary workaround until next patch release.

  1. Go to https://plugins.jetbrains.com/plugin/8579-translation/versions/stable
  2. Download 3.6.4 version of the plugin and install it manually.