Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Auto Generated]Plugin error occurred: Translation parsing failed[translate.microsoft]: java.lang.IllegalStateException: Expected a string ... #5327

Closed
intellij-translation-plugin-bot opened this issue Mar 12, 2024 · 0 comments
Labels
auto generated report 🤖 This is an automatically generated report bug/crash 💥 Uh-oh! fixed 🛠 Fixed
Milestone

Comments

@intellij-translation-plugin-bot

⚠️[Auto Generated Report]-=16DE298ED42AAA200F5CBD2C615B7931=-

Description

Translation parsing failed[translate.microsoft]: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 72 path $[0].sourceText

Environments

Plugin version: 3.5.6

IntelliJ IDEA 2023.3.4 (Ultimate Edition)
Build #IU-233.14475.28, built on February 13, 2024
Runtime version: 17.0.10+1-b1087.17 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Operating system: Windows 11.0
Last action id: null

Stack Trace

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 72 path $[0].sourceText
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:397)
	at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
	at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82)
	at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61)
	at com.google.gson.Gson.fromJson(Gson.java:1227)
	at com.google.gson.Gson.fromJson(Gson.java:1137)
	at com.google.gson.Gson.fromJson(Gson.java:1047)
	at com.google.gson.Gson.fromJson(Gson.java:1014)
	at cn.yiiguxing.plugin.translate.trans.microsoft.MicrosoftTranslator.parseTranslation(MicrosoftTranslator.kt:65)
	at cn.yiiguxing.plugin.translate.trans.microsoft.MicrosoftTranslator.access$parseTranslation(MicrosoftTranslator.kt:20)
	at cn.yiiguxing.plugin.translate.trans.microsoft.MicrosoftTranslator$translateDocumentation$client$2.invoke(MicrosoftTranslator.kt:55)
	at cn.yiiguxing.plugin.translate.trans.microsoft.MicrosoftTranslator$translateDocumentation$client$2.invoke(MicrosoftTranslator.kt:55)
	at cn.yiiguxing.plugin.translate.trans.SimpleTranslateClient.parse(SimpleTranslateClient.kt:19)
	at cn.yiiguxing.plugin.translate.trans.TranslateClient.execute(TranslateClient.kt:52)
	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:144)
	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 com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
	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:840)
Caused by: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 72 path $[0].sourceText
	at com.google.gson.stream.JsonReader.nextString(JsonReader.java:836)
	at com.google.gson.internal.bind.TypeAdapters$15.read(TypeAdapters.java:421)
	at com.google.gson.internal.bind.TypeAdapters$15.read(TypeAdapters.java:409)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.readIntoField(ReflectiveTypeAdapterFactory.java:212)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:433)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:393)
	... 26 more

Attachments

request.txt
Translator: translate.microsoft
Source language: 检测语言(auto)
Target language: 中文(简体)(zh-CN)
================ Request Text ================
<div class="content">
 <p>Download main.dart.js</p>
</div>
==============================================
translation.txt
[{"detectedLanguage":{"language":"hi-Latn","score":0.94},"sourceText":{"text":"<div class=\"content\">\n <p>डाउनलोड मेन।डार्ट।जेएस</p>\n</div>"},"translations":[{"text":"<div class=\"content\">\n <p>下载 Men.Dart.JS</p>\n</div>","to":"zh-Hans"}]}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto generated report 🤖 This is an automatically generated report bug/crash 💥 Uh-oh! fixed 🛠 Fixed
Projects
None yet
Development

No branches or pull requests

2 participants