Commit 291a89b7 authored by Justin Hipple's avatar Justin Hipple
Browse files

Replace evil rich text on forms with good ol' plaintext. Wrap strings...

Replace evil rich text on forms with good ol' plaintext. Wrap strings sprinkled throughout code in a blanket of tr() goodness.

svn:r469
parent 6446f2c4
Loading
Loading
Loading
Loading
+4 −4
Changes for src/control/controlsocket.cpp: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ ControlSocket::disconnect(QString *errmsg)
    if (!waitForDisconnected(CONN_TIMEOUT)) {
      if (errmsg) {
        *errmsg =
          QString("Error disconnecting socket. [%1]").arg(errorString());
          tr("Error disconnecting socket. [%1]").arg(errorString());
      }
      return false;
    }
@@ -140,7 +140,7 @@ ControlSocket::sendCommand(ControlCommand cmd, QString *errmsg)
  if (write(strCmd.toAscii()) != strCmd.length()) {
    if (errmsg) {
      *errmsg = 
        QString("Error sending control command. [%1]").arg(errorString());
        tr("Error sending control command. [%1]").arg(errorString());
    }
    return false;
  }
@@ -159,7 +159,7 @@ ControlSocket::readLine(QString &line, QString *errmsg)
  while (!canReadLine()) {
    if (!isConnected()) {
      if (errmsg) {
        *errmsg = "Socket disconnected while attempting to read a line of data.";
        *errmsg = tr("Socket disconnected while attempting to read a line of data.");
      }
      return false;
    }
@@ -201,7 +201,7 @@ ControlSocket::readReply(ControlReply &reply, QString *errmsg)
    if (line.length() < 4) {
      if (errmsg) {
        *errmsg = 
          QString("Invalid control reply. [%1]").arg(line);
          tr("Invalid control reply. [%1]").arg(line);
      }
      return false;
    }
+8 −8
Changes for src/control/torprocess.cpp: 8 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ bool TorProcess::start(QString app, QString args, QString *errmsg)
  if (!appInfo.isExecutable()) {
    if (errmsg) {
      *errmsg = 
        QString("\"%1\" is not an executable.").arg(path);
        tr("\"%1\" is not an executable.").arg(path);
    }
    return false;
  }
@@ -96,7 +96,7 @@ TorProcess::stop(QString *errmsg)
  if (!waitForFinished(-1)) {
    if (errmsg) {
      *errmsg = 
        QString("Process %1 failed to stop. [%2]").arg(pid()).arg(errorString());
        tr("Process %1 failed to stop. [%2]").arg(pid()).arg(errorString());
    }
    return false;
  }
@@ -179,17 +179,17 @@ TorProcess::errorString()
  QString err;
  switch (error()) {
    case QProcess::FailedToStart:
      err = "Failed to start"; break;
      err = tr("Failed to start"); break;
    case QProcess::Crashed:
      err = "Crashed"; break;
      err = tr("Crashed"); break;
    case QProcess::Timedout:
      err = "Timed out"; break;
      err = tr("Timed out"); break;
    case QProcess::WriteError:
      err = "Write error"; break;
      err = tr("Write error"); break;
    case QProcess::ReadError:
      err = "Read error"; break;
      err = tr("Read error"); break;
    default:
      err = "Unknown error"; break;
      err = tr("Unknown error"); break;
  }
  return err;
}
+3 −3
Changes for src/gui/about/aboutdialog.cpp: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -82,11 +82,11 @@ AboutDialog::showLicense(bool show)
  if (show) {
    resize(_maxSize);
    ui.btnLicense->setChecked(true);
    ui.btnLicense->setText("Hide License");
    ui.btnLicense->setText(tr("Hide License"));
  } else {
    resize(_minSize);
    ui.btnLicense->setChecked(false);
    ui.btnLicense->setText("View License");
    ui.btnLicense->setText(tr("View License"));
  }
}

@@ -98,7 +98,7 @@ AboutDialog::show()
  if (_torControl->isRunning()) {
    ui.lblTorVersion->setText(_torControl->getTorVersion());
  } else {
    ui.lblTorVersion->setText("<Not Running>");
    ui.lblTorVersion->setText(tr("<Not Running>"));
  }
  QDialog::show();
}
+2 −2
Changes for src/gui/bwgraph/bwgraph.cpp: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -190,11 +190,11 @@ BandwidthGraph::showSettingsFrame(bool show)
  if (show) {
    ui.frmSettings->setVisible(true);
    ui.btnToggleSettings->setChecked(true);
    ui.btnToggleSettings->setText("Hide Settings");
    ui.btnToggleSettings->setText(tr("Hide Settings"));
  } else {
    ui.frmSettings->setVisible(false);
    ui.btnToggleSettings->setChecked(false);
    ui.btnToggleSettings->setText("Show Settings");
    ui.btnToggleSettings->setText(tr("Show Settings"));
  }
}

+4 −4
Changes for src/gui/bwgraph/bwgraph.ui: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -399,7 +399,7 @@
          <enum>Qt::NoContextMenu</enum>
         </property>
         <property name="text" >
          <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:Arial; font-size:10pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Since:&lt;/p>&lt;/body>&lt;/html></string>
          <string>Since:</string>
         </property>
        </widget>
       </item>
@@ -426,7 +426,7 @@
          <enum>Qt::NoContextMenu</enum>
         </property>
         <property name="text" >
          <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:Arial; font-size:10pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Jan 26 00:55:07&lt;/p>&lt;/body>&lt;/html></string>
          <string>Jan 1 2000</string>
         </property>
        </widget>
       </item>
@@ -627,7 +627,7 @@
              <enum>Qt::RightToLeft</enum>
             </property>
             <property name="text" >
              <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:Arial; font-size:10pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">100&lt;/p>&lt;/body>&lt;/html></string>
              <string>100</string>
             </property>
            </widget>
           </item>
@@ -648,7 +648,7 @@
              <enum>Qt::NoContextMenu</enum>
             </property>
             <property name="text" >
              <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:Arial; font-size:10pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">% Opaque&lt;/p>&lt;/body>&lt;/html></string>
              <string>% Opaque</string>
             </property>
            </widget>
           </item>
Loading