summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-05-03 21:33:49 (UTC)
committer mickeyl <mickeyl>2003-05-03 21:33:49 (UTC)
commit031031a22a8482c674b250c9f32a758f11139aeb (patch) (side-by-side diff)
tree79126fc719c74361eb1966d774cdf75c04c82a7c
parentcbaa70d78b1dccce4dc54baba5fc35431467972f (diff)
downloadopie-031031a22a8482c674b250c9f32a758f11139aeb.zip
opie-031031a22a8482c674b250c9f32a758f11139aeb.tar.gz
opie-031031a22a8482c674b250c9f32a758f11139aeb.tar.bz2
prepare for i18n
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--i18n/da/wellenreiter.ts0
-rw-r--r--i18n/de/wellenreiter.ts0
-rw-r--r--i18n/en/wellenreiter.ts0
-rw-r--r--i18n/es/wellenreiter.ts0
-rw-r--r--i18n/fr/wellenreiter.ts0
-rw-r--r--i18n/hu/wellenreiter.ts0
-rw-r--r--i18n/it/wellenreiter.ts0
-rw-r--r--i18n/ja/wellenreiter.ts0
-rw-r--r--i18n/ko/wellenreiter.ts0
-rw-r--r--i18n/nl/wellenreiter.ts0
-rw-r--r--i18n/no/wellenreiter.ts0
-rw-r--r--i18n/pl/wellenreiter.ts0
-rw-r--r--i18n/pt/wellenreiter.ts0
-rw-r--r--i18n/pt_BR/wellenreiter.ts0
-rw-r--r--i18n/sl/wellenreiter.ts0
-rw-r--r--i18n/xx/wellenreiter.ts0
-rw-r--r--i18n/zh_CN/wellenreiter.ts0
-rw-r--r--i18n/zh_TW/wellenreiter.ts0
-rw-r--r--noncore/net/wellenreiter/gui/main.cpp10
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp43
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp18
-rw-r--r--noncore/net/wellenreiter/gui/statwindow.cpp4
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp32
-rw-r--r--noncore/net/wellenreiter/wellenreiter.pro18
24 files changed, 82 insertions, 43 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
@@ -55,9 +55,9 @@ int main( int argc, char **argv )
// 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;
}
@@ -83,8 +83,8 @@ int main( int argc, char **argv )
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 )
{
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
@@ -102,40 +102,40 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n
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
@@ -155,7 +155,7 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n
// 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() ) );
@@ -230,9 +230,9 @@ QString WellenreiterMainWindow::getFileName( bool save )
map.insert( tr("All"), QStringList() );
QStringList text;
text << "text/*";
- map.insert(tr("Text"), text );
+ map.insert( tr("Text"), text );
text << "*";
- map.insert(tr("All"), text );
+ map.insert( tr("All"), text );
QString str;
if ( save )
@@ -351,7 +351,8 @@ 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
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
@@ -53,9 +53,9 @@ MScanListView::MScanListView( QWidget* parent, const char* name )
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 );
@@ -148,12 +148,12 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo
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 );
@@ -170,6 +170,7 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo
{
s.sprintf( "(i) new adhoc station in '%s' [%d]", (const char*) essid, channel );
}
+ //TODO send s to logwindow
}
@@ -198,6 +199,17 @@ void MScanListView::addIfNotExisting( MScanListItem* network, QString addr, cons
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
}
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
@@ -20,8 +20,8 @@ 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 );
};
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
@@ -168,11 +168,15 @@ void Wellenreiter::receivePacket(OPacket* p)
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?
- OPrismHeaderPacket* prism = static_cast<OPrismHeaderPacket*>( p->child( "Prism" ) );
- if ( ds && prism )
- graphwindow->traffic( ds->channel(), prism->signalStrength() );
-
+ // update graph window
+ if ( ds )
+ {
+ OPrismHeaderPacket* prism = static_cast<OPrismHeaderPacket*>( p->child( "Prism" ) );
+ if ( prism )
+ graphwindow->traffic( ds->channel(), prism->signalStrength() );
+ else
+ graphwindow->traffic( ds->channel(), 95 );
+ }
return;
}
@@ -259,7 +263,8 @@ void Wellenreiter::stopClicked()
( (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() );
@@ -280,7 +285,8 @@ void Wellenreiter::startClicked()
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;
}
@@ -297,7 +303,7 @@ void Wellenreiter::startClicked()
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
}
@@ -309,7 +315,8 @@ void Wellenreiter::startClicked()
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;
}
}
@@ -317,7 +324,7 @@ void Wellenreiter::startClicked()
// 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( '-' );
@@ -337,7 +344,8 @@ void Wellenreiter::startClicked()
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;
}
@@ -367,7 +375,7 @@ void Wellenreiter::startClicked()
else
{
assert( parent() );
- ( (QMainWindow*) parent() )->setCaption( "Wellenreiter II - replaying capture file..." );
+ ( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) );
}
}
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
@@ -12,3 +12,21 @@ contains( platform, x11 ) {
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
+