From a14d0023b2fc2ce5063ee540ef41558b8b4cdf2f Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Mon, 29 Aug 2022 12:58:09 +0100 Subject: [PATCH] externalize server disconnect and reconnect message --- .../controllers/com/muwire/gui/ChatRoomController.groovy | 4 ++-- gui/griffon-app/i18n/messages.properties | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gui/griffon-app/controllers/com/muwire/gui/ChatRoomController.groovy b/gui/griffon-app/controllers/com/muwire/gui/ChatRoomController.groovy index ed63b5abc..7f8a1842d 100644 --- a/gui/griffon-app/controllers/com/muwire/gui/ChatRoomController.groovy +++ b/gui/griffon-app/controllers/com/muwire/gui/ChatRoomController.groovy @@ -292,7 +292,7 @@ class ChatRoomController { runInsideUIAsync { long timestamp = System.currentTimeMillis() - String toDisplay = DataHelper.formatTime(timestamp) + " You reconnected to the server\n" // TODO translate + String toDisplay = DataHelper.formatTime(timestamp) + " " + trans("YOU_RECONNECTED") + "\n" view.appendGreen(toDisplay) trimLines() } @@ -304,7 +304,7 @@ class ChatRoomController { view.membersTable?.model?.fireTableDataChanged() long timestamp = System.currentTimeMillis() - String toDisplay = DataHelper.formatTime(timestamp) + " You disconnected from the server\n" // TODO translate + String toDisplay = DataHelper.formatTime(timestamp) + " " + trans("YOU_DISCONNECTED") + "\n" view.appendRed(toDisplay) trimLines() } diff --git a/gui/griffon-app/i18n/messages.properties b/gui/griffon-app/i18n/messages.properties index a90be4d55..6233d61b1 100644 --- a/gui/griffon-app/i18n/messages.properties +++ b/gui/griffon-app/i18n/messages.properties @@ -582,6 +582,8 @@ NOT_USER_COMMAND={0} is not a command JOINED_ROOM={0} joined the chat room LEFT_ROOM={0} left the chat room USER_DISCONNECTED={0} disconnected +YOU_DISCONNECTED=You disconnected from the server +YOU_RECONNECTED=You reconnected to the server ## Chat monitor CHAT_ROOMS_WITH_MESSAGES=Chat rooms with unread messages