[PC-BSD Commits] r14689 - pcbsd-projects/EasyPBI

svn at pcbsd.org svn at pcbsd.org
Fri Jan 6 06:28:22 PST 2012


Author: kenmoore
Date: 2012-01-06 14:28:22 +0000 (Fri, 06 Jan 2012)
New Revision: 14689

Modified:
   pcbsd-projects/EasyPBI/Makefile
   pcbsd-projects/EasyPBI/mainwindow.cpp
Log:
Make all the strings for EasyPBI translatable



Modified: pcbsd-projects/EasyPBI/Makefile
===================================================================
--- pcbsd-projects/EasyPBI/Makefile	2012-01-06 11:28:47 UTC (rev 14688)
+++ pcbsd-projects/EasyPBI/Makefile	2012-01-06 14:28:22 UTC (rev 14689)
@@ -1,6 +1,6 @@
 #############################################################################
 # Makefile for building: EasyPBI
-# Generated by qmake (2.01a) (Qt 4.7.4) on: Fri Dec 2 09:21:51 2011
+# Generated by qmake (2.01a) (Qt 4.7.4) on: Fri Jan 6 09:23:15 2012
 # Project:  EasyPBI.pro
 # Template: app
 # Command: /usr/local/bin/qmake-qt4 -o Makefile EasyPBI.pro
@@ -13,7 +13,7 @@
 DEFINES       = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
 CFLAGS        = -pipe -O2 -Wall -W $(DEFINES)
 CXXFLAGS      = -pipe -O2 -Wall -W $(DEFINES)
-INCPATH       = -I../../../../local/share/qt4/mkspecs/freebsd-g++ -I. -I../../../../local/include/qt4/QtCore -I../../../../local/include/qt4/QtNetwork -I../../../../local/include/qt4/QtGui -I../../../../local/include/qt4 -I. -I. -I../../../../local/include/qt4 -I../../../../local/include
+INCPATH       = -I/usr/local/share/qt4/mkspecs/freebsd-g++ -I. -I/usr/local/include/qt4/QtCore -I/usr/local/include/qt4/QtNetwork -I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4 -I. -I. -I/usr/local/include/qt4 -I/usr/local/include
 LINK          = g++
 LFLAGS        = -Wl,-O1 -pthread -Wl,-rpath,/usr/local/lib/qt4
 LIBS          = $(SUBLIBS)  -L/usr/local/lib/qt4 -L/usr/local/lib -lQtGui -L/usr/local/lib/qt4 -L/usr/local/lib -lQtNetwork -lQtCore 
@@ -52,26 +52,26 @@
 		pbi.o \
 		moc_mainwindow.o \
 		qrc_EasyPBI.o
-DIST          = ../../../../local/share/qt4/mkspecs/common/g++.conf \
-		../../../../local/share/qt4/mkspecs/common/unix.conf \
-		../../../../local/share/qt4/mkspecs/qconfig.pri \
-		../../../../local/share/qt4/mkspecs/modules/qt_phonon.pri \
-		../../../../local/share/qt4/mkspecs/modules/qt_webkit_version.pri \
-		../../../../local/share/qt4/mkspecs/features/qt_functions.prf \
-		../../../../local/share/qt4/mkspecs/features/qt_config.prf \
-		../../../../local/share/qt4/mkspecs/features/exclusive_builds.prf \
-		../../../../local/share/qt4/mkspecs/features/default_pre.prf \
-		../../../../local/share/qt4/mkspecs/features/release.prf \
-		../../../../local/share/qt4/mkspecs/features/default_post.prf \
-		../../../../local/share/qt4/mkspecs/features/unix/thread.prf \
-		../../../../local/share/qt4/mkspecs/features/warn_on.prf \
-		../../../../local/share/qt4/mkspecs/features/qt.prf \
-		../../../../local/share/qt4/mkspecs/features/moc.prf \
-		../../../../local/share/qt4/mkspecs/features/resources.prf \
-		../../../../local/share/qt4/mkspecs/features/uic.prf \
-		../../../../local/share/qt4/mkspecs/features/yacc.prf \
-		../../../../local/share/qt4/mkspecs/features/lex.prf \
-		../../../../local/share/qt4/mkspecs/features/include_source_dir.prf \
+DIST          = /usr/local/share/qt4/mkspecs/common/g++.conf \
+		/usr/local/share/qt4/mkspecs/common/unix.conf \
+		/usr/local/share/qt4/mkspecs/qconfig.pri \
+		/usr/local/share/qt4/mkspecs/modules/qt_phonon.pri \
+		/usr/local/share/qt4/mkspecs/modules/qt_webkit_version.pri \
+		/usr/local/share/qt4/mkspecs/features/qt_functions.prf \
+		/usr/local/share/qt4/mkspecs/features/qt_config.prf \
+		/usr/local/share/qt4/mkspecs/features/exclusive_builds.prf \
+		/usr/local/share/qt4/mkspecs/features/default_pre.prf \
+		/usr/local/share/qt4/mkspecs/features/release.prf \
+		/usr/local/share/qt4/mkspecs/features/default_post.prf \
+		/usr/local/share/qt4/mkspecs/features/unix/thread.prf \
+		/usr/local/share/qt4/mkspecs/features/warn_on.prf \
+		/usr/local/share/qt4/mkspecs/features/qt.prf \
+		/usr/local/share/qt4/mkspecs/features/moc.prf \
+		/usr/local/share/qt4/mkspecs/features/resources.prf \
+		/usr/local/share/qt4/mkspecs/features/uic.prf \
+		/usr/local/share/qt4/mkspecs/features/yacc.prf \
+		/usr/local/share/qt4/mkspecs/features/lex.prf \
+		/usr/local/share/qt4/mkspecs/features/include_source_dir.prf \
 		EasyPBI.pro
 QMAKE_TARGET  = EasyPBI
 DESTDIR       = 
@@ -104,50 +104,50 @@
 $(TARGET): ui_mainwindow.h $(OBJECTS)  
 	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
 
-Makefile: EasyPBI.pro  ../../../../local/share/qt4/mkspecs/freebsd-g++/qmake.conf ../../../../local/share/qt4/mkspecs/common/g++.conf \
-		../../../../local/share/qt4/mkspecs/common/unix.conf \
-		../../../../local/share/qt4/mkspecs/qconfig.pri \
-		../../../../local/share/qt4/mkspecs/modules/qt_phonon.pri \
-		../../../../local/share/qt4/mkspecs/modules/qt_webkit_version.pri \
-		../../../../local/share/qt4/mkspecs/features/qt_functions.prf \
-		../../../../local/share/qt4/mkspecs/features/qt_config.prf \
-		../../../../local/share/qt4/mkspecs/features/exclusive_builds.prf \
-		../../../../local/share/qt4/mkspecs/features/default_pre.prf \
-		../../../../local/share/qt4/mkspecs/features/release.prf \
-		../../../../local/share/qt4/mkspecs/features/default_post.prf \
-		../../../../local/share/qt4/mkspecs/features/unix/thread.prf \
-		../../../../local/share/qt4/mkspecs/features/warn_on.prf \
-		../../../../local/share/qt4/mkspecs/features/qt.prf \
-		../../../../local/share/qt4/mkspecs/features/moc.prf \
-		../../../../local/share/qt4/mkspecs/features/resources.prf \
-		../../../../local/share/qt4/mkspecs/features/uic.prf \
-		../../../../local/share/qt4/mkspecs/features/yacc.prf \
-		../../../../local/share/qt4/mkspecs/features/lex.prf \
-		../../../../local/share/qt4/mkspecs/features/include_source_dir.prf \
+Makefile: EasyPBI.pro  /usr/local/share/qt4/mkspecs/freebsd-g++/qmake.conf /usr/local/share/qt4/mkspecs/common/g++.conf \
+		/usr/local/share/qt4/mkspecs/common/unix.conf \
+		/usr/local/share/qt4/mkspecs/qconfig.pri \
+		/usr/local/share/qt4/mkspecs/modules/qt_phonon.pri \
+		/usr/local/share/qt4/mkspecs/modules/qt_webkit_version.pri \
+		/usr/local/share/qt4/mkspecs/features/qt_functions.prf \
+		/usr/local/share/qt4/mkspecs/features/qt_config.prf \
+		/usr/local/share/qt4/mkspecs/features/exclusive_builds.prf \
+		/usr/local/share/qt4/mkspecs/features/default_pre.prf \
+		/usr/local/share/qt4/mkspecs/features/release.prf \
+		/usr/local/share/qt4/mkspecs/features/default_post.prf \
+		/usr/local/share/qt4/mkspecs/features/unix/thread.prf \
+		/usr/local/share/qt4/mkspecs/features/warn_on.prf \
+		/usr/local/share/qt4/mkspecs/features/qt.prf \
+		/usr/local/share/qt4/mkspecs/features/moc.prf \
+		/usr/local/share/qt4/mkspecs/features/resources.prf \
+		/usr/local/share/qt4/mkspecs/features/uic.prf \
+		/usr/local/share/qt4/mkspecs/features/yacc.prf \
+		/usr/local/share/qt4/mkspecs/features/lex.prf \
+		/usr/local/share/qt4/mkspecs/features/include_source_dir.prf \
 		/usr/local/lib/qt4/libQtGui.prl \
 		/usr/local/lib/qt4/libQtCore.prl \
 		/usr/local/lib/qt4/libQtNetwork.prl
 	$(QMAKE) -o Makefile EasyPBI.pro
-../../../../local/share/qt4/mkspecs/common/g++.conf:
-../../../../local/share/qt4/mkspecs/common/unix.conf:
-../../../../local/share/qt4/mkspecs/qconfig.pri:
-../../../../local/share/qt4/mkspecs/modules/qt_phonon.pri:
-../../../../local/share/qt4/mkspecs/modules/qt_webkit_version.pri:
-../../../../local/share/qt4/mkspecs/features/qt_functions.prf:
-../../../../local/share/qt4/mkspecs/features/qt_config.prf:
-../../../../local/share/qt4/mkspecs/features/exclusive_builds.prf:
-../../../../local/share/qt4/mkspecs/features/default_pre.prf:
-../../../../local/share/qt4/mkspecs/features/release.prf:
-../../../../local/share/qt4/mkspecs/features/default_post.prf:
-../../../../local/share/qt4/mkspecs/features/unix/thread.prf:
-../../../../local/share/qt4/mkspecs/features/warn_on.prf:
-../../../../local/share/qt4/mkspecs/features/qt.prf:
-../../../../local/share/qt4/mkspecs/features/moc.prf:
-../../../../local/share/qt4/mkspecs/features/resources.prf:
-../../../../local/share/qt4/mkspecs/features/uic.prf:
-../../../../local/share/qt4/mkspecs/features/yacc.prf:
-../../../../local/share/qt4/mkspecs/features/lex.prf:
-../../../../local/share/qt4/mkspecs/features/include_source_dir.prf:
+/usr/local/share/qt4/mkspecs/common/g++.conf:
+/usr/local/share/qt4/mkspecs/common/unix.conf:
+/usr/local/share/qt4/mkspecs/qconfig.pri:
+/usr/local/share/qt4/mkspecs/modules/qt_phonon.pri:
+/usr/local/share/qt4/mkspecs/modules/qt_webkit_version.pri:
+/usr/local/share/qt4/mkspecs/features/qt_functions.prf:
+/usr/local/share/qt4/mkspecs/features/qt_config.prf:
+/usr/local/share/qt4/mkspecs/features/exclusive_builds.prf:
+/usr/local/share/qt4/mkspecs/features/default_pre.prf:
+/usr/local/share/qt4/mkspecs/features/release.prf:
+/usr/local/share/qt4/mkspecs/features/default_post.prf:
+/usr/local/share/qt4/mkspecs/features/unix/thread.prf:
+/usr/local/share/qt4/mkspecs/features/warn_on.prf:
+/usr/local/share/qt4/mkspecs/features/qt.prf:
+/usr/local/share/qt4/mkspecs/features/moc.prf:
+/usr/local/share/qt4/mkspecs/features/resources.prf:
+/usr/local/share/qt4/mkspecs/features/uic.prf:
+/usr/local/share/qt4/mkspecs/features/yacc.prf:
+/usr/local/share/qt4/mkspecs/features/lex.prf:
+/usr/local/share/qt4/mkspecs/features/include_source_dir.prf:
 /usr/local/lib/qt4/libQtGui.prl:
 /usr/local/lib/qt4/libQtCore.prl:
 /usr/local/lib/qt4/libQtNetwork.prl:

Modified: pcbsd-projects/EasyPBI/mainwindow.cpp
===================================================================
--- pcbsd-projects/EasyPBI/mainwindow.cpp	2012-01-06 11:28:47 UTC (rev 14688)
+++ pcbsd-projects/EasyPBI/mainwindow.cpp	2012-01-06 14:28:22 UTC (rev 14689)
@@ -56,7 +56,7 @@
     dir.root();
     if( !dir.mkdir(PROG_DIR) ){ //Create the program directory
       //Could not create the Program directory
-      QMessageBox::warning(this, "Error: Permissions", "Invalid permissions to create EasyPBI directory in home folder");
+      QMessageBox::warning(this, tr("Error: Permissions"), tr("Invalid permissions to create EasyPBI directory in home folder"));
       return;
     }
   }  
@@ -65,7 +65,7 @@
     dir.root();
     if( !dir.mkdir(MODOUT_DIR) ){ //Create the program directory
       //Could not create the Program directory
-      QMessageBox::warning(this, "Error: Permissions", "Invalid permissions to create EasyPBI directory in home folder");
+      QMessageBox::warning(this, tr("Error: Permissions"), tr("Invalid permissions to create EasyPBI directory in home folder"));
       return;
     }
   }  
@@ -74,7 +74,7 @@
     dir.root();
     if( !dir.mkdir(PBIOUT_DIR) ){ //Create the program directory
       //Could not create the Program directory
-      QMessageBox::warning(this, "Error: Permissions", "Invalid permissions to create EasyPBI directory in home folder");
+      QMessageBox::warning(this, tr("Error: Permissions"), tr("Invalid permissions to create EasyPBI directory in home folder"));
       return;
     }
   }  
@@ -103,7 +103,7 @@
     ui->icon_path->setText("");
     ui->gui_app->setChecked(true);
     ui->website->setText("");
-    ui->status_bar->setText("Please push 'New Module' to get started.");
+    ui->status_bar->setText(tr("Please push 'New Module' to get started."));
     ui->port_selected->setText("");
     //Reset GUI buttons
     ui->gui_app->setEnabled(FALSE);
@@ -122,12 +122,12 @@
 
 void MainWindow::on_actionAbout_EasyPBI_triggered()
 {
-    QMessageBox::about(this, "About EasyPBI", "EasyPBI "+PROGVERSION+"\nCreate PBI modules quickly and easily.\nhttp://makeapbi.sourceforge.net\nWritten by Jesse Smith and Ken Moore");
+    QMessageBox::about(this, tr("About EasyPBI"), tr("EasyPBI ")+PROGVERSION+tr("\nCreate PBI modules quickly and easily.\nhttp://makeapbi.sourceforge.net\nWritten by Jesse Smith and Ken Moore"));
 }
 
 void MainWindow::on_actionAppCafe_Integration_triggered(){
-  QString instructions = "Steps to integrate your PBI modules with the official PC-BSD Repository:\n\n  1) Ensure the module works by building and testing the PBI with EasyPBI, making adjustments to the module as needed.\n  2) Check that the module does not already exist in the PC-BSD repository at: http://trac.pcbsd.org/browser/pbi/modules\n  3) E-mail the compressed module file to: pbi-dev at lists.pcbsd.org\nThe module will require re-compression (tar czf 'new-filename.tar.gz' 'module-directory') if modifications were made to the module.\n\nTo place the module into an alternate PBI repository, please contact the maintainer of that repository for instructions.";
-  QMessageBox::about(this, "EasyPBI: AppCafe Integration", instructions);
+  QString instructions = tr("Steps to integrate your PBI modules with the official PC-BSD Repository:\n\n  1) Ensure the module works by building and testing the PBI with EasyPBI, making adjustments to the module as needed.\n  2) Check that the module does not already exist in the PC-BSD repository at: http://trac.pcbsd.org/browser/pbi/modules\n  3) E-mail the compressed module file to: pbi-dev at lists.pcbsd.org\nThe module will require re-compression (tar czf 'new-filename.tar.gz' 'module-directory') if modifications were made to the module.\n\nTo place the module into an alternate PBI repository, please contact the maintainer of that repository for instructions.");
+  QMessageBox::about(this, tr("EasyPBI: AppCafe Integration"), instructions);
 }
 
 void MainWindow::on_pushNewModule_clicked()
@@ -146,13 +146,13 @@
     if (!Check_For_Ports(true)){return;}
 
     // get new port to work on
-    module_path = QFileDialog::getExistingDirectory(this, "Select Port", PORTS_DIR);
+    module_path = QFileDialog::getExistingDirectory(this, tr("Select Port"), PORTS_DIR);
     if(module_path.isEmpty()){return;} //action cancelled or closed
     PORT_SELECTED = module_path.section("ports/",1,1);
     pbi_data = Init_Data();
     if (! pbi_data)
     {
-        QMessageBox::about(this, "Error", "Could not set up memory for this module.");
+        QMessageBox::about(this, tr("Error"), tr("Could not set up memory for this module."));
 	return;
     }
     // get the name, arguments
@@ -162,7 +162,7 @@
     status = Port_Exists(pbi_data);
     if (! status)
     {
-        QMessageBox::about(this, "Error", "This port does not exist.");
+        QMessageBox::about(this, tr("Error"), tr("This port does not exist."));
         Clean_Up(pbi_data, TRUE);
         return;
     }
@@ -178,7 +178,7 @@
         ui->icon_path->setText(pbi_data->icon_name);
     ui->port_name->setText(pbi_data->port_name);
     ui->website->setText(pbi_data->web_site);
-    ui->status_bar->setText("Please fill out the above fields and click Create Module.");
+    ui->status_bar->setText(tr("Please fill out the above fields and click \"Create Module\"."));
     //Enable the GUI Buttons
     ui->gui_app->setEnabled(TRUE);
     ui->create_button->setEnabled(TRUE);
@@ -201,11 +201,11 @@
 
     if (! pbi_data)
     {
-        QMessageBox::about(this, "Error", "Please push 'New Module' first.");
+        QMessageBox::about(this, tr("Error"), tr("Please push 'New Module' first."));
         return;
     }
     // find where we want to save the module
-    ui->status_bar->setText("Please wait while we build the module...");
+    ui->status_bar->setText(tr("Please wait while the module is created..."));
     // save text fields to data structure
     if (pbi_data->author_name) free(pbi_data->author_name);
     if (pbi_data->category) free(pbi_data->category);
@@ -259,7 +259,7 @@
 {
    //Check if a port is selected
    if(! pbi_data){
-     QMessageBox::warning(this, "Error: Port Information", "Please select a port first");
+     QMessageBox::warning(this, tr("Error: Port Information"), tr("Please select a port first"));
      return;
    }
    //Open up the freshports.org page for the selected port
@@ -282,7 +282,7 @@
     }
     //No ports tree detected - Display warning
     if (show_warning)
-        QMessageBox::warning(this, "Ports Not Installed","The FreeBSD ports tree is not installed for this system or user.\nPlease Install the ports tree as root to make it available for all users, or push 'File'->'Get Ports' to retrieve the ports tree for this user ONLY");
+        QMessageBox::warning(this, tr("Ports Not Installed"),tr("The FreeBSD ports tree is not installed for this system or user.\nPlease Install the ports tree as root to make it available for all users, or push 'File'->'Get Ports' to retrieve the ports tree for this user ONLY"));
     return FALSE;
 }
 
@@ -291,12 +291,12 @@
     //Check to see if the ports are already installed
     if(Check_For_Ports(false)){
       if(PORTS_DIR=="/usr/ports"){
-	QMessageBox::warning(this, "Ports Installed","The FreeBSD ports tree is already available on this system");
+	QMessageBox::warning(this, tr("Ports Installed"),tr("The FreeBSD ports tree is already available on this system\nTo update: run \"portsnap fetch extract\" as root"));
 	return;
       }else{
 	QMessageBox verify;
-	verify.setText("The FreeBSD ports tree is already available for this user");
-	verify.setInformativeText("Do you wish to update the user ports tree? (requires re-download)");
+	verify.setText(tr("The FreeBSD ports tree is already available for this user"));
+	verify.setInformativeText(tr("Do you wish to update the user ports tree? (requires re-download)"));
 	verify.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
 	verify.setDefaultButton(QMessageBox::Yes);
 	int ret = verify.exec();
@@ -312,7 +312,7 @@
     connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(downloadFinished(QNetworkReply*)) );
     currentDL = manager->get(QNetworkRequest(QUrl("ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/ports.tar.gz")));
     
-    ui->status_bar->setText("Downloading the FreeBSD ports tree: Please Wait.");
+    ui->status_bar->setText(tr("Downloading the FreeBSD ports tree: Please Wait."));
     
     //Make the Progress Bar visible and start updating
     ui->progressBar->setValue(0);
@@ -326,13 +326,13 @@
   //See if the Download was successful
   qDebug() << "Ports download completion code:" << reply->error();
   if( reply->error() != QNetworkReply::NoError){
-    QMessageBox::warning(this, "Download Failed","Downloading the FreeBSD ports tree failed. Please try again.");
+    QMessageBox::warning(this, tr("Download Failed"),tr("Downloading the FreeBSD ports tree failed. Please try again."));
     return;
   }
   //Download Succesful, save it to file
   QFile file(PROG_DIR+"/ports.tar.gz");
   if( !file.open(QIODevice::WriteOnly)){   //if file could not be opened
-    QMessageBox::warning(this, "Saving Failed","Saving the FreeBSD ports tree file failed. Please try again.");
+    QMessageBox::warning(this, tr("Saving Failed"),tr("Saving the FreeBSD ports tree file failed. Please try again."));
     reply->deleteLater();
     return;
   }
@@ -340,7 +340,7 @@
   file.close();
   //Saving the file successful, delete the downloaded data from memory
   reply->deleteLater();
-  ui->status_bar->setText("Download finished. Extracting the ports tree into the EasyPBI directory.");
+  ui->status_bar->setText(tr("Download finished. Extracting the ports tree into the EasyPBI directory."));
   QTimer::singleShot(10,this, SLOT(extractPT()) );
   return;
 }
@@ -359,7 +359,7 @@
   QFile file(PROG_DIR+"/ports.tar.gz");  
   file.remove();
   //Let the user know that the ports tree was successfully added
-  ui->status_bar->setText("The FreeBSD ports tree has been successfully added to the EasyPBI directory.\nPlease select 'New Module' from the file menu to continue.");
+  ui->status_bar->setText(tr("The FreeBSD ports tree has been successfully added to the EasyPBI directory.\nPlease select 'New Module' from the file menu to continue."));
   return;
 }
 
@@ -373,7 +373,7 @@
 
 void MainWindow::on_pushChangeOutDir_clicked(){
   QString outDir_path; 
-  outDir_path = QFileDialog::getExistingDirectory(this,"Select PBI Output Directory",PROG_DIR+"/PBI");
+  outDir_path = QFileDialog::getExistingDirectory(this,tr("Select PBI Output Directory"),PROG_DIR+"/PBI");
   if(outDir_path.isEmpty()){return;} //action cancelled or closed
   PBIOUT_DIR = outDir_path;
   ui->linePBIOutDir->setText(outDir_path);
@@ -381,7 +381,7 @@
 
 void MainWindow::on_pushChangeSigFile_clicked(){
   QString outDir_path;
-  outDir_path = QFileDialog::getOpenFileName(this, "Select Digital Signiture File", PROG_DIR,"Signature Files (*)");
+  outDir_path = QFileDialog::getOpenFileName(this, tr("Select Digital Signiture File"), PROG_DIR,tr("Signature Files (*)"));
   if(outDir_path.isEmpty()){return;} //action cancelled or closed
   PBIOUT_DIR = outDir_path;
   ui->linePBIDigSigFile->setText(outDir_path);
@@ -393,7 +393,7 @@
   file->open(QIODevice::WriteOnly);
   QTextStream out(file);
   //Save the default lines
-  out << "PBI default build settings: ---DELETE TO RESET DEFAULTS, DO NOT MODIFY--\n";
+  out << "PBI default build settings: ---DELETE FILE TO RESET DEFAULTS, DO NOT MODIFY--\n";
   out << PROGVERSION+"\n";
   out << ui->linePBIOutDir->text() + "\n";
   out << ui->linePBIDigSigFile->text() + "\n";
@@ -402,7 +402,7 @@
   
   file->close();
   //Inform the user that the save is complete
-  QMessageBox::information(this, "Settings Saved","PBI build settings successfully saved as the user defaults.");
+  QMessageBox::information(this, tr("Settings Saved"),tr("PBI build settings successfully saved as the user defaults."));
 }
 
 void MainWindow::loadPBISettings(){
@@ -426,7 +426,7 @@
 
 void MainWindow::on_pushSelectModule_clicked(){
   QString outDir_path;
-  outDir_path = QFileDialog::getExistingDirectory(this, "Select Module to Build", PROG_DIR+"/Modules");
+  outDir_path = QFileDialog::getExistingDirectory(this, tr("Select Module to Build"), PROG_DIR+"/Modules");
   if(outDir_path.isEmpty()){return;} //action cancelled or closed
   ui->linePBIModuleSelected->setText(outDir_path);
   ui->pushBuildPBI->setEnabled(TRUE);
@@ -445,15 +445,15 @@
   QString modDir = ui->linePBIModuleSelected->text();
   if(modDir.isEmpty()){gostatus=FALSE;}
   if(!gostatus){
-    QMessageBox::warning(this,"Error","Invalid PBI Settings");
+    QMessageBox::warning(this,tr("Error"),tr("Invalid PBI Settings"));
     return;
   }
   
   //Receive User verification before beginning build process due to:
   //  -- long time required, internet connection required, root permissions required
   QMessageBox verify;
-  verify.setText("Are you sure you wish to start the PBI build?");
-  verify.setInformativeText("This requires an active internet connection and root permissions. The time required to build a PBI varies depending upon system specifications and ports to be compiled.");
+  verify.setText(tr("Are you sure you wish to start the PBI build?"));
+  verify.setInformativeText(tr("This requires an active internet connection and root permissions. The time required to build a PBI varies depending upon system specifications and ports to be compiled."));
   verify.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
   verify.setDefaultButton(QMessageBox::Yes);
   int ret = verify.exec();
@@ -503,12 +503,12 @@
   qDebug() << "PBI build process Finished" << exitStatus << exitCode;
   if(exitCode == 0){
     if(exitStatus==QProcess::NormalExit){
-      QMessageBox::information(this,"PBI Build Success","The PBI finished building successfully");
+      QMessageBox::information(this,tr("PBI Build Success"),tr("The PBI finished building successfully"));
     }else{
       //The user killed the process - No Message
     }
   }else{
-    QMessageBox::warning(this,"PBI Build Failure","The PBI failed to build.\nPlease check the build log to find the cause of the failure and adjust the module accordingly");
+    QMessageBox::warning(this,tr("PBI Build Failure"),tr("The PBI failed to build.\nPlease check the build log to find the cause of the failure and adjust the module accordingly"));
   }
   ui->pushBuildPBI->setEnabled(TRUE);
   ui->pushSaveLog->setEnabled(TRUE);
@@ -530,7 +530,7 @@
 
 void MainWindow::on_pushSaveLog_clicked(){
   //Have user select a filename/location to save the log
-  QString filename = QFileDialog::getSaveFileName(this,"Save Log",PROG_DIR+"/build.log","Log Files (*.log *.txt)");
+  QString filename = QFileDialog::getSaveFileName(this,tr("Save Log"),PROG_DIR+"/build.log",tr("Log Files (*.log *.txt)"));
   if(filename.isEmpty()){return;} //User cancelled the process
   //Open the file (as new)
   QFile *file = new QFile(filename);



More information about the Commits mailing list