summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtChatView.cpp10
-rw-r--r--Swift/QtUI/QtChatWindow.cpp2
-rw-r--r--Swift/QtUI/QtFileTransferListItemModel.cpp26
3 files changed, 19 insertions, 19 deletions
diff --git a/Swift/QtUI/QtChatView.cpp b/Swift/QtUI/QtChatView.cpp
index 4fa25ee..e1d718f 100644
--- a/Swift/QtUI/QtChatView.cpp
+++ b/Swift/QtUI/QtChatView.cpp
@@ -327,12 +327,12 @@ void QtChatView::setFileTransferStatus(QString id, const ChatWindow::FileTransfe
QString newInnerHTML = "";
if (state == ChatWindow::WaitingForAccept) {
- newInnerHTML = "Waiting for other side to accept the transfer.<br/>" +
+ newInnerHTML = tr("Waiting for other side to accept the transfer.") + "<br/>" +
QtChatWindow::buildChatWindowButton(tr("Cancel"), QtChatWindow::ButtonFileTransferCancel, id);
}
if (state == ChatWindow::Negotiating) {
// replace with text "Negotiaging" + Cancel button
- newInnerHTML = "Negotiating...<br/>" +
+ newInnerHTML = tr("Negotiating...") + "<br/>" +
QtChatWindow::buildChatWindowButton(tr("Cancel"), QtChatWindow::ButtonFileTransferCancel, id);
}
else if (state == ChatWindow::Transferring) {
@@ -347,14 +347,14 @@ void QtChatView::setFileTransferStatus(QString id, const ChatWindow::FileTransfe
QtChatWindow::buildChatWindowButton(tr("Cancel"), QtChatWindow::ButtonFileTransferCancel, id);
}
else if (state == ChatWindow::Canceled) {
- newInnerHTML = "Transfer has been canceled!";
+ newInnerHTML = tr("Transfer has been canceled!");
}
else if (state == ChatWindow::Finished) {
// text "Successful transfer"
- newInnerHTML = "Transfer completed successfully.";
+ newInnerHTML = tr("Transfer completed successfully.");
}
else if (state == ChatWindow::FTFailed) {
- newInnerHTML = "Transfer failed.";
+ newInnerHTML = tr("Transfer failed.");
}
ftElement.setInnerXml(newInnerHTML);
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index 5680996..28e6c36 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -545,7 +545,7 @@ std::string QtChatWindow::addFileTransfer(const std::string& senderName, bool se
"</div>";
} else {
// incoming
- htmlString = "Receiving file: " + P2QSTRING(filename) + " ( " + formattedFileSize + ") <br/>" +
+ htmlString = tr("Receiving file") + ": " + P2QSTRING(filename) + " ( " + formattedFileSize + ") <br/>" +
"<div id='" + ft_id + "'>" +
buildChatWindowButton(tr("Cancel"), ButtonFileTransferCancel, ft_id) +
buildChatWindowButton(tr("Accept"), ButtonFileTransferAcceptRequest, ft_id, P2QSTRING(filename)) +
diff --git a/Swift/QtUI/QtFileTransferListItemModel.cpp b/Swift/QtUI/QtFileTransferListItemModel.cpp
index 63dd45a..cf1de07 100644
--- a/Swift/QtUI/QtFileTransferListItemModel.cpp
+++ b/Swift/QtUI/QtFileTransferListItemModel.cpp
@@ -43,11 +43,11 @@ void QtFileTransferListItemModel::handleProgressChange(int index) {
QVariant QtFileTransferListItemModel::headerData(int section, Qt::Orientation /* orientation */, int role) const {
if (role != Qt::DisplayRole) return QVariant();
- if (section == Direction) return QVariant("Direction");
- if (section == OtherParty) return QVariant("Other Party");
- if (section == State) return QVariant("State");
- if (section == Progress) return QVariant("Progress");
- if (section == OverallSize) return QVariant("Size");
+ if (section == Direction) return QVariant(QObject::tr("Direction"));
+ if (section == OtherParty) return QVariant(QObject::tr("Other Party"));
+ if (section == State) return QVariant(QObject::tr("State"));
+ if (section == Progress) return QVariant(QObject::tr("Progress"));
+ if (section == OverallSize) return QVariant(QObject::tr("Size"));
return QVariant();
}
@@ -62,7 +62,7 @@ QVariant QtFileTransferListItemModel::data(const QModelIndex &index, int role) c
}
FileTransferController* controller = fileTransferOverview->getFileTransfers().at(index.row());
if (index.column() == Direction) {
- return controller->isIncoming() ? QVariant("Incoming") : QVariant("Outgoing");
+ return controller->isIncoming() ? QVariant(QObject::tr("Incoming")) : QVariant(QObject::tr("Outgoing"));
}
if (index.column() == OtherParty) {
return QVariant(QString::fromStdString(controller->getOtherParty().toString()));
@@ -71,19 +71,19 @@ QVariant QtFileTransferListItemModel::data(const QModelIndex &index, int role) c
FileTransfer::State state = controller->getState();
switch(state.state) {
case FileTransfer::State::WaitingForStart:
- return QVariant("Waiting for start");
+ return QVariant(QObject::tr("Waiting for start"));
case FileTransfer::State::WaitingForAccept:
- return QVariant("Waiting for other side to accept");
+ return QVariant(QObject::tr("Waiting for other side to accept"));
case FileTransfer::State::Negotiating:
- return QVariant("Negotiating");
+ return QVariant(QObject::tr("Negotiating"));
case FileTransfer::State::Transferring:
- return QVariant("Transferring");
+ return QVariant(QObject::tr("Transferring"));
case FileTransfer::State::Finished:
- return QVariant("Finished");
+ return QVariant(QObject::tr("Finished"));
case FileTransfer::State::Failed:
- return QVariant("Failed");
+ return QVariant(QObject::tr("Failed"));
case FileTransfer::State::Canceled:
- return QVariant("Canceled");
+ return QVariant(QObject::tr("Canceled"));
}
}