YiiGuxing / TranslationPlugin

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

Translation engine doesn't work #3962

Closed CrazyBoy49z closed 1 year ago

CrazyBoy49z commented 1 year ago

📝 Issue Description

  1. Open the translation dialog
  2. Click the "translate" button
  3. The translation dialog disappears
  4. The expected behavior is that the translation dialog will not disappear

🏷 Plugin Version

3.5.0

🔁 Translation Engine(s)

Google Translate, Microsoft Translator, DeepL Translator

💻 IDE and Operating Environment

PhpStorm 2023.2 EAP
Build #PS-232.8296.18, built on June 26, 2023
Licensed to PhpStorm EAP user: Yurij Finiv
Expiration date: July 26, 2023
Runtime version: 17.0.7+7-b1000.2 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.6.7
GC: G1 Young Generation, G1 Old Generation
Memory: 4048M
Cores: 8
Metal Rendering is ON
Registry:
    debugger.new.tool.window.layout=true
    ide.windowSystem.autoShowProcessPopup=true
    run.processes.with.pty=TRUE
    ide.experimental.ui=true
    ide.balloon.shadow.size=0
    ide.images.show.chessboard=true

Non-Bundled Plugins:
    com.github.czy211.licensetemplate (2.0.0)
    com.guohanlin.yapiquicktype (2023.1.6)
    cn.xr21.newbing (2023.6.6)
    LiveTemplatePreview (0.3)
    ideanginx9 (0.1.9)
    color.scheme.Darcula Red (0.3)
    com.intellij.javafx (1.0.4)
    com.rmondjone.jsontotypescript (2023.1.2)
    cc.moky.intellij.plugin.svga-support (1.0.9)
    io.aesy.regex101 (0.2)
    com.wmsay.GPT4_lll (2.8.6)
    com.github.warningimhack3r.npmupdatedependencies (1.3.0)
    com.github.copilot (1.2.9.2686-nightly)
    com.materkey.codepoints (1.0.2)
    com.mroche.JsonHelper (1.2.0)
    org.OverEngineer.InlineProblems (0.4.3)
    lermitage.intellij.iconviewer (1.21.1)
    com.intellij.properties (232.8296.17)
    lermitage.intellij.worldclock (1.6.0)
    com.wix.sasslint (1.1.2)
    bundled-phpstorm-help (232.8296.18)
    String Manipulation (9.9.0)
    krasa.CpuUsageIndicator (1.15)
    sandipchitale.copywithlinenumbers (1.0.1)
    com.xtu.plugins.reviewer (1.1.2)
    ee.carlrobert.chatgpt (2.0.4)
    com.wakatime.intellij.plugin (14.1.5)
    lermitage.intellij.battery.status (1.26)
    HighlightBracketPair (1.4.0)
    com.haulmont.rcb (2023.2.4-232)
    com.github.inxilpro.intellijalpine (v0.4.2)
    com.github.blarc.ai-commits-intellij-plugin (1.2.1)
    com.mallowigi (91.0.0)
    zielu.gittoolbox (500.0.10+213)
    izhangzhihao.rainbow.brackets (2023.2.11)
    com.kalessil.phpStorm.phpInspectionsEA (5.0.0.0)
    com.funivan.idea.phpClean (2023.04.01)
    cn.yiiguxing.plugin.translate (3.5.0)
    ru.adelf.idea.dotenv (2023.2)
    com.mallowigi.colorHighlighter (15.0.0)
    de.espend.idea.php.annotation (9.4.0)
    fr.adrienbrault.idea.symfony2plugin (2022.1.252)
    com.github.dinbtechit.vscodetheme (1.8.1)
    net.rentalhost.plugins.php.hammer (0.22.2)
    dev.nybroe.collector (0.4.0)
    com.laravel_idea.plugin (7.1.4.232)
    com.pestphp.pest-intellij (1.10.1)
    mobi.hsz.idea.gitignore (4.5.1)

📋 Stacktrace

Translation error: 'java.io.OutputStream com.intellij.util.io.PathKt.outputStream$default(java.nio.file.Path, boolean, int, java.lang.Object)'

  java.lang.NoSuchMethodError: 'java.io.OutputStream com.intellij.util.io.PathKt.outputStream$default(java.nio.file.Path, boolean, int, java.lang.Object)'
at cn.yiiguxing.plugin.translate.util.IOKt.writeSafe(IO.kt:24)
at cn.yiiguxing.plugin.translate.service.CacheService.putDiskCache(CacheService.kt:68)
at cn.yiiguxing.plugin.translate.trans.TranslateClient.execute(TranslateClient.kt:59)
at cn.yiiguxing.plugin.translate.trans.microsoft.MicrosoftTranslator.translateDocumentation(MicrosoftTranslator.kt:58)
at cn.yiiguxing.plugin.translate.trans.microsoft.MicrosoftTranslator.translateDocumentation(MicrosoftTranslator.kt:47)
at cn.yiiguxing.plugin.translate.documentation.DocumentationsKt.getTranslatedDocumentation(Documentations.kt:136)
at cn.yiiguxing.plugin.translate.documentation.DocumentationsKt.getTranslatedDocumentation(Documentations.kt:76)
at cn.yiiguxing.plugin.translate.documentation.TranslateDocumentationTask$asyncTranslate$lambda$2$$inlined$runAsync$1.run(promise.kt:403)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:833)
CrazyBoy49z commented 1 year ago

3877

3910

image image
YiiGuxing commented 1 year ago

Duplicate of #3859

YiiGuxing commented 1 year ago

The problem has been fixed in version 3.5.1, please upgrade.