Changeset 834

Show
Ignore:
Timestamp:
08/18/08 16:26:26 (3 months ago)
Author:
liamstask
Message:

- adding tags for translation in source & first translation file
- bumping version number in .pro

Location:
mcbuilder/trunk
Files:
2 added
7 modified

Legend:

Unmodified
Added
Removed
  • mcbuilder/trunk/mcbuilder.pro

    r799 r834  
    1 MCBUILDER_VERSION = "0.2.0" 
     1MCBUILDER_VERSION = "0.5.0" 
    22TEMPLATE = app 
    33#CONFIG += release 
     
    3939          src/BuildLog.cpp \ 
    4040          src/ProjectManager.cpp 
     41           
     42TRANSLATIONS = translations/mcbuilder_fr.ts 
    4143 
    4244TARGET = mcbuilder 
  • mcbuilder/trunk/src/About.cpp

    r797 r834  
    2828  verticalLayout->addWidget(&body); 
    2929  body.setOpenExternalLinks(true); 
    30   versionLabel->setText(QString("<font size=6>mcbuilder</font><br>Version %1").arg(MCBUILDER_VERSION)); 
    31   body.append(QString("By <a href=\"http://www.makingthings.com\">MakingThings</a>, %1.<br>").arg(QDate::currentDate().toString("yyyy"))); 
    32   body.append("Thanks to Erik Gilling for <a href=\"http://oss.tekno.us/sam7utils\">sam7utils</a>.<br>"); 
    33   body.append("Thanks to Michael Fischer for <a href=\"http://www.yagarto.de\">Yagarto</a>.<br>"); 
    34   body.append("Application icon by <a href=\"http://cultivatestudios.com\">Cultivate Studios</a>.<br>"); 
    35   body.append("Toolbar icons by <a href=\"http://www.mattballdesign.com\">Matt Ball</a> and <a href=\"http://cultivatestudios.com\">Cultivate Studios</a>."); 
     30  versionLabel->setText(tr("<font size=6>mcbuilder</font><br>Version %1").arg(MCBUILDER_VERSION)); 
     31  body.append(tr("By <a href=\"http://www.makingthings.com\">MakingThings</a>, %1.<br>").arg(QDate::currentDate().toString("yyyy"))); 
     32  body.append(tr("Thanks to Erik Gilling for <a href=\"http://oss.tekno.us/sam7utils\">sam7utils</a>.<br>")); 
     33  body.append(tr("Thanks to Michael Fischer for <a href=\"http://www.yagarto.de\">Yagarto</a>.<br>")); 
     34  body.append(tr("Application icon by <a href=\"http://cultivatestudios.com\">Cultivate Studios</a>.<br>")); 
     35  body.append(tr("Toolbar icons by <a href=\"http://www.mattballdesign.com\">Matt Ball</a> and <a href=\"http://cultivatestudios.com\">Cultivate Studios</a>.")); 
    3636} 
    3737 
  • mcbuilder/trunk/src/AppUpdater.cpp

    r805 r834  
    3232{ 
    3333  setModal( true ); 
    34   setWindowTitle( "Software Update" ); 
     34  setWindowTitle( tr("Software Update") ); 
    3535   
    3636  acceptButton.setDefault( true ); 
     
    8282  if (!doc.setContent(http.readAll(), true, &err, &line, &col)) 
    8383  { 
    84     headline.setText( "<font size=4>Couldn't contact the update server...</font>" ); 
    85     details.setText( QString( "Make sure you're connected to the internet." ) ); 
     84    headline.setText( tr("<font size=4>Couldn't contact the update server...</font>") ); 
     85    details.setText( tr( "Make sure you're connected to the internet." ) ); 
    8686    acceptButton.setText( tr("OK") ); 
    8787    acceptButton.disconnect( ); // make sure it wasn't connected by anything else previously 
     
    133133  if( updateAvailable ) 
    134134  { 
    135     headline.setText( "<font size=4>A new version of mcbuilder is available!</font>" ); 
    136     QString d = QString( "mcbuilder %1 is now available (you have %2).  Would you like to download it?" ) 
     135    headline.setText( tr("<font size=4>A new version of mcbuilder is available!</font>" )); 
     136    QString d = tr( "mcbuilder %1 is now available (you have %2).  Would you like to download it?" ) 
    137137                          .arg(latest.first).arg( MCBUILDER_VERSION ); 
    138138    details.setText( d ); 
     
    152152  else 
    153153  { 
    154     headline.setText( "<font size=4>You're up to date!</font>" ); 
    155     details.setText( QString( "You're running the latest version of mcbuilder, version %1." ).arg( MCBUILDER_VERSION ) ); 
     154    headline.setText( tr("<font size=4>You're up to date!</font>") ); 
     155    details.setText( tr( "You're running the latest version of mcbuilder, version %1." ).arg( MCBUILDER_VERSION ) ); 
    156156    acceptButton.setText( tr("OK") ); 
    157157    acceptButton.disconnect( ); 
  • mcbuilder/trunk/src/Builder.cpp

    r807 r834  
    5454  { 
    5555    createConfigFile(currentProjectPath);      // create a config file based on the Properties for this project 
    56     qDebug("creating/updating config file"); 
     56    qDebug("builder - creating/updating config file"); 
    5757  } 
    5858  createMakefile(currentProjectPath);        // create a Makefile for this project, given the dependencies 
     
    138138        if(filesize <= 256000) 
    139139        { 
    140           mainWindow->printOutput(QString("%1.bin is %2 out of a possible 256000 bytes.").arg(projectName).arg(filesize)); 
     140          mainWindow->printOutput(tr("%1.bin is %2 out of a possible 256000 bytes.").arg(projectName).arg(filesize)); 
    141141          mainWindow->onBuildComplete(true); 
    142142          success = true; 
    143143        } 
    144144        else 
    145           mainWindow->printOutputError(QString("Error - %1.bin is too big!  %2 out of a possible 256000 bytes.").arg(projectName).arg(filesize)); 
     145          mainWindow->printOutputError(tr("Error - %1.bin is too big!  %2 out of a possible 256000 bytes.").arg(projectName).arg(filesize)); 
    146146      } 
    147147      if(!success) 
     
    181181    QTextStream tofile(&makefile); 
    182182    tofile << "##################################################################################################" << endl; 
    183     tofile << "#" << endl << "# This file generated automatically by mcbuilder - "; 
     183    tofile << "#" << endl << tr("# This file generated automatically by mcbuilder - "); 
    184184    tofile << QDateTime::currentDateTime().toString("MMM d, yyyy h:m ap") << endl; 
    185     tofile << "# Any manual changes made to this file will be overwritten the next time mcbuilder builds." << endl << "#" << endl; 
     185    tofile << tr("# Any manual changes made to this file will be overwritten the next time mcbuilder builds.") << endl << "#" << endl; 
    186186    tofile << "##################################################################################################" << endl << endl; 
    187187 
     
    349349    tofile << "/*****************************************************************************************" << endl << endl; 
    350350    tofile << "  config.h" << endl; 
    351     tofile << "  Generated automatically by mcbuilder - " << QDateTime::currentDateTime().toString("MMM d, yyyy h:m ap") << endl; 
    352     tofile << "  Any manual changes made to this file will be overwritten the next time mcbuilder builds." << endl << endl; 
     351    tofile << tr("  Generated automatically by mcbuilder - ") << QDateTime::currentDateTime().toString("MMM d, yyyy h:m ap") << endl; 
     352    tofile << tr("  Any manual changes made to this file will be overwritten the next time mcbuilder builds.") << endl << endl; 
    353353    tofile << "******************************************************************************************/" << endl << endl; 
    354354     
     
    546546  { 
    547547    case QProcess::FailedToStart: 
    548       msg = QString("'%1' failed to start.  It's either missing, or doesn't have the correct permissions").arg(currentProcess); 
     548      msg = tr("'%1' failed to start.  It's either missing, or doesn't have the correct permissions").arg(currentProcess); 
    549549      break; 
    550550    case QProcess::Crashed: 
    551       msg = QString("'%1' was canceled or crashed.").arg(currentProcess); 
     551      msg = tr("'%1' was canceled or crashed.").arg(currentProcess); 
    552552      break; 
    553553    case QProcess::Timedout: 
    554       msg = QString("'%1' timed out.").arg(currentProcess); 
     554      msg = tr("'%1' timed out.").arg(currentProcess); 
    555555      break; 
    556556    case QProcess::WriteError: 
    557       msg = QString("'%1' reported a write error.").arg(currentProcess); 
     557      msg = tr("'%1' reported a write error.").arg(currentProcess); 
    558558      break; 
    559559    case QProcess::ReadError: 
    560       msg = QString("'%1' reported a read error.").arg(currentProcess); 
     560      msg = tr("'%1' reported a read error.").arg(currentProcess); 
    561561      break; 
    562562    case QProcess::UnknownError: 
    563       msg = QString("'%1' - unknown error type.").arg(currentProcess); 
    564       break; 
    565   } 
    566   mainWindow->printOutputError("Error: " + msg); 
     563      msg = tr("'%1' - unknown error type.").arg(currentProcess); 
     564      break; 
     565  } 
     566  mainWindow->printOutputError(tr("Error: ") + msg); 
    567567  resetBuildProcess(); 
    568568  mainWindow->onBuildComplete(false); 
     
    676676    QFileInfo fi(filepath); 
    677677    ConsoleItem *item; 
    678     QString fullmsg = QString("%1 (line %2): %3").arg(fi.fileName()).arg(linenumber).arg(msg); 
     678    QString fullmsg = tr("%1 (line %2): %3").arg(fi.fileName()).arg(linenumber).arg(msg); 
    679679    if(severity == "error") 
    680680    { 
     
    713713    //qDebug("cap! %s: In function %s", qPrintable(filepath), qPrintable(func)); 
    714714    QFileInfo fi(filepath); 
    715     QString fullmsg = QString("%1: In function %2").arg(fi.fileName()).arg(func); 
     715    QString fullmsg = tr("%1: In function %2").arg(fi.fileName()).arg(func); 
    716716    mainWindow->printOutputError(fullmsg); 
    717717    pos += errExp.matchedLength(); // step the index past the match so we can continue looking 
     
    738738    //qDebug("cap! %s: In function %s", qPrintable(filepath), qPrintable(func)); 
    739739    QFileInfo fi(filepath); 
    740     QString fullmsg = QString("Error - in %1: Undefined reference to %2").arg(fi.fileName()).arg(func); 
     740    QString fullmsg = tr("Error - in %1: Undefined reference to %2").arg(fi.fileName()).arg(func); 
    741741    mainWindow->printOutputError(fullmsg); 
    742742    pos += errExp.matchedLength(); // step the index past the match so we can continue looking 
  • mcbuilder/trunk/src/MainWindow.cpp

    r833 r834  
    221221  editor->setExtraSelections( extras ); 
    222222   
    223   statusBar()->showMessage( QString("Line: %1  Column: %2").arg(c.blockNumber()+1).arg(c.columnNumber())); 
     223  statusBar()->showMessage( tr("Line: %1  Column: %2").arg(c.blockNumber()+1).arg(c.columnNumber())); 
    224224} 
    225225 
     
    361361  if(currentProject.isEmpty()) 
    362362  { 
    363     statusBar()->showMessage( "Need to open a project first.  Open or create a new one from the File menu.", 3500 ); 
     363    statusBar()->showMessage( tr("Need to open a project first.  Open or create a new one from the File menu."), 3500 ); 
    364364    return; 
    365365  } 
     
    426426    QTextStream out(&file); 
    427427    out << QString("// %1").arg(fi.fileName()) << endl; 
    428     out << QString("// created %1").arg(QDate::currentDate().toString("MMM d, yyyy") ) << endl << endl; 
     428    out << tr("// created %1").arg(QDate::currentDate().toString("MMM d, yyyy") ) << endl << endl; 
    429429    file.close(); 
    430430    editorLoadFile(fi.filePath()); 
     
    449449  else 
    450450  { 
    451     QString message = QString("Couldn't find %1.").arg(file.fileName()); 
     451    QString message = tr("Couldn't find %1.").arg(file.fileName()); 
    452452    currentFileDropDown->removeItem(currentFileDropDown->findText(file.fileName())); 
    453453    statusBar()->showMessage(message, 3000); 
     
    495495  QString projectName = projectDir.dirName(); 
    496496  if(!projectDir.exists()) 
    497     return statusBar()->showMessage( QString("Couldn't find %1.").arg(projectName), 3500 ); 
     497    return statusBar()->showMessage( tr("Couldn't find %1.").arg(projectName), 3500 ); 
    498498 
    499499  QString pathname = projectName; // filename should not have spaces 
     
    534534  } 
    535535  else 
    536     return statusBar()->showMessage( QString("Couldn't find main file for %1.").arg(projectName), 3500 ); 
     536    return statusBar()->showMessage( tr("Couldn't find main file for %1.").arg(projectName), 3500 ); 
    537537} 
    538538 
     
    577577{ 
    578578  if(currentFile.isEmpty()) 
    579     return statusBar()->showMessage( "Need to open a file or project first.  Open or create a new one from the File menu.", 3500 ); 
     579    return statusBar()->showMessage( tr("Need to open a file or project first.  Open or create a new one from the File menu."), 3500 ); 
    580580  save( ); 
    581581} 
     
    599599  else 
    600600  { 
    601     statusBar()->showMessage( "Couldn't save...maybe the current file has been moved or deleted.", 3500 ); 
     601    statusBar()->showMessage( tr("Couldn't save...maybe the current file has been moved or deleted."), 3500 ); 
    602602    return false; 
    603603  } 
     
    633633{ 
    634634  if(currentFile.isEmpty()) 
    635     return statusBar()->showMessage( "Need to open a project first.  Open or create a new one from the File menu.", 3500 ); 
     635    return statusBar()->showMessage( tr("Need to open a project first.  Open or create a new one from the File menu."), 3500 ); 
    636636     
    637637  QString newFileName = QFileDialog::getSaveFileName(this, tr("Save As"),  
     
    684684{ 
    685685  if(currentProject.isEmpty()) 
    686     return statusBar()->showMessage( "Open a project to build, or create a new one from the File menu.", 3500 ); 
     686    return statusBar()->showMessage( tr("Open a project to build, or create a new one from the File menu."), 3500 ); 
    687687  if(!maybeSave( )) 
    688688    return; 
     
    694694  } 
    695695  else 
    696     return statusBar()->showMessage( "Builder is currently busy...give it a second, then try again.", 3500 ); 
     696    return statusBar()->showMessage( tr("Builder is currently busy...give it a second, then try again."), 3500 ); 
    697697} 
    698698 
     
    715715  if(success) 
    716716  { 
    717     outputConsole->addItem(new QListWidgetItem(QIcon(":/icons/success.png"), "Build succeeded.", outputConsole)); 
     717    outputConsole->addItem(new QListWidgetItem(QIcon(":/icons/success.png"), tr("Build succeeded."), outputConsole)); 
    718718    outputConsole->scrollToBottom(); 
    719     statusBar()->showMessage("Build succeeded."); 
     719    statusBar()->showMessage(tr("Build succeeded.")); 
    720720  } 
    721721  else 
    722722  { 
    723     outputConsole->addItem(new QListWidgetItem(QIcon(":/icons/error.png"), "Build failed.", outputConsole)); 
     723    outputConsole->addItem(new QListWidgetItem(QIcon(":/icons/error.png"), tr("Build failed."), outputConsole)); 
    724724    outputConsole->scrollToBottom(); 
    725     statusBar()->showMessage("Build failed."); 
     725    statusBar()->showMessage(tr("Build failed.")); 
    726726  } 
    727727  actionStop->setEnabled(false); 
     
    732732  if(success) 
    733733  { 
    734     outputConsole->addItem(new QListWidgetItem(QIcon(":/icons/success.png"), "Upload succeeded.", outputConsole)); 
     734    outputConsole->addItem(new QListWidgetItem(QIcon(":/icons/success.png"), tr("Upload succeeded."), outputConsole)); 
    735735    outputConsole->scrollToBottom(); 
    736     statusBar()->showMessage("Upload succeeded."); 
     736    statusBar()->showMessage(tr("Upload succeeded.")); 
    737737  } 
    738738  else 
    739739  { 
    740     outputConsole->addItem(new QListWidgetItem(QIcon(":/icons/error.png"), "Upload failed.", outputConsole)); 
     740    outputConsole->addItem(new QListWidgetItem(QIcon(":/icons/error.png"), tr("Upload failed."), outputConsole)); 
    741741    outputConsole->scrollToBottom(); 
    742     statusBar()->showMessage("Upload failed."); 
     742    statusBar()->showMessage(tr("Upload failed.")); 
    743743  } 
    744744} 
     
    747747{ 
    748748  outputConsole->clear(); 
    749   outputConsole->addItem(new QListWidgetItem(QIcon(":/icons/success.png"), "Clean succeeded.", outputConsole)); 
    750   statusBar()->showMessage("Clean succeeded."); 
     749  outputConsole->addItem(new QListWidgetItem(QIcon(":/icons/success.png"), tr("Clean succeeded."), outputConsole)); 
     750  statusBar()->showMessage(tr("Clean succeeded.")); 
    751751} 
    752752 
    753753void MainWindow::buildingNow(QString file) 
    754754{ 
    755   statusBar()->showMessage("Building..." + file); 
     755  statusBar()->showMessage(tr("Building...") + file); 
    756756} 
    757757 
     
    767767    builder->clean(currentProject); 
    768768  else 
    769     return statusBar()->showMessage( "Builder is currently busy...give it a second, then try again.", 3500 ); 
     769    return statusBar()->showMessage( tr("Builder is currently busy...give it a second, then try again."), 3500 ); 
    770770} 
    771771 
     
    777777{ 
    778778  if(currentProject.isEmpty()) 
    779     return statusBar()->showMessage( "Open a project first, or create a new one from the File menu.", 3500 ); 
     779    return statusBar()->showMessage( tr("Open a project first, or create a new one from the File menu."), 3500 ); 
    780780  if( !projInfo->loadAndShow() ) 
    781781  { 
    782782    QDir dir(currentProject); 
    783     return statusBar()->showMessage( "Couldn't find/open project properties for " + dir.dirName(), 3500 ); 
     783    return statusBar()->showMessage( tr("Couldn't find/open project properties for ") + dir.dirName(), 3500 ); 
    784784  } 
    785785} 
     
    792792{ 
    793793  if(currentProject.isEmpty()) 
    794     return statusBar()->showMessage( "Open a project to upload, or create a new one from the File menu.", 3500 ); 
     794    return statusBar()->showMessage( tr("Open a project to upload, or create a new one from the File menu."), 3500 ); 
    795795  QDir projectDir(currentProject); 
    796796  projectDir.cd("build"); 
     
    800800    uploadFile(bins.first().filePath()); 
    801801  else 
    802     return statusBar()->showMessage( "Couldn't find the file to upload for this project.", 3500 ); 
     802    return statusBar()->showMessage( tr("Couldn't find the file to upload for this project."), 3500 ); 
    803803} 
    804804 
     
    825825  QFileInfo fi(filename); 
    826826  if(!fi.exists()) 
    827     return statusBar()->showMessage( QString("Couldn't find %1.").arg(fi.fileName()), 3500 ); 
     827    return statusBar()->showMessage( tr("Couldn't find %1.").arg(fi.fileName()), 3500 ); 
    828828  QAction *board = boardTypeGroup->checkedAction( ); 
    829829  if(board) 
     
    832832      uploader->upload(board->data().toString(), filename); 
    833833    else 
    834       return statusBar()->showMessage( "Uploader is currently busy...give it a second, then try again.", 3500 ); 
     834      return statusBar()->showMessage( tr("Uploader is currently busy...give it a second, then try again."), 3500 ); 
    835835  } 
    836836  else 
    837     return statusBar()->showMessage( "Please select a board type from the Project menu first.", 3500 ); 
     837    return statusBar()->showMessage( tr("Please select a board type from the Project menu first."), 3500 ); 
    838838} 
    839839 
     
    934934        QMenu *menu = new QMenu(libname, menuLibraries); 
    935935        menuLibraries->addMenu(menu); 
    936         QAction *a = new QAction("Import to Current Project", menu); 
     936        QAction *a = new QAction(tr("Import to Current Project"), menu); 
    937937        a->setData(library); 
    938938        menu->addAction(a); 
     
    941941        if(nodes.count()) 
    942942        { 
    943           a = new QAction("View Documentation", menu); 
     943          a = new QAction(tr("View Documentation"), menu); 
    944944          QString doclink = nodes.at(0).toElement().text(); 
    945945          QUrl url(doclink); 
     
    962962void MainWindow::onLibrary(QAction *example) 
    963963{ 
    964   if(example->text() == "Import to Current Project") 
     964  if(example->text() == tr("Import to Current Project")) 
    965965  { 
    966966    QString includeString = QString("#include \"%1.h\"").arg(example->data().toString()); 
     
    973973    } 
    974974  } 
    975   else if(example->text() == "View Documentation") 
     975  else if(example->text() == tr("View Documentation")) 
    976976    QDesktopServices::openUrl(QUrl::fromLocalFile(example->data().toString())); 
    977977} 
     
    10021002void MainWindow::printOutputError(QString text) 
    10031003{ 
    1004   if(text.startsWith("Warning")) 
     1004  if(text.startsWith(tr("Warning"))) 
    10051005    outputConsole->addItem(new QListWidgetItem(QIcon(":/icons/warning.png"), text.trimmed(), outputConsole)); 
    1006   else if(text.startsWith("Error")) 
     1006  else if(text.startsWith(tr("Error"))) 
    10071007    outputConsole->addItem(new QListWidgetItem(QIcon(":/icons/error.png"), text.trimmed(), outputConsole)); 
    10081008  else 
  • mcbuilder/trunk/src/Uploader.cpp

    r659 r834  
    107107  if(err.startsWith("can't find boot agent")) 
    108108  { 
    109     mainWindow->printOutputError("Error - couldn't find an unprogrammed board to upload to."); 
    110     mainWindow->printOutputError("  Make sure you've erased and unplugged/replugged your board."); 
     109    mainWindow->printOutputError(tr("Error - couldn't find an unprogrammed board to upload to.")); 
     110    mainWindow->printOutputError(tr("  Make sure you've erased and unplugged/replugged your board.")); 
    111111  } 
    112112  else 
     
    122122{ 
    123123  QFileInfo fi(currentFile); 
    124   uploaderProgress->setLabelText(QString("Uploading %1...").arg(fi.fileName())); 
     124  uploaderProgress->setLabelText(tr("Uploading %1...").arg(fi.fileName())); 
    125125  uploaderProgress->show(); 
    126126} 
     
    149149  { 
    150150    case QProcess::FailedToStart: 
    151       msg = QString("uploader failed to start.  '%1' is either missing, or doesn't have the correct permissions").arg(uploaderName); 
     151      msg = tr("uploader failed to start.  '%1' is either missing, or doesn't have the correct permissions").arg(uploaderName); 
    152152      break; 
    153153    case QProcess::Crashed: 
    154       msg = QString("uploader (%1) was canceled or crashed.").arg(uploaderName); 
     154      msg = tr("uploader (%1) was canceled or crashed.").arg(uploaderName); 
    155155      break; 
    156156    case QProcess::Timedout: 
    157       msg = QString("uploader (%1) timed out.").arg(uploaderName); 
     157      msg = tr("uploader (%1) timed out.").arg(uploaderName); 
    158158      break; 
    159159    case QProcess::WriteError: 
    160       msg = QString("uploader (%1) reported a write error.").arg(uploaderName); 
     160      msg = tr("uploader (%1) reported a write error.").arg(uploaderName); 
    161161      break; 
    162162    case QProcess::ReadError: 
    163       msg = QString("uploader (%1) reported a read error.").arg(uploaderName); 
     163      msg = tr("uploader (%1) reported a read error.").arg(uploaderName); 
    164164      break; 
    165165    case QProcess::UnknownError: 
    166       msg = QString("uploader (%1) - unknown error type.").arg(uploaderName); 
     166      msg = tr("uploader (%1) - unknown error type.").arg(uploaderName); 
    167167      break; 
    168168  } 
    169   mainWindow->printOutputError("Error - " + msg); 
     169  mainWindow->printOutputError(tr("Error - ") + msg); 
    170170} 
    171171 
  • mcbuilder/trunk/src/main.cpp

    r601 r834  
    1919 
    2020#include <QApplication> 
     21#include <QTranslator> 
     22#include <QLibraryInfo> 
    2123#include "MainWindow.h" 
    2224 
     
    2426{ 
    2527  QApplication app(argc, argv); 
     28   
     29  QString locale = QLocale::system().name(); 
     30 
     31  QTranslator qtTranslator; 
     32  QTranslator mcbuilderTranslator; 
     33 
     34  qtTranslator.load(QString("qt_") + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath)); 
     35  app.installTranslator(&qtTranslator); 
     36 
     37  mcbuilderTranslator.load(QString("mcbuilder_") + locale); 
     38  app.installTranslator(&mcbuilderTranslator); 
     39 
    2640  MainWindow window; 
    2741  window.show();