From 725bad105b33730240205a3f527f8baf5f738d2e Mon Sep 17 00:00:00 2001 From: "Yii.Guxing" Date: Wed, 15 Jan 2020 15:12:46 +0800 Subject: [PATCH 1/5] Fix document translation for Dart class members issue: #436 --- .../translate/provider/DartDocumentationElementProvider.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/cn/yiiguxing/plugin/translate/provider/DartDocumentationElementProvider.kt b/src/main/kotlin/cn/yiiguxing/plugin/translate/provider/DartDocumentationElementProvider.kt index a4011759b..9e3e30cb3 100644 --- a/src/main/kotlin/cn/yiiguxing/plugin/translate/provider/DartDocumentationElementProvider.kt +++ b/src/main/kotlin/cn/yiiguxing/plugin/translate/provider/DartDocumentationElementProvider.kt @@ -8,10 +8,7 @@ import com.intellij.psi.PsiComment import com.intellij.psi.PsiElement import com.intellij.psi.PsiWhiteSpace import com.jetbrains.lang.dart.DartTokenTypesSets -import com.jetbrains.lang.dart.psi.DartComponent -import com.jetbrains.lang.dart.psi.DartComponentName -import com.jetbrains.lang.dart.psi.DartDocComment -import com.jetbrains.lang.dart.psi.DartVarDeclarationList +import com.jetbrains.lang.dart.psi.* class DartDocumentationElementProvider : AbstractDocumentationElementProvider() { @@ -33,6 +30,7 @@ class DartDocumentationElementProvider : AbstractDocumentationElementProvider sibling.componentName + is DartClassMembers, is DartVarDeclarationList -> sibling.findChildOfType(DartComponent::class.java)?.componentName else -> null } From 5b1be8318310246777d9f3d9a4bd14dd21ef3221 Mon Sep 17 00:00:00 2001 From: "Yii.Guxing" Date: Wed, 15 Jan 2020 15:59:54 +0800 Subject: [PATCH 2/5] Remove useless code --- .../translate/provider/DartDocumentationElementProvider.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/cn/yiiguxing/plugin/translate/provider/DartDocumentationElementProvider.kt b/src/main/kotlin/cn/yiiguxing/plugin/translate/provider/DartDocumentationElementProvider.kt index 9e3e30cb3..3935717b6 100644 --- a/src/main/kotlin/cn/yiiguxing/plugin/translate/provider/DartDocumentationElementProvider.kt +++ b/src/main/kotlin/cn/yiiguxing/plugin/translate/provider/DartDocumentationElementProvider.kt @@ -8,7 +8,10 @@ import com.intellij.psi.PsiComment import com.intellij.psi.PsiElement import com.intellij.psi.PsiWhiteSpace import com.jetbrains.lang.dart.DartTokenTypesSets -import com.jetbrains.lang.dart.psi.* +import com.jetbrains.lang.dart.psi.DartClassMembers +import com.jetbrains.lang.dart.psi.DartComponent +import com.jetbrains.lang.dart.psi.DartDocComment +import com.jetbrains.lang.dart.psi.DartVarDeclarationList class DartDocumentationElementProvider : AbstractDocumentationElementProvider() { @@ -41,8 +44,6 @@ class DartDocumentationElementProvider : AbstractDocumentationElementProvider Boolean = { it is DartComponentName } - /** * 向上检查是否存在多行文档注释 */ From 715a9b628910e32c48e44c224ed5339b09a1786a Mon Sep 17 00:00:00 2001 From: "Yii.Guxing" Date: Sun, 19 Jan 2020 10:27:52 +0800 Subject: [PATCH 3/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d56b43c86..b27e01a53 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ TranslationPlugin 安装 ---- - **使用 IDE 内置插件系统安装:** - - Preferences(Settings) > Plugins > Browse repositories... > 搜索并找到"Translation" > Install Plugin + - Preferences(Settings) > Plugins > Marketplace > 搜索并找到"Translation" > Install - **手动安装:** - 下载[插件包][latest-release] -> Preferences(Settings) > Plugins > Install plugin from disk... -> 选择插件包并安装(无需解压) From 4e14c6b91a7a1f68e87e2d19925a9b02faf096ee Mon Sep 17 00:00:00 2001 From: "Yii.Guxing" Date: Sun, 19 Jan 2020 10:39:04 +0800 Subject: [PATCH 4/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b27e01a53..6d0b7c364 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ TranslationPlugin - Preferences(Settings) > Plugins > Marketplace > 搜索并找到"Translation" > Install - **手动安装:** - - 下载[插件包][latest-release] -> Preferences(Settings) > Plugins > Install plugin from disk... -> 选择插件包并安装(无需解压) + - 下载[插件包][latest-release] -> Preferences(Settings) > Plugins > ⚙️ > Install plugin from disk... -> 选择插件包并安装(无需解压) 重启**IDE**. From d483808264e11267e022bd73716c22562779c9ec Mon Sep 17 00:00:00 2001 From: "Yii.Guxing" Date: Tue, 21 Jan 2020 09:19:21 +0800 Subject: [PATCH 5/5] :electric_plug: v2.7.2 --- CHANGELOG.md | 4 ++++ README.md | 5 ++--- gradle.properties | 2 +- src/main/resources/META-INF/plugin.xml | 3 +-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 314cc0998..44dfde852 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [v2.7.2](https://github.com/YiiGuxing/TranslationPlugin/tree/v2.7.2) (2020-01-21) + +- 修复了Dart语言中无法对类的第一个成员的文档注释进行文档翻译的问题 + ## [v2.7.1](https://github.com/YiiGuxing/TranslationPlugin/tree/v2.7.1) (2020-01-13) - 优化了单行文档注释的交互体验 diff --git a/README.md b/README.md index 6d0b7c364..453eea9b2 100644 --- a/README.md +++ b/README.md @@ -178,10 +178,9 @@ FAQ 更新日志 -------- -## [v2.7.1](https://github.com/YiiGuxing/TranslationPlugin/tree/v2.7.1) (2020-01-13) +## [v2.7.2](https://github.com/YiiGuxing/TranslationPlugin/tree/v2.7.2) (2020-01-21) -- 优化了单行文档注释的交互体验 -- 修复了Go语言在一些情况下无法进行文档翻译的问题 +- 修复了Dart语言中无法对类的第一个成员的文档注释进行文档翻译的问题 [完整的更新历史记录](./CHANGELOG.md) diff --git a/gradle.properties b/gradle.properties index df7817632..dffe6af2c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ # suppress inspection "UnusedProperty" for whole file -version=2.7.1 +version=2.7.2 buildNumber= ideaVersion=IU-2017.1 javaVersion=1.8 diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 931904b15..0a4cbf8ab 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -43,8 +43,7 @@ -
  • 优化了单行文档注释的交互体验
  • -
  • 修复了Go语言在一些情况下无法进行文档翻译的问题
  • +
  • 修复了Dart语言中无法对类的第一个成员的文档注释进行文档翻译的问题
  • Full Changelog History ]]>