diff options
author | Kevin Smith <git@kismith.co.uk> | 2011-05-22 13:19:52 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2011-05-22 13:19:52 (GMT) |
commit | 6e33c98f97250074045d3928849b3536213df833 (patch) | |
tree | c9170c130afedef6d70a3e6796d7aade5980a630 /Swift/Controllers/Chat | |
parent | 4945e1e38c56811998fa4a8b39c595cb4fbc3d9b (diff) | |
download | swift-6e33c98f97250074045d3928849b3536213df833.zip swift-6e33c98f97250074045d3928849b3536213df833.tar.bz2 |
Allow errors in chats to not claim to be about sent messages.
Resolves: #797
Release-Notes: When failing to enter a room, the error message will no longer wrongly report that you were trying to send a message.
Diffstat (limited to 'Swift/Controllers/Chat')
-rw-r--r-- | Swift/Controllers/Chat/ChatControllerBase.cpp | 2 | ||||
-rw-r--r-- | Swift/Controllers/Chat/MUCController.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp index 14e17cd..ca93b68 100644 --- a/Swift/Controllers/Chat/ChatControllerBase.cpp +++ b/Swift/Controllers/Chat/ChatControllerBase.cpp @@ -158,7 +158,7 @@ void ChatControllerBase::handleIncomingMessage(boost::shared_ptr<MessageEvent> m boost::shared_ptr<Message> message = messageEvent->getStanza(); std::string body = message->getBody(); if (message->isError()) { - std::string errorMessage = getErrorMessage(message->getPayload<ErrorPayload>()); + std::string errorMessage = str(format(QT_TRANSLATE_NOOP("", "Couldn't send message: %1")) % getErrorMessage(message->getPayload<ErrorPayload>())); chatWindow_->addErrorMessage(errorMessage); } else { diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp index 3c6f965..202e2cd 100644 --- a/Swift/Controllers/Chat/MUCController.cpp +++ b/Swift/Controllers/Chat/MUCController.cpp @@ -159,7 +159,7 @@ void MUCController::handleJoinFailed(boost::shared_ptr<ErrorPayload> error) { default: break; } } - errorMessage += "."; + errorMessage = str(format(QT_TRANSLATE_NOOP("", "Couldn't join room: %1.")) % errorMessage); chatWindow_->addErrorMessage(errorMessage); if (!rejoinNick.empty()) { nick_ = rejoinNick; |