author | mickeyl <mickeyl> | 2003-05-03 21:33:49 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-05-03 21:33:49 (UTC) |
commit | 031031a22a8482c674b250c9f32a758f11139aeb (patch) (side-by-side diff) | |
tree | 79126fc719c74361eb1966d774cdf75c04c82a7c | |
parent | cbaa70d78b1dccce4dc54baba5fc35431467972f (diff) | |
download | opie-031031a22a8482c674b250c9f32a758f11139aeb.zip opie-031031a22a8482c674b250c9f32a758f11139aeb.tar.gz opie-031031a22a8482c674b250c9f32a758f11139aeb.tar.bz2 |
prepare for i18n
-rw-r--r-- | i18n/da/wellenreiter.ts | 0 | ||||
-rw-r--r-- | i18n/de/wellenreiter.ts | 0 | ||||
-rw-r--r-- | i18n/en/wellenreiter.ts | 0 | ||||
-rw-r--r-- | i18n/es/wellenreiter.ts | 0 | ||||
-rw-r--r-- | i18n/fr/wellenreiter.ts | 0 | ||||
-rw-r--r-- | i18n/hu/wellenreiter.ts | 0 | ||||
-rw-r--r-- | i18n/it/wellenreiter.ts | 0 | ||||
-rw-r--r-- | i18n/ja/wellenreiter.ts | 0 | ||||
-rw-r--r-- | i18n/ko/wellenreiter.ts | 0 | ||||
-rw-r--r-- | i18n/nl/wellenreiter.ts | 0 | ||||
-rw-r--r-- | i18n/no/wellenreiter.ts | 0 | ||||
-rw-r--r-- | i18n/pl/wellenreiter.ts | 0 | ||||
-rw-r--r-- | i18n/pt/wellenreiter.ts | 0 | ||||
-rw-r--r-- | i18n/pt_BR/wellenreiter.ts | 0 | ||||
-rw-r--r-- | i18n/sl/wellenreiter.ts | 0 | ||||
-rw-r--r-- | i18n/xx/wellenreiter.ts | 0 | ||||
-rw-r--r-- | i18n/zh_CN/wellenreiter.ts | 0 | ||||
-rw-r--r-- | i18n/zh_TW/wellenreiter.ts | 0 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/main.cpp | 10 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 39 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.cpp | 18 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/statwindow.cpp | 4 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 28 | ||||
-rw-r--r-- | noncore/net/wellenreiter/wellenreiter.pro | 18 |
24 files changed, 78 insertions, 39 deletions
diff --git a/i18n/da/wellenreiter.ts b/i18n/da/wellenreiter.ts new file mode 100644 index 0000000..e69de29 --- a/dev/null +++ b/i18n/da/wellenreiter.ts diff --git a/i18n/de/wellenreiter.ts b/i18n/de/wellenreiter.ts new file mode 100644 index 0000000..e69de29 --- a/dev/null +++ b/i18n/de/wellenreiter.ts diff --git a/i18n/en/wellenreiter.ts b/i18n/en/wellenreiter.ts new file mode 100644 index 0000000..e69de29 --- a/dev/null +++ b/i18n/en/wellenreiter.ts diff --git a/i18n/es/wellenreiter.ts b/i18n/es/wellenreiter.ts new file mode 100644 index 0000000..e69de29 --- a/dev/null +++ b/i18n/es/wellenreiter.ts diff --git a/i18n/fr/wellenreiter.ts b/i18n/fr/wellenreiter.ts new file mode 100644 index 0000000..e69de29 --- a/dev/null +++ b/i18n/fr/wellenreiter.ts diff --git a/i18n/hu/wellenreiter.ts b/i18n/hu/wellenreiter.ts new file mode 100644 index 0000000..e69de29 --- a/dev/null +++ b/i18n/hu/wellenreiter.ts diff --git a/i18n/it/wellenreiter.ts b/i18n/it/wellenreiter.ts new file mode 100644 index 0000000..e69de29 --- a/dev/null +++ b/i18n/it/wellenreiter.ts diff --git a/i18n/ja/wellenreiter.ts b/i18n/ja/wellenreiter.ts new file mode 100644 index 0000000..e69de29 --- a/dev/null +++ b/i18n/ja/wellenreiter.ts diff --git a/i18n/ko/wellenreiter.ts b/i18n/ko/wellenreiter.ts new file mode 100644 index 0000000..e69de29 --- a/dev/null +++ b/i18n/ko/wellenreiter.ts diff --git a/i18n/nl/wellenreiter.ts b/i18n/nl/wellenreiter.ts new file mode 100644 index 0000000..e69de29 --- a/dev/null +++ b/i18n/nl/wellenreiter.ts diff --git a/i18n/no/wellenreiter.ts b/i18n/no/wellenreiter.ts new file mode 100644 index 0000000..e69de29 --- a/dev/null +++ b/i18n/no/wellenreiter.ts diff --git a/i18n/pl/wellenreiter.ts b/i18n/pl/wellenreiter.ts new file mode 100644 index 0000000..e69de29 --- a/dev/null +++ b/i18n/pl/wellenreiter.ts diff --git a/i18n/pt/wellenreiter.ts b/i18n/pt/wellenreiter.ts new file mode 100644 index 0000000..e69de29 --- a/dev/null +++ b/i18n/pt/wellenreiter.ts diff --git a/i18n/pt_BR/wellenreiter.ts b/i18n/pt_BR/wellenreiter.ts new file mode 100644 index 0000000..e69de29 --- a/dev/null +++ b/i18n/pt_BR/wellenreiter.ts diff --git a/i18n/sl/wellenreiter.ts b/i18n/sl/wellenreiter.ts new file mode 100644 index 0000000..e69de29 --- a/dev/null +++ b/i18n/sl/wellenreiter.ts diff --git a/i18n/xx/wellenreiter.ts b/i18n/xx/wellenreiter.ts new file mode 100644 index 0000000..e69de29 --- a/dev/null +++ b/i18n/xx/wellenreiter.ts diff --git a/i18n/zh_CN/wellenreiter.ts b/i18n/zh_CN/wellenreiter.ts new file mode 100644 index 0000000..e69de29 --- a/dev/null +++ b/i18n/zh_CN/wellenreiter.ts diff --git a/i18n/zh_TW/wellenreiter.ts b/i18n/zh_TW/wellenreiter.ts new file mode 100644 index 0000000..e69de29 --- a/dev/null +++ b/i18n/zh_TW/wellenreiter.ts diff --git a/noncore/net/wellenreiter/gui/main.cpp b/noncore/net/wellenreiter/gui/main.cpp index 03da135..96ebb3f 100644 --- a/noncore/net/wellenreiter/gui/main.cpp +++ b/noncore/net/wellenreiter/gui/main.cpp @@ -52,15 +52,15 @@ int main( int argc, char **argv ) a.processEvents(); // show the window before doing the safety checks int result = -1; // root check if ( getuid() ) { - qWarning( "Wellenreiter: trying to run as non-root!" ); - result = QMessageBox::warning( w, " - Wellenreiter II - (non-root)", "You have started Wellenreiter II\n" - "as non-root. You will have\nonly limited functionality.\nProceed anyway?", + qWarning( QObject::tr( "Wellenreiter: trying to run as non-root!" ) ); + result = QMessageBox::warning( w, " - Wellenreiter II - (non-root)", QObject::tr( "You have started Wellenreiter II\n" + "as non-root. You will have\nonly limited functionality.\nProceed anyway?" ), QMessageBox::Yes, QMessageBox::No ); if ( result == QMessageBox::No ) return -1; } // dhcp check - NOT HERE! This really belongs as a static member to OProcess // and I want to call it like that: if ( OProcess::isRunning( QString& ) ) ... @@ -80,14 +80,14 @@ int main( int argc, char **argv ) //qDebug( "cmdline = %s", (const char*) line ); if ( line.contains( "dhcp" ) ) break; } if ( line.contains( "dhcp" ) ) { qWarning( "Wellenreiter: found dhcp process #%d", (*it).toInt() ); - result = QMessageBox::warning( w, " - Wellenreiter II - (dhcp)", "You have a dhcp client running.\n" - "This can severly limit scanning!\nShould I kill it for you?", + result = QMessageBox::warning( w, " - Wellenreiter II - (dhcp)", QObject::tr( "You have a dhcp client running.\n" + "This can severly limit scanning!\nShould I kill it for you?" ), QMessageBox::Yes, QMessageBox::No ); if ( result == QMessageBox::Yes ) { if ( -1 == ::kill( (*it).toInt(), SIGTERM ) ) qWarning( "Wellenreiter: can't kill process (%s)", result, strerror( errno ) ); } diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index 6cd364c..c4a8fbc 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp @@ -99,46 +99,46 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n int id; QMenuBar* mb = menuBar(); QPopupMenu* fileSave = new QPopupMenu( mb ); - fileSave->insertItem( "&Session...", this, SLOT( fileSaveSession() ) ); - fileSave->insertItem( "&Text Log...", this, SLOT( fileSaveLog() ) ); - fileSave->insertItem( "&Hex Log...", this, SLOT( fileSaveHex() ) ); + fileSave->insertItem( tr( "&Session..." ), this, SLOT( fileSaveSession() ) ); + fileSave->insertItem( tr( "&Text Log..." ), this, SLOT( fileSaveLog() ) ); + fileSave->insertItem( tr( "&Hex Log..." ), this, SLOT( fileSaveHex() ) ); QPopupMenu* fileLoad = new QPopupMenu( mb ); - fileLoad->insertItem( "&Session...", this, SLOT( fileLoadSession() ) ); + fileLoad->insertItem( tr( "&Session..." ), this, SLOT( fileLoadSession() ) ); //fileLoad->insertItem( "&Log", this, SLOT( fileLoadLog() ) ); QPopupMenu* file = new QPopupMenu( mb ); - file->insertItem( "&New", this, SLOT( fileNew() ) ); - id = file->insertItem( "&Load", fileLoad ); - file->insertItem( "&Save", fileSave ); + file->insertItem( tr( "&New" ), this, SLOT( fileNew() ) ); + id = file->insertItem( tr( "&Load" ), fileLoad ); + file->insertItem( tr( "&Save" ), fileSave ); file->insertSeparator(); - file->insertItem( "&Exit", qApp, SLOT( quit() ) ); + file->insertItem( tr( "&Exit" ), qApp, SLOT( quit() ) ); QPopupMenu* view = new QPopupMenu( mb ); - view->insertItem( "&Configure..." ); + view->insertItem( tr( "&Configure..." ) ); QPopupMenu* sniffer = new QPopupMenu( mb ); - sniffer->insertItem( "&Configure...", this, SLOT( showConfigure() ) ); + sniffer->insertItem( tr( "&Configure..." ), this, SLOT( showConfigure() ) ); sniffer->insertSeparator(); - startID = sniffer->insertItem( "&Start", mw, SLOT( startClicked() ) ); + startID = sniffer->insertItem( tr( "&Start" ), mw, SLOT( startClicked() ) ); sniffer->setItemEnabled( startID, false ); - stopID = sniffer->insertItem( "Sto&p", mw, SLOT( stopClicked() ) ); + stopID = sniffer->insertItem( tr( "Sto&p" ), mw, SLOT( stopClicked() ) ); sniffer->setItemEnabled( stopID, false ); QPopupMenu* demo = new QPopupMenu( mb ); - demo->insertItem( "&Add something", this, SLOT( demoAddStations() ) ); + demo->insertItem( tr( "&Add something" ), this, SLOT( demoAddStations() ) ); - id = mb->insertItem( "&File", file ); - id = mb->insertItem( "&View", view ); + id = mb->insertItem( tr( "&File" ), file ); + id = mb->insertItem( tr( "&View" ), view ); mb->setItemEnabled( id, false ); - id = mb->insertItem( "&Sniffer", sniffer ); - id = mb->insertItem( "&Demo", demo ); + id = mb->insertItem( tr( "&Sniffer" ), sniffer ); + id = mb->insertItem( tr( "&Demo" ), demo ); mb->setItemEnabled( id, true ); #ifdef QWS mb->insertItem( startButton ); mb->insertItem( stopButton ); mb->insertItem( c ); @@ -152,13 +152,13 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n updateToolButtonState(); // setup status bar (for now only on X11) #ifndef QWS - statusBar()->message( "Ready." ); + statusBar()->message( tr( "Ready." ) ); #endif connect( mw, SIGNAL( startedSniffing() ), this, SLOT( changedSniffingState() ) ); connect( mw, SIGNAL( stoppedSniffing() ), this, SLOT( changedSniffingState() ) ); }; @@ -348,13 +348,14 @@ void WellenreiterMainWindow::fileNew() } void WellenreiterMainWindow::closeEvent( QCloseEvent* e ) { if ( mw->isDaemonRunning() ) { - QMessageBox::warning( this, "Wellenreiter/Opie", "Sniffing in progress!\nPlease stop sniffing before closing." ); + QMessageBox::warning( this, "Wellenreiter/Opie", + tr( "Sniffing in progress!\nPlease stop sniffing before closing." ) ); e->ignore(); } else { QMainWindow::closeEvent( e ); } diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index 1cf49e0..3a6aa15 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp @@ -50,15 +50,15 @@ MScanListView::MScanListView( QWidget* parent, const char* name ) setFrameShape( QListView::StyledPanel ); setFrameShadow( QListView::Sunken ); addColumn( tr( "Net/Station" ) ); setColumnAlignment( 0, AlignLeft || AlignVCenter ); - addColumn( tr( "B" ) ); + addColumn( tr( "#" ) ); setColumnAlignment( 1, AlignCenter ); - addColumn( tr( "AP" ) ); + addColumn( tr( "MAC" ) ); setColumnAlignment( 2, AlignCenter ); addColumn( tr( "Chn" ) ); setColumnAlignment( 3, AlignCenter ); addColumn( tr( "W" ) ); setColumnAlignment( 4, AlignCenter ); addColumn( tr( "T" ) ); @@ -145,18 +145,18 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo return; } } else { s.sprintf( "(i) new network: '%s'", (const char*) essid ); + //TODO send s to logwindow network = new MScanListItem( this, "network", essid, QString::null, 0, 0, 0 ); } // insert new station as child from network - // no essid to reduce clutter, maybe later we have a nick or stationname to display!? qDebug( "inserting new station %s", (const char*) macaddr ); MScanListItem* station = new MScanListItem( network, type, "", macaddr, wep, channel, signal ); if ( _manufacturerdb ) @@ -167,12 +167,13 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo s.sprintf( "(i) new AP in '%s' [%d]", (const char*) essid, channel ); } else { s.sprintf( "(i) new adhoc station in '%s' [%d]", (const char*) essid, channel ); } + //TODO send s to logwindow } void MScanListView::addIfNotExisting( MScanListItem* network, QString addr, const QString& type ) { @@ -195,12 +196,23 @@ void MScanListView::addIfNotExisting( MScanListItem* network, QString addr, cons } // Hey, it seems to be a new item :-D MScanListItem* station = new MScanListItem( network, type, /* network->text( col_essid ) */ "", addr, false, -1, -1 ); if ( _manufacturerdb ) station->setManufacturer( _manufacturerdb->lookup( addr ) ); + + QString s; + if ( type == "station" ) + { + s.sprintf( "(i) new station in '%s' [??]", (const char*) network->text( col_essid ) ); + } + else + { + s.sprintf( "(i) new wireless station in '%s' [??]", (const char*) network->text( col_essid ) ); + } + //TODO send s to logwindow } void MScanListView::WDStraffic( QString from, QString to, QString viaFrom, QString viaTo ) { QString s; diff --git a/noncore/net/wellenreiter/gui/statwindow.cpp b/noncore/net/wellenreiter/gui/statwindow.cpp index 2c8c774..a9ae661 100644 --- a/noncore/net/wellenreiter/gui/statwindow.cpp +++ b/noncore/net/wellenreiter/gui/statwindow.cpp @@ -17,14 +17,14 @@ #include <opie2/olistview.h> MStatWindow::MStatWindow( QWidget * parent, const char * name, WFlags f ) :QVBox( parent, name, f ) { table = new OListView( this ); - table->addColumn( "Protocol" ); - table->addColumn( "Count" ); + table->addColumn( tr( "Protocol" ) ); + table->addColumn( tr( "Count" ) ); table->setItemMargin( 2 ); }; void MStatWindow::updateCounter( const QString& protocol, int counter ) { diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index c061319..62bda91 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp @@ -165,17 +165,21 @@ void Wellenreiter::receivePacket(OPacket* p) OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) ); int channel = ds ? ds->channel() : -1; OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) ); netView()->addNewItem( type, essid, header->macAddress2().toString(), beacon->canPrivacy(), channel, 0 ); - // do we have a prism header? + // update graph window + if ( ds ) + { OPrismHeaderPacket* prism = static_cast<OPrismHeaderPacket*>( p->child( "Prism" ) ); - if ( ds && prism ) + if ( prism ) graphwindow->traffic( ds->channel(), prism->signalStrength() ); - + else + graphwindow->traffic( ds->channel(), 95 ); + } return; } // check for a data frame OWaveLanDataPacket* data = static_cast<OWaveLanDataPacket*>( p->child( "802.11 Data" ) ); if ( data ) @@ -256,13 +260,14 @@ void Wellenreiter::stopClicked() logwindow->log( "(i) Stopped Scanning." ); assert( parent() ); ( (QMainWindow*) parent() )->setCaption( "Wellenreiter II" ); // message the user - QMessageBox::information( this, "Wellenreiter II", "Your wireless card\nshould now be usable again." ); + QMessageBox::information( this, "Wellenreiter II", + tr( "Your wireless card\nshould now be usable again." ) ); sniffing = false; emit( stoppedSniffing() ); // print out statistics for( QMap<QString,int>::ConstIterator it = pcap->statistics().begin(); it != pcap->statistics().end(); ++it ) @@ -277,13 +282,14 @@ void Wellenreiter::startClicked() const QString& interface = configwindow->interfaceName->currentText(); const int cardtype = configwindow->daemonDeviceType(); const int interval = configwindow->daemonHopInterval(); if ( ( interface == "" ) || ( cardtype == 0 ) ) { - QMessageBox::information( this, "Wellenreiter II", "Your device is not\nproperly configured. Please reconfigure!" ); + QMessageBox::information( this, "Wellenreiter II", + tr( "Your device is not\nproperly configured. Please reconfigure!" ) ); return; } // configure device ONetwork* net = ONetwork::instance(); @@ -294,33 +300,34 @@ void Wellenreiter::startClicked() switch ( cardtype ) { case DEVTYPE_CISCO: iface->setMonitoring( new OCiscoMonitoringInterface( iface ) ); break; case DEVTYPE_WLAN_NG: iface->setMonitoring( new OWlanNGMonitoringInterface( iface ) ); break; case DEVTYPE_HOSTAP: iface->setMonitoring( new OHostAPMonitoringInterface( iface ) ); break; case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface ) ); break; - case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", "Bring your device into\nmonitor mode now." ); break; + case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", tr( "Bring your device into\nmonitor mode now." ) ); break; case DEVTYPE_FILE: qDebug( "Wellenreiter: Capturing from file '%s'", (const char*) interface ); break; default: assert( 0 ); // shouldn't reach this } // switch device into monitor mode if ( cardtype < DEVTYPE_FILE ) { if ( cardtype != DEVTYPE_MANUAL ) iface->setMonitorMode( true ); if ( !iface->monitorMode() ) { - QMessageBox::warning( this, "Wellenreiter II", "Can't set device into monitor mode." ); + QMessageBox::warning( this, "Wellenreiter II", + tr( "Can't set device into monitor mode." ) ); return; } } // open pcap and start sniffing if ( cardtype != DEVTYPE_FILE ) { - if ( configwindow->writeCaptureFile->isEnabled() ) + if ( configwindow->writeCaptureFile->isEnabled() ) //FIXME: bug!? { QString dumpname( configwindow->captureFileName->text() ); dumpname.append( '-' ); dumpname.append( QTime::currentTime().toString().replace( QRegExp( ":" ), "-" ) ); dumpname.append( ".wellenreiter" ); pcap->open( interface, dumpname ); @@ -334,13 +341,14 @@ void Wellenreiter::startClicked() { pcap->open( QFile( interface ) ); } if ( !pcap->isOpen() ) { - QMessageBox::warning( this, "Wellenreiter II", "Can't open packet capturer:\n" + QString(strerror( errno ) )); + QMessageBox::warning( this, "Wellenreiter II", + tr( "Can't open packet capturer:\n" ) + QString(strerror( errno ) )); return; } // set capturer to non-blocking mode pcap->setBlocking( false ); @@ -364,13 +372,13 @@ void Wellenreiter::startClicked() sniffing = true; emit( startedSniffing() ); if ( cardtype != DEVTYPE_FILE ) channelHopped( 6 ); // set title else { assert( parent() ); - ( (QMainWindow*) parent() )->setCaption( "Wellenreiter II - replaying capture file..." ); + ( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) ); } } void Wellenreiter::timerEvent( QTimerEvent* ) { diff --git a/noncore/net/wellenreiter/wellenreiter.pro b/noncore/net/wellenreiter/wellenreiter.pro index eb60c4a..7085c5a 100644 --- a/noncore/net/wellenreiter/wellenreiter.pro +++ b/noncore/net/wellenreiter/wellenreiter.pro @@ -9,6 +9,24 @@ TEMPLATE = subdirs contains( platform, x11 ) { message( Configuring Wellenreiter for build on Qt/X11 ) SUBDIRS = lib gui system( mkdir -p $OPIEDIR/lib $OPIEDIR/bin $OPIEDIR/share/pics ) } +TRANSLATIONS = ../../../i18n/de/wellenreiter.ts \ + ../../../i18n/nl/wellenreiter.ts \ + ../../../i18n/da/wellenreiter.ts \ + ../../../i18n/xx/wellenreiter.ts \ + ../../../i18n/en/wellenreiter.ts \ + ../../../i18n/es/wellenreiter.ts \ + ../../../i18n/fr/wellenreiter.ts \ + ../../../i18n/hu/wellenreiter.ts \ + ../../../i18n/ja/wellenreiter.ts \ + ../../../i18n/ko/wellenreiter.ts \ + ../../../i18n/no/wellenreiter.ts \ + ../../../i18n/pl/wellenreiter.ts \ + ../../../i18n/pt/wellenreiter.ts \ + ../../../i18n/pt_BR/wellenreiter.ts \ + ../../../i18n/sl/wellenreiter.ts \ + ../../../i18n/zh_CN/wellenreiter.ts \ + ../../../i18n/zh_TW/wellenreiter.ts + |