diff --git a/src/qt/peerdialog.cpp b/src/qt/peerdialog.cpp index 3c35c686f..b24918271 100644 --- a/src/qt/peerdialog.cpp +++ b/src/qt/peerdialog.cpp @@ -35,37 +35,37 @@ QString PeerTools::ManagePeer(QString type, QString peer) std::string peerAddress = peer.toStdString(); if(!g_connman) - return "Error: Peer-to-peer functionality missing or disabled"; + return tr("Error: Peer-to-peer functionality missing or disabled"); if (type == "onetry") { CAddress addr; g_connman->OpenNetworkConnection(addr, false, NULL, peerAddress.c_str()); - return "Attempted to one try node."; + return tr("Attempted to one try node."); } if (type == "add") { if(!g_connman->AddNode(peerAddress)) - return "Error: Node already added"; + return tr("Error: Node already added"); } else if(type == "remove") { if(!g_connman->RemoveAddedNode(peerAddress)) { if(!g_connman->DisconnectNode(peerAddress)) - return "Node not found in connected nodes"; + return tr("Node not found in connected nodes"); - return "Disconnected the node: " + peer; + return tr("Disconnected the node: ") + peer; } else { if(!g_connman->DisconnectNode(peerAddress)) - return "Node not found in connected nodes"; + return tr("Node not found in connected nodes"); } } - return "Returned OK."; + return tr("Returned OK."); } /** Check if Peer is valid */ @@ -106,7 +106,7 @@ void AddPeerDialog::on_addPeer_clicked() if(address.isEmpty()) { - QMessageBox::critical(this, "Add Peer", "Please enter an address.", QMessageBox::Ok, QMessageBox::Ok); + QMessageBox::critical(this, tr("Add Peer"), tr("Please enter an address."), QMessageBox::Ok, QMessageBox::Ok); return; } @@ -118,13 +118,13 @@ void AddPeerDialog::on_addPeer_clicked() if(!PeerTools::CheckPeerAddress(address)) { - QMessageBox::critical(this, "Add Peer", "Please enter a vaild peer address.", QMessageBox::Ok, QMessageBox::Ok); + QMessageBox::critical(this, tr("Add Peer"), tr("Please enter a vaild peer address."), QMessageBox::Ok, QMessageBox::Ok); return; } data = address + ":" + port; - if(QMessageBox::Ok == QMessageBox::information(this, "Add Peer", PeerTools::ManagePeer("add", data), QMessageBox::Ok, QMessageBox::Ok)) + if(QMessageBox::Ok == QMessageBox::information(this, tr("Add Peer"), PeerTools::ManagePeer("add", data), QMessageBox::Ok, QMessageBox::Ok)) this->close(); } @@ -153,7 +153,7 @@ void TestPeerDialog::on_testPeer_clicked() if(address.isEmpty()) { - QMessageBox::critical(this, "Test Peer", "Please enter an address.", QMessageBox::Ok, QMessageBox::Ok); + QMessageBox::critical(this, tr("Test Peer"), tr("Please enter an address."), QMessageBox::Ok, QMessageBox::Ok); return; } @@ -165,12 +165,12 @@ void TestPeerDialog::on_testPeer_clicked() if(!PeerTools::CheckPeerAddress(address)) { - QMessageBox::critical(this, "Test Peer", "Please enter a vaild peer address.", QMessageBox::Ok, QMessageBox::Ok); + QMessageBox::critical(this, tr("Test Peer"), tr("Please enter a vaild peer address."), QMessageBox::Ok, QMessageBox::Ok); return; } data = address + ":" + port; - if(QMessageBox::Ok == QMessageBox::information(this, "Try Peer", PeerTools::ManagePeer("onetry", data), QMessageBox::Ok, QMessageBox::Ok)) + if(QMessageBox::Ok == QMessageBox::information(this, tr("Try Peer"), PeerTools::ManagePeer("onetry", data), QMessageBox::Ok, QMessageBox::Ok)) this->close(); } diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index dacbeacdf..16b86ab1f 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -946,14 +946,14 @@ void RPCConsole::on_removePeer_clicked() { QString address = ips[0].data().toString(); - if(QMessageBox::Yes == QMessageBox::question(this, "Remove Peer", "Are you sure you want to remove the peer: " + address + "?", QMessageBox::Yes | QMessageBox::No)) + if(QMessageBox::Yes == QMessageBox::question(this, tr("Remove Peer"), tr("Are you sure you want to remove the peer: ") + address + "?", QMessageBox::Yes | QMessageBox::No)) { - QMessageBox::information(this, "Remove Peer", PeerTools::ManagePeer("remove", address), QMessageBox::Ok, QMessageBox::Ok); + QMessageBox::information(this, tr("Remove Peer"), PeerTools::ManagePeer("remove", address), QMessageBox::Ok, QMessageBox::Ok); } } else { - QMessageBox::information(this, "Remove Peer", "No peer was selected.", QMessageBox::Ok, QMessageBox::Ok); + QMessageBox::information(this, tr("Remove Peer"), tr("No peer was selected."), QMessageBox::Ok, QMessageBox::Ok); } }