author | llornkcor <llornkcor> | 2002-04-06 22:38:50 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-04-06 22:38:50 (UTC) |
commit | 08f0cefd22cb2122850b0786dafae15d0a5efebb (patch) (side-by-side diff) | |
tree | 9b3b576e557b92e9cb60f97d6a20875968910f1b | |
parent | 6c651fd3b48421fe2fb0f76968c29ef142efc162 (diff) | |
download | opie-08f0cefd22cb2122850b0786dafae15d0a5efebb.zip opie-08f0cefd22cb2122850b0786dafae15d0a5efebb.tar.gz opie-08f0cefd22cb2122850b0786dafae15d0a5efebb.tar.bz2 |
translation stuff
-rw-r--r-- | core/apps/textedit/fileBrowser.cpp | 26 | ||||
-rw-r--r-- | core/apps/textedit/filePermissions.cpp | 12 | ||||
-rw-r--r-- | core/apps/textedit/fileSaver.cpp | 6 | ||||
-rw-r--r-- | core/apps/textedit/fontDialog.cpp | 2 | ||||
-rw-r--r-- | core/apps/textedit/textedit.cpp | 18 |
5 files changed, 32 insertions, 32 deletions
diff --git a/core/apps/textedit/fileBrowser.cpp b/core/apps/textedit/fileBrowser.cpp index b655c96..bc99348 100644 --- a/core/apps/textedit/fileBrowser.cpp +++ b/core/apps/textedit/fileBrowser.cpp @@ -48,7 +48,7 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags : QDialog( parent, name, modal, fl ) { if ( !name ) - setName( "fileBrowser" ); + setName( tr("fileBrowser") ); setCaption(tr( name ) ); // mimeType = mimeFilter; // MimeType mt( mimeType); @@ -120,7 +120,7 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags ListView->setSorting( 2, FALSE); ListView->addColumn( tr( "Size" ) ); ListView->setColumnWidth(1,-1); - ListView->addColumn( "Date",-1); + ListView->addColumn( tr("Date"),-1); ListView->setColumnWidthMode(0,QListView::Manual); ListView->setColumnAlignment(1,QListView::AlignRight); @@ -348,14 +348,14 @@ void fileBrowser::docButtonPushed() { void fileBrowser::selectionChanged( const QString &select ) { - if ( select == "Documents") { + if ( select == tr("Documents")) { FileStack->raiseWidget( fileSelector ); dirPathCombo->hide(); cdUpButton->hide(); docButton->hide(); homeButton->hide(); } else { - if ( select == "All files" ) + if ( select == tr("All files") ) currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::All); else currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); @@ -412,7 +412,7 @@ void fileBrowser::doCd() { void fileBrowser::makDir() { 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 ) { QString filename = fileDlg->LineEdit1->text(); @@ -425,14 +425,14 @@ void fileBrowser::makDir() { void fileBrowser::localRename() { QString curFile = ListView->currentItem()->text(0); InputDialog *fileDlg; - fileDlg = new InputDialog(this,"Rename",TRUE, 0); + fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0); fileDlg->setTextEdit((const QString &) curFile); fileDlg->exec(); if( fileDlg->result() == 1 ) { QString oldname = currentDir.canonicalPath() + "/" + curFile; 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")); } populateList(); } @@ -440,8 +440,8 @@ void fileBrowser::localRename() { void fileBrowser::localDelete() { QString f = ListView->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; QString cmd="rmdir "+f; @@ -454,8 +454,8 @@ void fileBrowser::localDelete() { break; }; } 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; QString cmd="rm "+f; @@ -493,7 +493,7 @@ void fileBrowser::updateMimeTypeMenu() { void fileBrowser::showType(const QString &t) { qDebug(t); - if(t.find("All",0,TRUE) != -1) { + if(t.find(tr("All"),0,TRUE) != -1) { filterStr = "*"; } else { QStringList list = mimetypes.grep( t,TRUE); @@ -605,7 +605,7 @@ InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags : QDialog( parent, name, modal, fl ) { if ( !name ) - setName( "InputDialog" ); + setName( tr("InputDialog") ); resize( 234, 50 ); setMaximumSize( QSize( 240, 50 ) ); setCaption( tr(name ) ); diff --git a/core/apps/textedit/filePermissions.cpp b/core/apps/textedit/filePermissions.cpp index 5af3971..def957b 100644 --- a/core/apps/textedit/filePermissions.cpp +++ b/core/apps/textedit/filePermissions.cpp @@ -35,8 +35,8 @@ filePermissions::filePermissions( QWidget* parent, const char* name, bool modal : QDialog( parent, name, modal, fl ) { if ( !name ) - setName( "filePermissions" ); - qDebug("FilePermissions "+fileName); + setName( tr("filePermissions") ); +// qDebug("FilePermissions "+fileName); resize( 236, 210 ); setMaximumSize( QSize( 236, 210 ) ); setCaption( tr( "Set File Permissions" ) ); @@ -248,25 +248,25 @@ void filePermissions::accept() { pwd = getpwnam(OwnerLineEdit->text().latin1() ); if(pwd == NULL) { perror("getpwnam"); - QMessageBox::warning(this,"Warning","Error- no user"); + QMessageBox::warning(this,tr("Warning"),tr("Error- no user")); return; } else { grp = getgrnam(GroupLineEdit->text().latin1()); if(grp==NULL) { perror("getgrnam"); - QMessageBox::warning(this,"Warning","Error- no group"); + QMessageBox::warning(this,tr("Warning"),tr("Error- no group")); return; } if( chown( file.latin1(), pwd->pw_uid, grp->gr_gid) <0) { perror("chown"); - QMessageBox::warning(this,"Warning","Error setting ownership or group"); + QMessageBox::warning(this,tr("Warning"),tr("Error setting ownership or group")); return; } bool ok; uint moder = modeStr.toUInt(&ok,8); if( chmod( file.latin1(), moder) < 0) { perror("chmod"); - QMessageBox::warning(this,"Warning","Error setting mode"); + QMessageBox::warning(this,tr("Warning"),tr("Error setting mode")); return; } } diff --git a/core/apps/textedit/fileSaver.cpp b/core/apps/textedit/fileSaver.cpp index f2a5355..b1ddc0b 100644 --- a/core/apps/textedit/fileSaver.cpp +++ b/core/apps/textedit/fileSaver.cpp @@ -30,7 +30,7 @@ fileSaver::fileSaver( QWidget* parent, const char* name, bool modal, WFlags fl : QDialog( parent, name, modal, fl ) { if ( !name ) - setName( "fileSaver" ); + setName( tr("fileSaver")); resize( 240, 280 ); setCaption(tr( name ) ); QFileInfo fi(currentFileName); @@ -63,7 +63,7 @@ fileSaver::fileSaver( QWidget* parent, const char* name, bool modal, WFlags fl ListView->setSorting( 2, FALSE); ListView->addColumn( tr( "Size" ) ); ListView->setColumnWidth(1,-1); - ListView->addColumn( "Date",-1); + ListView->addColumn( tr("Date"),-1); ListView->setColumnWidthMode(0,QListView::Manual); ListView->setColumnAlignment(1,QListView::AlignRight); @@ -79,7 +79,7 @@ fileSaver::fileSaver( QWidget* parent, const char* name, bool modal, WFlags fl fileEdit->setText( tmpFileName); filePermCheck = new QCheckBox( this, "SetFilePerms" ); - filePermCheck->setText("set file permissions"); + filePermCheck->setText(tr("set file permissions")); filePermCheck->setGeometry(10, 178, 150,17); // signals and slots connections connect( ListView, SIGNAL(doubleClicked( QListViewItem*)), SLOT(listDoubleClicked(QListViewItem *)) ); diff --git a/core/apps/textedit/fontDialog.cpp b/core/apps/textedit/fontDialog.cpp index e7bd924..681e8a6 100644 --- a/core/apps/textedit/fontDialog.cpp +++ b/core/apps/textedit/fontDialog.cpp @@ -35,7 +35,7 @@ FontDialog::FontDialog( QWidget * parent, const char* name , bool modal, WFlags :QDialog /*QWidget*/( parent, name , modal, fl ) { if ( !name ) - setName( "FontDialog" ); + setName( tr("FontDialog") ); setCaption( tr( "Font Dialog" ) ); FontTextLabel4 = new QLabel( this, "TextLabel4" ); FontTextLabel4->setGeometry( QRect( 145, 100, 30, 19 /*192, 0, 43, 19*/ ) ); diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index d28ece8..6804918 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -335,7 +335,7 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) wa->addTo( font ); font->insertSeparator(); - font->insertItem("Font", this, SLOT(changeFont()) ); + font->insertItem(tr("Font"), this, SLOT(changeFont()) ); font->insertSeparator(); nStart = new QAction( tr("Start with new file"), QString::null, 0, this, 0 ); @@ -493,7 +493,7 @@ void TextEdit::fileNew() void TextEdit::fileOpen() { - browseForFiles=new fileBrowser(this,"Open File",TRUE,0, "text/*"); // + browseForFiles=new fileBrowser(this,tr("Open File"),TRUE,0, "text/*"); // browseForFiles->setFileView( viewSelection ); browseForFiles->showMaximized(); if( browseForFiles->exec() != -1 ) { @@ -534,7 +534,7 @@ void TextEdit::doSearchBar() #if 0 void TextEdit::slotFind() { - FindDialog frmFind( "Text Editor", this ); + FindDialog frmFind( tr("Text Editor"), this ); connect( &frmFind, SIGNAL(signalFindClicked(const QString &, bool, bool, int)), editor, SLOT(slotDoFind( const QString&,bool,bool))); @@ -747,7 +747,7 @@ bool TextEdit::saveAs() QString rt = editor->text(); qDebug(currentFileName); - if( currentFileName.isEmpty() || currentFileName == "Unnamed") { + if( currentFileName.isEmpty() || currentFileName == tr("Unnamed")) { qDebug("do silly TT filename thing"); if ( doc->name().isEmpty() ) { QString pt = rt.simplifyWhiteSpace(); @@ -763,14 +763,14 @@ bool TextEdit::saveAs() if ( docname.length() > 40 ) docname = docname.left(40); if ( docname.isEmpty() ) - docname = "Unnamed"; + docname = tr("Unnamed"); doc->setName(docname); currentFileName=docname; } } - fileSaveDlg=new fileSaver(this,"Save File As?",TRUE, 0, currentFileName); + fileSaveDlg=new fileSaver(this,tr("Save File As?"),TRUE, 0, currentFileName); qDebug("wanna save filename "+currentFileName); fileSaveDlg->exec(); if( fileSaveDlg->result() == 1 ) { @@ -797,7 +797,7 @@ bool TextEdit::saveAs() } if( fileSaveDlg->filePermCheck->isChecked() ) { filePermissions *filePerm; - filePerm = new filePermissions(this, "Permissions",true,0,(const QString &)fileNm); + filePerm = new filePermissions(this, tr("Permissions"),true,0,(const QString &)fileNm); filePerm->exec(); if( filePerm) @@ -888,7 +888,7 @@ void TextEdit::changeFont() { defaultFont = fdb.font(family,style,i_size,charSet); FontDialog *fontDlg; - fontDlg=new FontDialog(this,"FontDialog",TRUE); + fontDlg=new FontDialog(this,tr("FontDialog"),TRUE); fontDlg->exec(); @@ -900,7 +900,7 @@ void TextEdit::changeFont() { void TextEdit::editDelete() { - switch ( QMessageBox::warning(this,"Text Editor","Do you really want\nto delete the current file\nfrom the disk?\nThis is irreversable!!","Yes","No",0,0,1) ) { + switch ( QMessageBox::warning(this,tr("Text Editor"),tr("Do you really want\nto delete the current file\nfrom the disk?\nThis is irreversable!!"),tr("Yes"),tr("No"),0,0,1) ) { case 0: if(doc) { doc->removeFiles(); |