summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-19 08:48:05 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-19 21:29:44 (GMT)
commitb1836ffb49bd7740dbd7c32bfad04d077e81ecb5 (patch)
tree9d0d9b3fad9c2bbd0192696d59e08477b8c22c10 /Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
parent2f6c2299c28c9bb03ee1437058a4c7071ff2ac3f (diff)
downloadswift-b1836ffb49bd7740dbd7c32bfad04d077e81ecb5.zip
swift-b1836ffb49bd7740dbd7c32bfad04d077e81ecb5.tar.bz2
Make Swift translatable.
Diffstat (limited to 'Swift/QtUI/UserSearch/QtUserSearchWindow.cpp')
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchWindow.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
index c6fb004..a384f5d 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
@@ -23,7 +23,7 @@ namespace Swift {
QtUserSearchFirstPage::QtUserSearchFirstPage(UserSearchWindow::Type type, const QString& title) {
setupUi(this);
setTitle(title);
- setSubTitle(QString("%1. If you know their JID you can enter it directly, or you can search for them.").arg(type == UserSearchWindow::AddContact ? "Add another user to your roster" : "Chat to another user"));
+ setSubTitle(QString(tr("%1. If you know their JID you can enter it directly, or you can search for them.")).arg(type == UserSearchWindow::AddContact ? tr("Add another user to your roster") : tr("Chat to another user")));
connect(jid_, SIGNAL(textChanged(const QString&)), this, SLOT(emitCompletenessCheck()));
connect(service_->lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(emitCompletenessCheck()));
}
@@ -82,7 +82,7 @@ QtUserSearchWindow::QtUserSearchWindow(UIEventStream* eventStream, UserSearchWin
setupUi(this);
model_ = new UserSearchModel();
delegate_ = new UserSearchDelegate();
- QString title(type == UserSearchWindow::AddContact ? "Add Contact" : "Chat to User");
+ QString title(type == UserSearchWindow::AddContact ? tr("Add Contact") : tr("Chat to User"));
setWindowTitle(title);
firstPage_ = new QtUserSearchFirstPage(type, title);
connect(firstPage_->byJID_, SIGNAL(toggled(bool)), this, SLOT(handleFirstPageRadioChange()));
@@ -289,7 +289,14 @@ void QtUserSearchWindow::clearForm() {
void QtUserSearchWindow::clear() {
firstPage_->errorLabel_->setVisible(false);
- firstPage_->howLabel_->setText(QString("How would you like to find the user to %1?").arg(type_ == AddContact ? "add" : "chat to"));
+ QString howText;
+ if (type_ == AddContact) {
+ howText = QString("How would you like to find the user to add?");
+ }
+ else {
+ howText = QString("How would you like to find the user to chat to?");
+ }
+ firstPage_->howLabel_->setText(howText);
firstPage_->byJID_->setChecked(true);
clearForm();
model_->clear();
@@ -311,13 +318,13 @@ void QtUserSearchWindow::setError(const QString& error) {
void QtUserSearchWindow::setSearchError(bool error) {
if (error) {
- setError("Error while searching");
+ setError(tr("Error while searching"));
}
}
void QtUserSearchWindow::setServerSupportsSearch(bool support) {
if (!support) {
- setError("This server doesn't support searching for users.");
+ setError(tr("This server doesn't support searching for users."));
}
}