Changeset 469

Show
Ignore:
Timestamp:
03/23/06 18:48:53 (3 years ago)
Author:
hipplej
Message:

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

Location:
trunk/src
Files:
11 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/control/controlsocket.cpp

    r460 r469  
    8282      if (errmsg) { 
    8383        *errmsg = 
    84           QString("Error disconnecting socket. [%1]").arg(errorString()); 
     84          tr("Error disconnecting socket. [%1]").arg(errorString()); 
    8585      } 
    8686      return false; 
     
    141141    if (errmsg) { 
    142142      *errmsg =  
    143         QString("Error sending control command. [%1]").arg(errorString()); 
     143        tr("Error sending control command. [%1]").arg(errorString()); 
    144144    } 
    145145    return false; 
     
    160160    if (!isConnected()) { 
    161161      if (errmsg) { 
    162         *errmsg = "Socket disconnected while attempting to read a line of data."; 
     162        *errmsg = tr("Socket disconnected while attempting to read a line of data."); 
    163163      } 
    164164      return false; 
     
    202202      if (errmsg) { 
    203203        *errmsg =  
    204           QString("Invalid control reply. [%1]").arg(line); 
     204          tr("Invalid control reply. [%1]").arg(line); 
    205205      } 
    206206      return false; 
  • trunk/src/control/torprocess.cpp

    r449 r469  
    5858    if (errmsg) { 
    5959      *errmsg =  
    60         QString("\"%1\" is not an executable.").arg(path); 
     60        tr("\"%1\" is not an executable.").arg(path); 
    6161    } 
    6262    return false; 
     
    9797    if (errmsg) { 
    9898      *errmsg =  
    99         QString("Process %1 failed to stop. [%2]").arg(pid()).arg(errorString()); 
     99        tr("Process %1 failed to stop. [%2]").arg(pid()).arg(errorString()); 
    100100    } 
    101101    return false; 
     
    180180  switch (error()) { 
    181181    case QProcess::FailedToStart: 
    182       err = "Failed to start"; break; 
     182      err = tr("Failed to start"); break; 
    183183    case QProcess::Crashed: 
    184       err = "Crashed"; break; 
     184      err = tr("Crashed"); break; 
    185185    case QProcess::Timedout: 
    186       err = "Timed out"; break; 
     186      err = tr("Timed out"); break; 
    187187    case QProcess::WriteError: 
    188       err = "Write error"; break; 
     188      err = tr("Write error"); break; 
    189189    case QProcess::ReadError: 
    190       err = "Read error"; break; 
     190      err = tr("Read error"); break; 
    191191    default: 
    192       err = "Unknown error"; break; 
     192      err = tr("Unknown error"); break; 
    193193  } 
    194194  return err; 
  • trunk/src/gui/about/aboutdialog.cpp

    r449 r469  
    8383    resize(_maxSize); 
    8484    ui.btnLicense->setChecked(true); 
    85     ui.btnLicense->setText("Hide License"); 
     85    ui.btnLicense->setText(tr("Hide License")); 
    8686  } else { 
    8787    resize(_minSize); 
    8888    ui.btnLicense->setChecked(false); 
    89     ui.btnLicense->setText("View License"); 
     89    ui.btnLicense->setText(tr("View License")); 
    9090  } 
    9191} 
     
    9999    ui.lblTorVersion->setText(_torControl->getTorVersion()); 
    100100  } else { 
    101     ui.lblTorVersion->setText("<Not Running>"); 
     101    ui.lblTorVersion->setText(tr("<Not Running>")); 
    102102  } 
    103103  QDialog::show(); 
  • trunk/src/gui/bwgraph/bwgraph.cpp

    r449 r469  
    191191    ui.frmSettings->setVisible(true); 
    192192    ui.btnToggleSettings->setChecked(true); 
    193     ui.btnToggleSettings->setText("Hide Settings"); 
     193    ui.btnToggleSettings->setText(tr("Hide Settings")); 
    194194  } else { 
    195195    ui.frmSettings->setVisible(false); 
    196196    ui.btnToggleSettings->setChecked(false); 
    197     ui.btnToggleSettings->setText("Show Settings"); 
     197    ui.btnToggleSettings->setText(tr("Show Settings")); 
    198198  } 
    199199} 
  • trunk/src/gui/bwgraph/bwgraph.ui

    r437 r469  
    400400         </property> 
    401401         <property name="text" > 
    402           <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> 
     402          <string>Since:</string> 
    403403         </property> 
    404404        </widget> 
     
    427427         </property> 
    428428         <property name="text" > 
    429           <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> 
     429          <string>Jan 1 2000</string> 
    430430         </property> 
    431431        </widget> 
     
    628628             </property> 
    629629             <property name="text" > 
    630               <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> 
     630              <string>100</string> 
    631631             </property> 
    632632            </widget> 
     
    649649             </property> 
    650650             <property name="text" > 
    651               <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> 
     651              <string>% Opaque</string> 
    652652             </property> 
    653653            </widget> 
  • trunk/src/gui/config/configdialog.cpp

    r451 r469  
    195195      (ui.lineServerPort->text().isEmpty() || 
    196196       ui.lineServerNickname->text().isEmpty())) { 
    197     *errmsg = "You must specify at least a server nickname and port."; 
     197    *errmsg = tr("You must specify at least a server nickname and port."); 
    198198    return false; 
    199199  } 
  • trunk/src/gui/config/configdialog.ui

    r437 r469  
    99    <x>0</x> 
    1010    <y>0</y> 
    11     <width>334</width> 
    12     <height>322</height> 
     11    <width>566</width> 
     12    <height>403</height> 
    1313   </rect> 
    1414  </property> 
     
    871871                 </property> 
    872872                 <property name="text" > 
    873                   <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;">&lt;span style=" color:#000000;">Address:&lt;/span>&lt;/p>&lt;/body>&lt;/html></string> 
     873                  <string>Address:</string> 
    874874                 </property> 
    875875                 <property name="alignment" > 
     
    917917               </item> 
    918918               <item row="6" column="0" colspan="3" > 
    919                 <widget class="QLabel" name="label_5" > 
     919                <widget class="QLabel" name="lblRequired" > 
    920920                 <property name="layoutDirection" > 
    921921                  <enum>Qt::LeftToRight</enum> 
    922922                 </property> 
    923923                 <property name="text" > 
    924                   <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;">&lt;span style=" color:#ff0000;">Required Fields&lt;/span>&lt;/p>&lt;/body>&lt;/html></string> 
     924                  <string>Nickname and Server Port are required</string> 
     925                 </property> 
     926                 <property name="textFormat" > 
     927                  <enum>Qt::AutoText</enum> 
    925928                 </property> 
    926929                 <property name="alignment" > 
     
    980983                     </property> 
    981984                     <property name="text" > 
    982                       <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;">Directory Port:&lt;/p>&lt;/body>&lt;/html></string> 
     985                      <string>Directory Port:</string> 
    983986                     </property> 
    984987                    </widget> 
     
    10481051                   </property> 
    10491052                   <item> 
    1050                     <widget class="QLabel" name="label" > 
     1053                    <widget class="QLabel" name="lblServerPort" > 
    10511054                     <property name="contextMenuPolicy" > 
    10521055                      <enum>Qt::NoContextMenu</enum> 
    10531056                     </property> 
    10541057                     <property name="text" > 
    1055                       <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;">&lt;span style=" color:#ff0000;">Server Port:&lt;/span>&lt;/p>&lt;/body>&lt;/html></string> 
     1058                      <string>Server Port:</string> 
    10561059                     </property> 
    10571060                     <property name="alignment" > 
     
    11241127                   </property> 
    11251128                   <property name="text" > 
    1126                     <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;">Contact Info:&lt;/p>&lt;/body>&lt;/html></string> 
     1129                    <string>Contact Info:</string> 
    11271130                   </property> 
    11281131                   <property name="alignment" > 
     
    11551158                 </property> 
    11561159                 <item> 
    1157                   <widget class="QLabel" name="label_2" > 
     1160                  <widget class="QLabel" name="lblNickname" > 
    11581161                   <property name="contextMenuPolicy" > 
    11591162                    <enum>Qt::NoContextMenu</enum> 
    11601163                   </property> 
    11611164                   <property name="text" > 
    1162                     <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;">&lt;span style=" color:#ff0000;">Nickname:&lt;/span>&lt;/p>&lt;/body>&lt;/html></string> 
     1165                    <string>Nickname:</string> 
     1166                   </property> 
     1167                   <property name="textFormat" > 
     1168                    <enum>Qt::AutoText</enum> 
    11631169                   </property> 
    11641170                   <property name="alignment" > 
     
    17591765                </property> 
    17601766                <property name="text" > 
    1761                  <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;">&lt;span style=" color:#000000;">Run as User:&lt;/span>&lt;/p>&lt;/body>&lt;/html></string> 
     1767                 <string>Run as User:</string> 
    17621768                </property> 
    17631769                <property name="indent" > 
     
    17921798                </property> 
    17931799                <property name="text" > 
    1794                  <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;">&lt;span style=" color:#000000;">Run as Group:&lt;/span>&lt;/p>&lt;/body>&lt;/html></string> 
     1800                 <string>Run as Group:</string> 
    17951801                </property> 
    17961802               </widget> 
  • trunk/src/gui/help/browser/helpbrowser.cpp

    r466 r469  
    120120  QDomElement root = document->documentElement(); 
    121121  if (root.tagName() != ELEMENT_CONTENTS) { 
    122     errorString = "Supplied XML file is not a valid Contents document."; 
     122    errorString = tr("Supplied XML file is not a valid Contents document."); 
    123123    return false; 
    124124  } 
     
    359359 
    360360  /* Set the status bar text */ 
    361   this->statusBar()->showMessage(QString("Found %1 results") 
     361  this->statusBar()->showMessage(tr("Found %1 results") 
    362362                                .arg(ui.treeSearch->topLevelItemCount())); 
    363363} 
  • trunk/src/gui/help/browser/helpbrowser.ui

    r454 r469  
    437437           </property> 
    438438           <property name="text" > 
    439             <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;">&lt;span style=" color:#000000;">Find:&lt;/span>&lt;/p>&lt;/body>&lt;/html></string> 
     439            <string>Find:</string> 
    440440           </property> 
    441441           <property name="buddy" > 
     
    644644           </property> 
    645645           <property name="text" > 
    646             <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;">&lt;span style=" color:#000000;">Searching for:&lt;/span>&lt;/p>&lt;/body>&lt;/html></string> 
     646            <string>Searching for:</string> 
    647647           </property> 
    648648           <property name="buddy" > 
  • trunk/src/gui/log/messagelog.cpp

    r449 r469  
    267267 
    268268  /* Set Message Counter */ 
    269   ui.lstMessages->setStatusTip(QString("Messages Shown: %1") 
     269  ui.lstMessages->setStatusTip(tr("Messages Shown: %1") 
    270270                                  .arg(_messagesShown)); 
    271271  /* Save Message Log opacity */ 
     
    358358MessageLog::format(QTreeWidgetItem *item) 
    359359{ 
    360   return QString("%1 [%2] %3\n").arg(item->text(COL_TIME)) 
     360  return tr("%1 [%2] %3\n").arg(item->text(COL_TIME)) 
    361361                                .arg(item->text(COL_TYPE)) 
    362362                                .arg(item->text(COL_MSG).trimmed()); 
     
    508508{ 
    509509  _messagesShown = 0; 
    510   ui.lstMessages->setStatusTip(QString("Messages Shown: %1") 
     510  ui.lstMessages->setStatusTip(tr("Messages Shown: %1") 
    511511                                  .arg(_messagesShown)); 
    512512} 
     
    545545    ui.frmSettings->setVisible(true); 
    546546    ui.btnToggleSettings->setChecked(true); 
    547     ui.btnToggleSettings->setText("Hide Settings"); 
     547    ui.btnToggleSettings->setText(tr("Hide Settings")); 
    548548  } else { 
    549549    ui.frmSettings->setVisible(false); 
    550550    ui.btnToggleSettings->setChecked(false); 
    551     ui.btnToggleSettings->setText("Show Settings"); 
     551    ui.btnToggleSettings->setText(tr("Show Settings")); 
    552552  } 
    553553} 
     
    629629 
    630630    _messagesShown++; 
    631     ui.lstMessages->setStatusTip(QString("Messages Shown: %1") 
     631    ui.lstMessages->setStatusTip(tr("Messages Shown: %1") 
    632632                                  .arg(_messagesShown)); 
    633633    ui.lstMessages->scrollToItem(newMessage); 
  • trunk/src/gui/log/messagelog.ui

    r437 r469  
    608608                </property> 
    609609                <property name="text" > 
    610                  <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> 
     610                 <string>% Opaque</string> 
    611611                </property> 
    612612               </widget>