mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-10 04:16:02 -04:00
chore: localize SSLHandshakeException.
This commit is contained in:
parent
aab6f68492
commit
af521b2893
@ -26,6 +26,7 @@ import org.jackhuang.hmcl.util.StringUtils;
|
|||||||
import org.jackhuang.hmcl.util.i18n.I18n;
|
import org.jackhuang.hmcl.util.i18n.I18n;
|
||||||
import org.jackhuang.hmcl.util.io.ResponseCodeException;
|
import org.jackhuang.hmcl.util.io.ResponseCodeException;
|
||||||
|
|
||||||
|
import javax.net.ssl.SSLHandshakeException;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.net.SocketTimeoutException;
|
import java.net.SocketTimeoutException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
@ -156,6 +157,8 @@ public final class DownloadProviders {
|
|||||||
return i18n("install.failed.downloading.detail", url) + "\n" + i18n("exception.access_denied", ((AccessDeniedException) exception.getCause()).getFile());
|
return i18n("install.failed.downloading.detail", url) + "\n" + i18n("exception.access_denied", ((AccessDeniedException) exception.getCause()).getFile());
|
||||||
} else if (exception.getCause() instanceof ArtifactMalformedException) {
|
} else if (exception.getCause() instanceof ArtifactMalformedException) {
|
||||||
return i18n("install.failed.downloading.detail", url) + "\n" + i18n("exception.artifact_malformed");
|
return i18n("install.failed.downloading.detail", url) + "\n" + i18n("exception.artifact_malformed");
|
||||||
|
} else if (exception.getCause() instanceof SSLHandshakeException) {
|
||||||
|
return i18n("install.failed.downloading.detail", url) + "\n" + i18n("exception.ssl_handshake");
|
||||||
} else {
|
} else {
|
||||||
return i18n("install.failed.downloading.detail", url) + "\n" + StringUtils.getStackTrace(exception.getCause());
|
return i18n("install.failed.downloading.detail", url) + "\n" + StringUtils.getStackTrace(exception.getCause());
|
||||||
}
|
}
|
||||||
|
@ -293,6 +293,7 @@ exception.access_denied=It's denied by operating system to access file %s. Maybe
|
|||||||
Please check if current operating system user has permission to access that file.\n\
|
Please check if current operating system user has permission to access that file.\n\
|
||||||
For Windows users, you can also try the Resource Monitor, find if some programs is holding the file, try to close related program, or restart your computer.
|
For Windows users, you can also try the Resource Monitor, find if some programs is holding the file, try to close related program, or restart your computer.
|
||||||
exception.artifact_malformed=The file cannot pass verification.
|
exception.artifact_malformed=The file cannot pass verification.
|
||||||
|
exception.ssl_handshake=Cannot establish SSL connection because of missing SSL certifcate in current Java installation. Try to start HMCL on another Java VM.
|
||||||
|
|
||||||
extension.bat=Windows Bat file
|
extension.bat=Windows Bat file
|
||||||
extension.mod=Mod file
|
extension.mod=Mod file
|
||||||
|
@ -293,6 +293,7 @@ exception.access_denied=因為無法訪問文件 %s,HMCL 沒有對該文件的
|
|||||||
請你檢查當前操作系統帳戶是否能訪問該文件,比如非管理員用戶可能不能訪問其他帳戶的個人文件夾內的文件。\n\
|
請你檢查當前操作系統帳戶是否能訪問該文件,比如非管理員用戶可能不能訪問其他帳戶的個人文件夾內的文件。\n\
|
||||||
對於 Windows 用戶,你還可以嘗試通過資源監視器查看是否有程序占用了該文件,如果是,你可以關閉占用此文件相關程序,或者重啟電腦再試。
|
對於 Windows 用戶,你還可以嘗試通過資源監視器查看是否有程序占用了該文件,如果是,你可以關閉占用此文件相關程序,或者重啟電腦再試。
|
||||||
exception.artifact_malformed=下載的文件正確,無法通過校驗。
|
exception.artifact_malformed=下載的文件正確,無法通過校驗。
|
||||||
|
exception.ssl_handshake=無法建立 SSL 連接,因為當前 Java 虛擬機缺少相關的 SSL 證書。你可以嘗試使用其他的 Java 虛擬機啟動 HMCL 再試。
|
||||||
|
|
||||||
extension.bat=Windows 指令碼
|
extension.bat=Windows 指令碼
|
||||||
extension.mod=模組檔案
|
extension.mod=模組檔案
|
||||||
|
@ -293,6 +293,7 @@ exception.access_denied=因为无法访问文件 %s,HMCL 没有对该文件的
|
|||||||
请你检查当前操作系统帐户是否能访问该文件,比如非管理员用户可能不能访问其他帐户的个人文件夹内的文件。\n\
|
请你检查当前操作系统帐户是否能访问该文件,比如非管理员用户可能不能访问其他帐户的个人文件夹内的文件。\n\
|
||||||
对于 Windows 用户,你还可以尝试通过资源监视器查看是否有程序占用了该文件,如果是,你可以关闭占用此文件相关程序,或者重启电脑再试。
|
对于 Windows 用户,你还可以尝试通过资源监视器查看是否有程序占用了该文件,如果是,你可以关闭占用此文件相关程序,或者重启电脑再试。
|
||||||
exception.artifact_malformed=下载的文件正确,无法通过校验。
|
exception.artifact_malformed=下载的文件正确,无法通过校验。
|
||||||
|
exception.ssl_handshake=无法建立 SSL 连接,因为当前 Java 虚拟机缺少相关的 SSL 证书。你可以尝试使用其他的 Java 虚拟机启动 HMCL 再试。
|
||||||
|
|
||||||
extension.bat=Windows 脚本
|
extension.bat=Windows 脚本
|
||||||
extension.mod=模组文件
|
extension.mod=模组文件
|
||||||
|
Loading…
x
Reference in New Issue
Block a user