summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-03-19 00:26:23 (UTC)
committer llornkcor <llornkcor>2002-03-19 00:26:23 (UTC)
commit7ac89ca47c72729aad8a5a91c8be6ce9c223ab9c (patch) (side-by-side diff)
tree0c21354e3bccba0a1235eaecb155155f927e5744
parentfbe272267851eeda20bf48aee9a01ac4dd1143c2 (diff)
downloadopie-7ac89ca47c72729aad8a5a91c8be6ce9c223ab9c.zip
opie-7ac89ca47c72729aad8a5a91c8be6ce9c223ab9c.tar.gz
opie-7ac89ca47c72729aad8a5a91c8be6ce9c223ab9c.tar.bz2
added translation stuff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieftp/inputDialog.cpp2
-rw-r--r--noncore/net/opieftp/opieftp.cpp90
-rw-r--r--noncore/net/opieftp/opieftp.pro2
3 files changed, 47 insertions, 47 deletions
diff --git a/noncore/net/opieftp/inputDialog.cpp b/noncore/net/opieftp/inputDialog.cpp
index 22205d3..89b345e 100644
--- a/noncore/net/opieftp/inputDialog.cpp
+++ b/noncore/net/opieftp/inputDialog.cpp
@@ -24,5 +24,5 @@ InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags
{
if ( !name )
- setName( "InputDialog" );
+ setName( "InputDialog" );
resize( 234, 50 );
setMaximumSize( QSize( 240, 50 ) );
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index 814d706..f70011b 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -121,8 +121,8 @@ OpieFtp::OpieFtp( )
Local_View = new QListView( tab, "Local_View" );
// Local_View->setResizePolicy( QListView::AutoOneFit );
- Local_View->addColumn( "File",120);
- Local_View->addColumn( "Size",-1);
+ Local_View->addColumn( tr("File"),120);
+ Local_View->addColumn( tr("Size"),-1);
Local_View->setColumnAlignment(1,QListView::AlignRight);
- Local_View->addColumn( "Date",-1);
+ Local_View->addColumn( tr("Date"),-1);
Local_View->setColumnAlignment(2,QListView::AlignRight);
Local_View->setAllColumnsShowFocus(TRUE);
@@ -144,8 +144,8 @@ OpieFtp::OpieFtp( )
Remote_View = new QListView( tab_2, "Remote_View" );
- Remote_View->addColumn( "File",120);
- Remote_View->addColumn( "Size",-1);
+ Remote_View->addColumn( tr("File"),120);
+ Remote_View->addColumn( tr("Size"),-1);
Remote_View->setColumnAlignment(1,QListView::AlignRight);
- Remote_View->addColumn( "Date",-1);
+ Remote_View->addColumn( tr("Date"),-1);
Remote_View->setColumnAlignment(2,QListView::AlignRight);
Remote_View->setAllColumnsShowFocus(TRUE);
@@ -303,7 +303,7 @@ void OpieFtp::localUpload()
if( !FtpPut( localFile.latin1(), remoteFile.latin1(),FTPLIB_IMAGE, conn ) ) {
QString msg;
- msg.sprintf("Unable to upload\n%s",FtpLastResponse(conn));
+ msg.sprintf(tr("Unable to upload\n")+"%s",FtpLastResponse(conn));
msg.replace(QRegExp(":"),"\n");
- QMessageBox::message("Note",msg);
+ QMessageBox::message(tr("Note"),msg);
// FtpQuit(conn);
}
@@ -311,5 +311,5 @@ void OpieFtp::localUpload()
nullifyCallBack();
} else {
- QMessageBox::message("Note","Cannot upload directories");
+ QMessageBox::message(tr("Note"),tr("Cannot upload directories"));
}
TabWidget->setCurrentPage(1);
@@ -352,7 +352,7 @@ void OpieFtp::remoteDownload()
if(!FtpGet( localFile.latin1(), remoteFile.latin1(),FTPLIB_IMAGE, conn ) ) {
QString msg;
- msg.sprintf("Unable to download \n%s",FtpLastResponse(conn));
+ msg.sprintf(tr("Unable to download \n")+"%s",FtpLastResponse(conn));
msg.replace(QRegExp(":"),"\n");
- QMessageBox::message("Note",msg);
+ QMessageBox::message(tr("Note"),msg);
// FtpQuit(conn);
}
@@ -376,5 +376,5 @@ void OpieFtp::connector()
currentRemoteDir=remotePath->text();
if(ServerComboBox->currentText().isEmpty()) {
- QMessageBox::warning(this,"Ftp","Please set the server info","Ok",0,0);
+ QMessageBox::warning(this,tr("Ftp"),tr("Please set the server info"),tr("Ok"),0,0);
TabWidget->setCurrentPage(2);
ServerComboBox->setFocus();
@@ -393,12 +393,12 @@ void OpieFtp::connector()
ftp_host+=":"+port;
if (!FtpConnect( ftp_host.latin1(), &conn)) {
- QMessageBox::message("Note","Unable to connect to\n"+ftp_host);
+ QMessageBox::message(tr("Note"),tr("Unable to connect to\n")+ftp_host);
return ;
}
if (!FtpLogin( ftp_user.latin1(), ftp_pass.latin1(),conn )) {
QString msg;
- msg.sprintf("Unable to log in\n%s",FtpLastResponse(conn));
+ msg.sprintf(tr("Unable to log in\n")+"%s",FtpLastResponse(conn));
msg.replace(QRegExp(":"),"\n");
- QMessageBox::message("Note",msg);
+ QMessageBox::message(tr("Note"),msg);
FtpQuit(conn);
return ;
@@ -428,7 +428,7 @@ bool OpieFtp::remoteDirList(const QString &dir)
if (!FtpDir( tmp.latin1(), dir.latin1(), conn) ) {
QString msg;
- msg.sprintf("Unable to list the directory\n"+dir+"\n%s",FtpLastResponse(conn) );
+ msg.sprintf(tr("Unable to list the directory\n")+dir+"\n%s",FtpLastResponse(conn) );
msg.replace(QRegExp(":"),"\n");
- QMessageBox::message("Note",msg);
+ QMessageBox::message(tr("Note"),msg);
// FtpQuit(conn);
return false;
@@ -444,7 +444,7 @@ bool OpieFtp::remoteChDir(const QString &dir)
if (!FtpChdir( dir.latin1(), conn )) {
QString msg;
- msg.sprintf("Unable to change directories\n"+dir+"\n%s",FtpLastResponse(conn));
+ msg.sprintf(tr("Unable to change directories\n")+dir+"\n%s",FtpLastResponse(conn));
msg.replace(QRegExp(":"),"\n");
- QMessageBox::message("Note",msg);
+ QMessageBox::message(tr("Note"),msg);
qDebug(msg);
// FtpQuit(conn);
@@ -562,7 +562,7 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem)
if( FtpCDUp( conn) == 0) {
QString msg;
- msg.sprintf("Unable to cd up\n%s",FtpLastResponse(conn));
+ msg.sprintf(tr("Unable to cd up\n")+"%s",FtpLastResponse(conn));
msg.replace(QRegExp(":"),"\n");
- QMessageBox::message("Note",msg);
+ QMessageBox::message(tr("Note"),msg);
qDebug(msg);
}
@@ -570,7 +570,7 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem)
if( FtpPwd( path,sizeof(path),conn) == 0) { //this is easier than fudging the string
QString msg;
- msg.sprintf("Unable to get working dir\n%s",FtpLastResponse(conn));
+ msg.sprintf(tr("Unable to get working dir\n")+"%s",FtpLastResponse(conn));
msg.replace(QRegExp(":"),"\n");
- QMessageBox::message("Note",msg);
+ QMessageBox::message(tr("Note"),msg);
qDebug(msg);
}
@@ -732,5 +732,5 @@ void OpieFtp::localMakDir()
{
InputDialog *fileDlg;
- fileDlg = new InputDialog(this,"Make Directory",TRUE, 0);
+ fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0);
fileDlg->exec();
if( fileDlg->result() == 1 ) {
@@ -745,6 +745,6 @@ void OpieFtp::localDelete()
QString f = Local_View->currentItem()->text(0);
if(QDir(f).exists() ) {
- switch ( QMessageBox::warning(this,"Delete","Do you really want to delete\n"+f+
- " ?\nIt must be empty","Yes","No",0,0,1) ) {
+ switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+
+ tr(" ?\nIt must be empty"),tr("Yes"),tr("No"),0,0,1) ) {
case 0: {
f=currentDir.canonicalPath()+"/"+f;
@@ -760,6 +760,6 @@ void OpieFtp::localDelete()
} else {
- switch ( QMessageBox::warning(this,"Delete","Do you really want to delete\n"+f
- +" ?","Yes","No",0,0,1) ) {
+ switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f
+ +" ?",tr("Yes"),tr("No"),0,0,1) ) {
case 0: {
f=currentDir.canonicalPath()+"/"+f;
@@ -779,5 +779,5 @@ void OpieFtp::remoteMakDir()
{
InputDialog *fileDlg;
- fileDlg = new InputDialog(this,"Make Directory",TRUE, 0);
+ fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0);
fileDlg->exec();
if( fileDlg->result() == 1 ) {
@@ -787,7 +787,7 @@ void OpieFtp::remoteMakDir()
if(FtpMkdir( tmp.latin1(), conn) == 0) {
QString msg;
- msg.sprintf("Unable to make directory\n%s",FtpLastResponse(conn));
+ msg.sprintf(tr("Unable to make directory\n")+"%s",FtpLastResponse(conn));
msg.replace(QRegExp(":"),"\n");
- QMessageBox::message("Note",msg);
+ QMessageBox::message(tr("Note"),msg);
}
QCopEnvelope ( "QPE/System", "notBusy()" );
@@ -802,13 +802,13 @@ void OpieFtp::remoteDelete()
if( f.right(1) =="/") {
QString path= currentRemoteDir+f;
- switch ( QMessageBox::warning(this,"Delete","Do you really want to delete\n"+f+"?"
- ,"Yes","No",0,0,1) ) {
+ switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+"?"
+ ,tr("Yes"),tr("No"),0,0,1) ) {
case 0: {
f=currentDir.canonicalPath()+"/"+f;
if(FtpRmdir( path.latin1(), conn) ==0) {
QString msg;
- msg.sprintf("Unable to remove directory\n%s",FtpLastResponse(conn));
+ msg.sprintf(tr("Unable to remove directory\n")+"%s",FtpLastResponse(conn));
msg.replace(QRegExp(":"),"\n");
- QMessageBox::message("Note",msg);
+ QMessageBox::message(tr("Note"),msg);
}
remoteDirList( (const QString &)currentRemoteDir); //this also calls populate
@@ -818,13 +818,13 @@ void OpieFtp::remoteDelete()
};
} else {
- switch ( QMessageBox::warning(this,"Delete","Do you really want to delete\n"+f+"?"
- ,"Yes","No",0,0,1) ) {
+ switch ( QMessageBox::warning(this,tr("Delete"),tr("Do you really want to delete\n")+f+"?"
+ ,tr("Yes"),tr("No"),0,0,1) ) {
case 0: {
QString path= currentRemoteDir+f;
if(FtpDelete( path.latin1(), conn)==0) {
QString msg;
- msg.sprintf("Unable to delete file\n%s",FtpLastResponse(conn));
+ msg.sprintf(tr("Unable to delete file\n")+"%s",FtpLastResponse(conn));
msg.replace(QRegExp(":"),"\n");
- QMessageBox::message("Note",msg);
+ QMessageBox::message(tr("Note"),msg);
}
remoteDirList( (const QString &)currentRemoteDir); //this also calls populate
@@ -840,5 +840,5 @@ void OpieFtp::remoteRename()
QString curFile = Remote_View->currentItem()->text(0);
InputDialog *fileDlg;
- fileDlg = new InputDialog(this,"Rename",TRUE, 0);
+ fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0);
fileDlg->inputText = curFile;
fileDlg->exec();
@@ -849,7 +849,7 @@ void OpieFtp::remoteRename()
if(FtpRename( oldName.latin1(), newName.latin1(),conn) == 0) {
QString msg;
- msg.sprintf("Unable to rename file\n%s",FtpLastResponse(conn));
+ msg.sprintf(tr("Unable to rename file\n")+"%s",FtpLastResponse(conn));
msg.replace(QRegExp(":"),"\n");
- QMessageBox::message("Note",msg);
+ QMessageBox::message(tr("Note"),msg);
}
QCopEnvelope ( "QPE/System", "notBusy()" );
@@ -862,5 +862,5 @@ void OpieFtp::localRename()
QString curFile = Local_View->currentItem()->text(0);
InputDialog *fileDlg;
- fileDlg = new InputDialog(this,"Rename",TRUE, 0);
+ fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0);
fileDlg->inputText = curFile;
fileDlg->exec();
@@ -869,5 +869,5 @@ void OpieFtp::localRename()
QString newName = currentDir.canonicalPath() + "/" + fileDlg->LineEdit1->text();//+".playlist";
if( rename(oldname.latin1(), newName.latin1())== -1)
- QMessageBox::message("Note","Could not rename");
+ QMessageBox::message(tr("Note"),tr("Could not rename"));
}
populateLocalView();
@@ -883,5 +883,5 @@ void OpieFtp::currentPathEditChanged()
populateLocalView();
} else {
- QMessageBox::message("Note","That directory does not exist");
+ QMessageBox::message(tr("Note"),tr("That directory does not exist"));
}
}
diff --git a/noncore/net/opieftp/opieftp.pro b/noncore/net/opieftp/opieftp.pro
index f485cdf..147a8c5 100644
--- a/noncore/net/opieftp/opieftp.pro
+++ b/noncore/net/opieftp/opieftp.pro
@@ -10,3 +10,3 @@ DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe
-TRANSLATIONS = ../../i18n/pt_BR/opieftp.ts
+TRANSLATIONS += ../../i18n/pt_BR/opieftp.ts