summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavol Babincak <scroolik@gmail.com>2012-04-24 18:18:18 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-04-24 18:32:19 (GMT)
commitf52b5f87cf21c9cd8dea4ff1fad8fe5a32dbae80 (patch)
tree623f756a90525e0879037d7d9cc73ef73cfbe9c8 /Swift/QtUI/QtFileTransferListItemModel.cpp
parent02c18de062510e8061598bf492c68cb5b0624831 (diff)
downloadswift-contrib-f52b5f87cf21c9cd8dea4ff1fad8fe5a32dbae80.zip
swift-contrib-f52b5f87cf21c9cd8dea4ff1fad8fe5a32dbae80.tar.bz2
File transfer strings made translatable
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Diffstat (limited to 'Swift/QtUI/QtFileTransferListItemModel.cpp')
-rw-r--r--Swift/QtUI/QtFileTransferListItemModel.cpp26
1 files changed, 13 insertions, 13 deletions
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"));
}
}