diff --git a/src/main/kotlin/app/termora/SSHTerminalTab.kt b/src/main/kotlin/app/termora/SSHTerminalTab.kt index 8f7d58e..c1a2347 100644 --- a/src/main/kotlin/app/termora/SSHTerminalTab.kt +++ b/src/main/kotlin/app/termora/SSHTerminalTab.kt @@ -126,9 +126,14 @@ class SSHTerminalTab(windowScope: WindowScope, host: Host) : override fun channelClosed(channel: Channel, reason: Throwable?) { coroutineScope.launch(Dispatchers.Swing) { terminal.write("\r\n\r\n${ControlCharacters.ESC}[31m") - terminal.write("Channel has been disconnected.") + terminal.write(I18n.getString("termora.terminal.channel-disconnected")) if (reconnectShortcut is KeyShortcut) { - terminal.write(" Type $reconnectShortcut to reconnect.") + terminal.write( + I18n.getString( + "termora.terminal.channel-reconnect", + reconnectShortcut.toString() + ) + ) } terminal.write("\r\n") terminal.write("${ControlCharacters.ESC}[0m") diff --git a/src/main/resources/i18n/messages.properties b/src/main/resources/i18n/messages.properties index 8f4754b..a0e0cdc 100644 --- a/src/main/resources/i18n/messages.properties +++ b/src/main/resources/i18n/messages.properties @@ -317,6 +317,8 @@ termora.actions.switch-tab=Switch to specific Tab [1..9] # Terminal termora.terminal.size=Size: {0} x {1} termora.terminal.copied=Copied +termora.terminal.channel-disconnected=Channel has been disconnected.\u0020 +termora.terminal.channel-reconnect=Type {0} to reconnect. # zmodem diff --git a/src/main/resources/i18n/messages_zh_CN.properties b/src/main/resources/i18n/messages_zh_CN.properties index 4649de7..fac192c 100644 --- a/src/main/resources/i18n/messages_zh_CN.properties +++ b/src/main/resources/i18n/messages_zh_CN.properties @@ -288,6 +288,8 @@ termora.toolbar.customize-toolbar=自定义工具栏... termora.terminal.size=大小: {0} x {1} termora.terminal.copied=已复制 +termora.terminal.channel-disconnected=终端断开连接, +termora.terminal.channel-reconnect=按 {0} 进行重连。 # Actions diff --git a/src/main/resources/i18n/messages_zh_TW.properties b/src/main/resources/i18n/messages_zh_TW.properties index 0079226..2370b8f 100644 --- a/src/main/resources/i18n/messages_zh_TW.properties +++ b/src/main/resources/i18n/messages_zh_TW.properties @@ -270,6 +270,8 @@ termora.toolbar.customize-toolbar=自訂工具列... termora.terminal.size=大小: {0} x {1} termora.terminal.copied=已複製 +termora.terminal.channel-disconnected=終端機連線中斷, +termora.terminal.channel-reconnect=按 {0} 進行重新連線。 # Actions termora.actions.copy-from-terminal=從終端複製