Skip to content

Commit 7d5118e

Browse files
committed
Merge remote-tracking branch 'remotes/origin/dev-2.x'
# Conflicts: # gradle.properties
2 parents 2fc3ab6 + 06cd5f4 commit 7d5118e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+515
-124
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## [v2.9.0](https://github.com/YiiGuxing/TranslationPlugin/tree/v2.8.1) (2020-05-16)
4+
5+
- 增加了对 *Quick Documentation* 的翻译的支持(感谢 [Nikolay Tropin](https://github.com/niktrop)
6+
- 单词本支持导出为txt文本(感谢 [Kaiattrib](https://github.com/kaiattrib)
7+
8+
- 修复了一些Bug
39
## [v2.8.1](https://github.com/YiiGuxing/TranslationPlugin/tree/v2.8.1) (2020-04-07)
410

511
- 修复了一些Bug

README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,6 @@ TranslationPlugin
8686
点击状态栏的翻译引擎状态图标或者使用快捷键 <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>S</kbd>(Mac OS: <kbd>Control</kbd> + <kbd>Meta</kbd> + <kbd>Y</kbd>)可以快速切换翻译引擎,目前有谷歌翻译、有道翻译和百度翻译。
8787

8888

89-
插件配置
90-
------
91-
92-
![settings](./images/settings.png)
93-
94-
9589
Actions
9690
-------
9791
- **Show Translation Dialog...**
@@ -178,9 +172,10 @@ FAQ
178172
更新日志
179173
--------
180174

181-
## [v2.8.1](https://github.com/YiiGuxing/TranslationPlugin/tree/v2.8.1) (2020-04-07)
175+
## [v2.9.0](https://github.com/YiiGuxing/TranslationPlugin/tree/v2.8.1) (2020-05-16)
182176

183-
- 修复了一些Bug
177+
- 增加了对 *Quick Documentation* 的翻译的支持(感谢 [Nikolay Tropin](https://github.com/niktrop)
178+
- 单词本支持导出为txt文本(感谢 [Kaiattrib](https://github.com/kaiattrib)
184179

185180
[完整的更新历史记录](./CHANGELOG.md)
186181

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ buildscript {
99

1010
plugins {
1111
// https://github.com/JetBrains/gradle-intellij-plugin
12-
id "org.jetbrains.intellij" version "0.4.16"
13-
id 'org.jetbrains.kotlin.jvm' version '1.3.70'
12+
id "org.jetbrains.intellij" version "0.4.20"
13+
id 'org.jetbrains.kotlin.jvm' version '1.3.72'
1414
}
1515

1616
repositories {

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# suppress inspection "UnusedProperty" for whole file
2-
version=2.8.1
2+
version=2.9.0-192
33
buildNumber=
44
#buildNumber=SNAPSHOT
55
ideaVersion=IU-2017.1
@@ -9,6 +9,6 @@ kotlinLanguageVersion=1.3
99
kotlinTargetVersion=1.1
1010
sources=false
1111
customSinceBuild=171
12-
customUntilBuild=201.*
12+
customUntilBuild=192.*
1313
kotlin.code.style=official
1414
org.gradle.jvmargs='-Dfile.encoding=UTF-8'

src/main/java/cn/yiiguxing/plugin/translate/ui/form/Settings.form

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
<grid id="27dc6" binding="mWholePanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
44
<margin top="0" left="0" bottom="0" right="0"/>
55
<constraints>
6-
<xy x="20" y="20" width="732" height="634"/>
6+
<xy x="20" y="20" width="732" height="697"/>
77
</constraints>
88
<properties/>
99
<border type="none"/>
1010
<children>
11-
<grid id="4d915" layout-manager="GridLayoutManager" row-count="7" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
11+
<grid id="4d915" layout-manager="GridLayoutManager" row-count="8" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
1212
<margin top="0" left="0" bottom="0" right="0"/>
1313
<constraints>
1414
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
@@ -18,14 +18,13 @@
1818
<children>
1919
<vspacer id="aaf4">
2020
<constraints>
21-
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
21+
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
2222
</constraints>
2323
</vspacer>
2424
<component id="d72d6" class="cn.yiiguxing.plugin.translate.ui.settings.TranslatorSettingsContainer" binding="mTransPanelContainer" custom-create="true">
2525
<constraints>
2626
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
2727
</constraints>
28-
<properties/>
2928
</component>
3029
<grid id="197b" binding="mTranslateSettingsPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
3130
<margin top="0" left="0" bottom="0" right="0"/>
@@ -162,7 +161,7 @@
162161
<grid id="3d66b" binding="mFontPanel" layout-manager="GridLayoutManager" row-count="3" column-count="5" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
163162
<margin top="0" left="0" bottom="0" right="0"/>
164163
<constraints>
165-
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
164+
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
166165
</constraints>
167166
<properties/>
168167
<border type="none"/>
@@ -252,7 +251,7 @@
252251
<grid id="d1cc4" binding="mHistoryPanel" layout-manager="GridLayoutManager" row-count="1" column-count="4" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
253252
<margin top="0" left="0" bottom="0" right="0"/>
254253
<constraints>
255-
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
254+
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
256255
</constraints>
257256
<properties/>
258257
<border type="none"/>
@@ -297,57 +296,57 @@
297296
</component>
298297
</children>
299298
</grid>
300-
<grid id="4114f" binding="mOptionsPanel" layout-manager="GridLayoutManager" row-count="9" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
299+
<grid id="4114f" binding="mOptionsPanel" layout-manager="GridLayoutManager" row-count="10" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
301300
<margin top="0" left="0" bottom="0" right="0"/>
302301
<constraints>
303-
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
302+
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
304303
</constraints>
305304
<properties/>
306305
<border type="none"/>
307306
<children>
308307
<component id="aa0d7" class="com.intellij.ui.components.JBCheckBox" binding="mShowStatusIconCheckBox">
309308
<constraints>
310-
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
309+
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
311310
</constraints>
312311
<properties>
313312
<text resource-bundle="messages/TranslationBundle" key="settings.options.showStatusBarIcon"/>
314313
</properties>
315314
</component>
316315
<component id="7f941" class="com.intellij.ui.components.JBCheckBox" binding="mFoldOriginalCheckBox">
317316
<constraints>
318-
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
317+
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
319318
</constraints>
320319
<properties>
321320
<text resource-bundle="messages/TranslationBundle" key="settings.options.foldOriginal"/>
322321
</properties>
323322
</component>
324323
<component id="3b376" class="com.intellij.ui.components.JBCheckBox" binding="mKeepFormatCheckBox">
325324
<constraints>
326-
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
325+
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
327326
</constraints>
328327
<properties>
329328
<text resource-bundle="messages/TranslationBundle" key="settings.options.keepFormat"/>
330329
</properties>
331330
</component>
332331
<component id="96c1" class="com.intellij.ui.components.JBCheckBox" binding="mAutoReplaceCheckBox">
333332
<constraints>
334-
<grid row="8" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
333+
<grid row="9" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
335334
</constraints>
336335
<properties>
337336
<text resource-bundle="messages/TranslationBundle" key="settings.options.autoReplace"/>
338337
</properties>
339338
</component>
340339
<component id="e3492" class="com.intellij.ui.components.JBCheckBox" binding="mShowWordFormsCheckBox">
341340
<constraints>
342-
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
341+
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
343342
</constraints>
344343
<properties>
345344
<text resource-bundle="messages/TranslationBundle" key="settings.options.showWordForms"/>
346345
</properties>
347346
</component>
348347
<component id="6538d" class="com.intellij.ui.components.JBCheckBox" binding="mSelectTargetLanguageCheckBox">
349348
<constraints>
350-
<grid row="7" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
349+
<grid row="8" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
351350
</constraints>
352351
<properties>
353352
<text resource-bundle="messages/TranslationBundle" key="settings.options.selectLanguage"/>
@@ -356,7 +355,7 @@
356355
<grid id="14d2" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="4" vgap="-1">
357356
<margin top="0" left="0" bottom="0" right="0"/>
358357
<constraints>
359-
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
358+
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
360359
</constraints>
361360
<properties/>
362361
<border type="none"/>
@@ -386,26 +385,34 @@
386385
</grid>
387386
<component id="61460" class="com.intellij.ui.components.JBCheckBox" binding="mShowWordsOnStartupCheckBox">
388387
<constraints>
389-
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
388+
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
390389
</constraints>
391390
<properties>
392391
<text resource-bundle="messages/TranslationBundle" key="settings.options.showWordsOnStartup"/>
393392
</properties>
394393
</component>
395394
<component id="437ac" class="com.intellij.ui.components.JBCheckBox" binding="mShowExplanationCheckBox">
396395
<constraints>
397-
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
396+
<grid row="7" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
398397
</constraints>
399398
<properties>
400399
<text resource-bundle="messages/TranslationBundle" key="settings.options.showExplanation"/>
401400
</properties>
402401
</component>
402+
<component id="c8327" class="com.intellij.ui.components.JBCheckBox" binding="mTranslateDocumentationCheckBox">
403+
<constraints>
404+
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
405+
</constraints>
406+
<properties>
407+
<text resource-bundle="messages/TranslationBundle" key="settings.options.translate.documentation"/>
408+
</properties>
409+
</component>
403410
</children>
404411
</grid>
405412
<grid id="a748d" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
406413
<margin top="20" left="0" bottom="0" right="0"/>
407414
<constraints>
408-
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
415+
<grid row="7" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
409416
</constraints>
410417
<properties/>
411418
<border type="none"/>

src/main/java/cn/yiiguxing/plugin/translate/ui/form/SettingsForm.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public class SettingsForm {
4949
private JLabel mPhoneticFontLabel;
5050
private TranslatorSettingsContainer mTransPanelContainer;
5151
private JPanel mOptionsPanel;
52+
private JBCheckBox mTranslateDocumentationCheckBox;
5253
private JBCheckBox mShowStatusIconCheckBox;
5354
private JBCheckBox mFoldOriginalCheckBox;
5455
private JBCheckBox mKeepFormatCheckBox;
@@ -276,4 +277,8 @@ public final JBCheckBox getSelectTargetLanguageCheckBox() {
276277
public final LinkLabel getSupportLinkLabel() {
277278
return mSupportLinkLabel;
278279
}
280+
281+
public JBCheckBox getTranslateDocumentationCheckBox() {
282+
return mTranslateDocumentationCheckBox;
283+
}
279284
}

src/main/kotlin/cn/yiiguxing/plugin/translate/Settings.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ class Settings : PersistentStateComponent<Settings> {
147147
*/
148148
var targetLanguageSelection: TargetLanguageSelection = TargetLanguageSelection.DEFAULT
149149

150+
var translateDocumentation: Boolean = true
151+
150152
@Transient
151153
private val settingsChangePublisher: SettingsChangeListener =
152154
ApplicationManager.getApplication().messageBus.syncPublisher(SettingsChangeListener.TOPIC)

0 commit comments

Comments
 (0)