Skip to content

Commit

Permalink
Merge branch 'dev-2.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
YiiGuxing committed Apr 7, 2020
2 parents 9c2e331 + fbb9756 commit 73855e6
Show file tree
Hide file tree
Showing 67 changed files with 102 additions and 37 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [v2.8.1](https://github.com/YiiGuxing/TranslationPlugin/tree/v2.8.1) (2020-04-07)

- 修复了一些Bug

## [v2.8.0](https://github.com/YiiGuxing/TranslationPlugin/tree/v2.8.0) (2020-03-23)

- 谷歌翻译新增拼写检查功能
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,9 @@ FAQ
更新日志
--------

## [v2.8.0](https://github.com/YiiGuxing/TranslationPlugin/tree/v2.8.0) (2020-03-23)
## [v2.8.1](https://github.com/YiiGuxing/TranslationPlugin/tree/v2.8.1) (2020-04-07)

- 谷歌翻译新增拼写检查功能
- 翻译与替换功能支持自动单词拆分
- 单词本自动聚焦新增的单词
- 修复了一些Bug

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,16 @@ open class TranslateAction(checkSelection: Boolean = false) : AutoSelectAction(c
val balloon = TranslationUIManager.showBalloon(editor, text, tracker, Balloon.Position.below)

if (highlighters.isNotEmpty()) {
Disposer.register(balloon, Disposable {
val disposable = Disposable {
for (highlighter in highlighters) {
highlightManager.removeSegmentHighlighter(editor, highlighter)
}
})
}
if (balloon.disposed) {
disposable.dispose()
} else {
Disposer.register(balloon, disposable)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ProcessComponent(text: String, insets: Insets = JBUI.emptyInsets()) : JPan

init {
isOpaque = false
layout = GridLayoutManager(1, 2, insets, JBUI.scale(5), 0)
layout = GridLayoutManager(1, 2, insets, JBUI.scale(10), 0)

add(icon, GridConstraints().apply {
column = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class SupportDialog private constructor() : DialogWrapper(null) {
捐赠金额:
支付平台:支付宝/微信支付
支付宝用户名/微信用户名/单号(后5位):</i></b><br/>
您提供的名字、网站和捐赠总额将会被添加到<a href="#patrons"><b>Patrons/捐赠者</b></a>列表中,列表将按捐赠总额列出前50名捐赠者。<br/>
邮箱地址:<a href="#e-mail"><b>yii.guxing@gmail.com</b></a> (点击发送邮件)<br/>
您提供的名字、网站和捐赠总额将会被添加到<a href="#patrons"><b>Patrons/捐赠者</b></a>列表中,列表将按捐赠总额列出前50名捐赠者。<br/>
感谢您的慷慨捐赠!
""".trimIndent()
JBPopupFactory.getInstance()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,14 @@ package cn.yiiguxing.plugin.translate.ui.icon
import com.intellij.openapi.util.IconLoader
import com.intellij.util.ui.AnimatedIcon

internal class ProcessIcon : AnimatedIcon("Querying Process",
ICONS,
STEP_PASSIVE,
CYCLE_LENGTH) {
internal class ProcessIcon : AnimatedIcon(
"Querying Process", ICONS, STEP_PASSIVE, CYCLE_LENGTH
) {
companion object {
private const val CYCLE_LENGTH = 800
private const val CYCLE_LENGTH = 400

private val ICONS = arrayOf(
IconLoader.getIcon("/process/fs/step_1@2x.png"),
IconLoader.getIcon("/process/fs/step_2@2x.png"),
IconLoader.getIcon("/process/fs/step_3@2x.png"),
IconLoader.getIcon("/process/fs/step_4@2x.png"),
IconLoader.getIcon("/process/fs/step_5@2x.png"),
IconLoader.getIcon("/process/fs/step_6@2x.png"),
IconLoader.getIcon("/process/fs/step_7@2x.png"),
IconLoader.getIcon("/process/fs/step_8@2x.png"),
IconLoader.getIcon("/process/fs/step_9@2x.png"),
IconLoader.getIcon("/process/fs/step_10@2x.png"),
IconLoader.getIcon("/process/fs/step_11@2x.png"),
IconLoader.getIcon("/process/fs/step_12@2x.png"),
IconLoader.getIcon("/process/fs/step_13@2x.png"),
IconLoader.getIcon("/process/fs/step_14@2x.png"),
IconLoader.getIcon("/process/fs/step_15@2x.png"),
IconLoader.getIcon("/process/fs/step_16@2x.png"),
IconLoader.getIcon("/process/fs/step_17@2x.png"),
IconLoader.getIcon("/process/fs/step_18@2x.png")
)
private val ICONS = Array(9) { IconLoader.getIcon("/icons/spinner/step_${it}.png") }

private val STEP_PASSIVE = IconLoader.getIcon("/process/fs/step_passive@2x.png")
private val STEP_PASSIVE = IconLoader.getIcon("/icons/spinner/step_passive.png")
}
}
4 changes: 1 addition & 3 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@
<!--suppress PluginXmlValidity -->
<change-notes><![CDATA[
<ul>
<li>谷歌翻译新增拼写检查功能</li>
<li>翻译与替换功能支持自动单词拆分</li>
<li>单词本自动聚焦新增的单词</li>
<li>修复了一些Bug</li>
</ul>
<a href="https://github.com/YiiGuxing/TranslationPlugin/blob/master/CHANGELOG.md"><b>Full Changelog History</b></a>
]]></change-notes>
Expand Down
Binary file added src/main/resources/icons/spinner/step_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/icons/spinner/step_0@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/icons/spinner/step_0_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_0_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/icons/spinner/step_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/icons/spinner/step_1@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/icons/spinner/step_1_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_1_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/icons/spinner/step_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/icons/spinner/step_2@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/icons/spinner/step_2_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_2_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/icons/spinner/step_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/icons/spinner/step_3@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/icons/spinner/step_3_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_3_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/icons/spinner/step_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_4.svg
Binary file added src/main/resources/icons/spinner/step_4@2x.png
Binary file added src/main/resources/icons/spinner/step_4_dark.png
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_4_dark.svg
Binary file added src/main/resources/icons/spinner/step_5.png
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_5.svg
Binary file added src/main/resources/icons/spinner/step_5@2x.png
Binary file added src/main/resources/icons/spinner/step_5_dark.png
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_5_dark.svg
Binary file added src/main/resources/icons/spinner/step_6.png
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_6.svg
Binary file added src/main/resources/icons/spinner/step_6@2x.png
Binary file added src/main/resources/icons/spinner/step_6_dark.png
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_6_dark.svg
Binary file added src/main/resources/icons/spinner/step_7.png
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_7.svg
Binary file added src/main/resources/icons/spinner/step_7@2x.png
Binary file added src/main/resources/icons/spinner/step_7_dark.png
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_7_dark.svg
Binary file added src/main/resources/icons/spinner/step_8.png
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_8.svg
Binary file added src/main/resources/icons/spinner/step_8@2x.png
Binary file added src/main/resources/icons/spinner/step_8_dark.png
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_8_dark.svg
Binary file added src/main/resources/icons/spinner/step_passive.png
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_passive.svg
4 changes: 4 additions & 0 deletions src/main/resources/icons/spinner/step_passive_dark.svg

0 comments on commit 73855e6

Please sign in to comment.