Skip to content

Commit

Permalink
externalize server disconnect and reconnect message
Browse files Browse the repository at this point in the history
  • Loading branch information
zlatinb committed Aug 29, 2022
1 parent 1359a0d commit a14d002
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand All @@ -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()
}
Expand Down
2 changes: 2 additions & 0 deletions gui/griffon-app/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a14d002

Please sign in to comment.