Skip to content

Commit

Permalink
Merge branch 'refs/heads/v3.6/next' into v3.6/213
Browse files Browse the repository at this point in the history
  • Loading branch information
YiiGuxing committed Jul 21, 2024
2 parents 32983ce + cf49b91 commit d3bb21d
Show file tree
Hide file tree
Showing 32 changed files with 297 additions and 301 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

## [Unreleased]

- The GPT-4o mini is now available in the OpenAI Translator engine.
- Alibaba Translate can now return the detected language.
- Bug fixes.
- GPT-4o mini 现已在 OpenAI 翻译引擎中可用
- 阿里翻译现在能返回检测到的语言
- Bug 修复

## [3.6.2] (2024/06/12)
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<br/>
<p>
<b>
<a href="https://yiiguxing.github.io/TranslationPlugin/index.html">Website</a> |
<a href="https://intellij-translation.yiiguxing.top">Website</a> |
<a href="https://github.com/YiiGuxing/TranslationPlugin">GitHub</a> |
<a href="https://yiiguxing.github.io/TranslationPlugin/start.html">Get Started</a> |
<a href="https://intellij-translation.yiiguxing.top/start.html">Get Started</a> |
<a href="https://plugins.jetbrains.com/plugin/8579-translation/support-donate">Donate</a>
</b>
</p>
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,10 @@ website. [[Become a sponsor][open-collective-contribute]]
[file:settings-font]: .github/readme/settings_font.png
[file:financial-contributors]: https://github.com/YiiGuxing/TranslationPlugin/blob/master/FINANCIAL_CONTRIBUTORS.md

[get-started-en]: https://yiiguxing.github.io/TranslationPlugin/en/start.html
[get-started-zh]: https://yiiguxing.github.io/TranslationPlugin/start.html
[get-started-ja]: https://yiiguxing.github.io/TranslationPlugin/ja/start.html
[get-started-ko]: https://yiiguxing.github.io/TranslationPlugin/ko/start.html
[get-started-en]: https://intellij-translation.yiiguxing.top/#/en/docs
[get-started-zh]: https://intellij-translation.yiiguxing.top/#/docs
[get-started-ja]: https://intellij-translation.yiiguxing.top/#/ja/docs
[get-started-ko]: https://intellij-translation.yiiguxing.top/#/ko/docs

[plugin-homepage]: https://plugins.jetbrains.com/plugin/8579-translation
[plugin-versions]: https://plugins.jetbrains.com/plugin/8579-translation/versions
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pluginGroup = cn.yiiguxing.plugin.translate
pluginRepositoryUrl = https://github.com/YiiGuxing/TranslationPlugin

# SemVer format -> https://semver.org
pluginMajorVersion = 3.6.2
pluginMajorVersion = 3.6.3
pluginPreReleaseVersion =
pluginBuildMetadata =
autoSnapshotVersion = true
Expand All @@ -32,7 +32,7 @@ platformPlugins = java, org.jetbrains.kotlin, \
kotlin.stdlib.default.dependency = false

# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 8.7
gradleVersion = 8.9

# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html
org.gradle.configuration-cache = true
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
6 changes: 3 additions & 3 deletions src/main/kotlin/cn/yiiguxing/plugin/translate/WebPages.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("unused", "MemberVisibilityCanBePrivate")

package cn.yiiguxing.plugin.translate

import cn.yiiguxing.plugin.translate.util.IdeVersion
Expand All @@ -17,7 +19,7 @@ import java.util.*
*/
object WebPages {

private const val BASE_URL = "https://yiiguxing.github.io/TranslationPlugin"
private const val BASE_URL = "https://intellij-translation.yiiguxing.top"

private val LOG = logger<WebPages>()

Expand Down Expand Up @@ -47,7 +49,6 @@ object WebPages {
/**
* Get the update page for the specified version.
*/
@Suppress("MemberVisibilityCanBePrivate")
fun updates(version: String = ""): PageFragment {
return get("updates").let { if (version.isEmpty()) it else it.resolvePath("v$version") }
}
Expand Down Expand Up @@ -151,7 +152,6 @@ object WebPages {
/** The language of the page. */
val language: Language = Language.CHINESE,
/** Whether to use compact mode. */
@Suppress("MemberVisibilityCanBePrivate")
val compact: Boolean = false,
) {
/** The path of the fragment. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,22 @@ import cn.yiiguxing.plugin.translate.message
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.Presentation
import com.intellij.openapi.project.DumbAwareAction
import com.intellij.openapi.project.Project
import javax.swing.Icon

class GettingStartedAction(icon: Icon? = null) :
open class GettingStartedAction(icon: Icon? = null) :
DumbAwareAction({ message("action.GettingStartedAction.text") }, Presentation.NULL_STRING, icon) {
override fun actionPerformed(e: AnActionEvent) {
WebPages.browse(
e.project,
WebPages.docs(),
message("help.getting.started", TranslationPlugin.name)
)
browse(e.project)
}

companion object {
fun browse(project: Project? = null) {
WebPages.browse(
project,
WebPages.docs(),
message("help.getting.started", TranslationPlugin.name)
)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ val Lang.aliLanguageCode: String
/**
* Returns the [language][Lang] for the specified Ali Translator language [code].
*/
@Suppress("unused")
fun Lang.Companion.fromAliLanguageCode(code: String): Lang {
return AliLanguageAdapter.getLanguage(code)
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package cn.yiiguxing.plugin.translate.trans.ali

import cn.yiiguxing.plugin.translate.trans.TranslationResultException

class AliTranslationResultException(val errorCode: String, val errorMessage: String?) :
TranslationResultException(errorCode.toIntOrNull() ?: -1) {
override fun getLocalizedMessage(): String {
return "$message[$errorMessage]"
}
}
Loading

0 comments on commit d3bb21d

Please sign in to comment.