Index: src/plugins/grid_maker/plugin.cpp =================================================================== --- src/plugins/grid_maker/plugin.cpp (revision 5121) +++ src/plugins/grid_maker/plugin.cpp (working copy) @@ -107,18 +107,18 @@ */ void QgsGridMakerPlugin::initGui() { - QMenu *pluginMenu = qGisInterface->getPluginMenu("&Graticules"); - menuId = pluginMenu->insertItem(QIcon(icon),"&GraticuleMaker", this, SLOT(run())); + QMenu *pluginMenu = qGisInterface->getPluginMenu(tr("&Graticules")); + menuId = pluginMenu->insertItem(QIcon(icon),tr("&GraticuleMaker"), this, SLOT(run())); - pluginMenu->setWhatsThis(menuId, "Creates a graticule (grid) and stores the result as a shapefile"); + pluginMenu->setWhatsThis(menuId, tr("Creates a graticule (grid) and stores the result as a shapefile")); // Create the action for tool #if QT_VERSION < 0x040000 - myQActionPointer = new QAction("Graticule Creator", QIcon(icon), "&Wmi",0, this, "run"); + myQActionPointer = new QAction(tr("Graticule Creator"), QIcon(icon), "&Wmi",0, this, "run"); #else - myQActionPointer = new QAction(QIcon(icon), "Graticule Creator", this); + myQActionPointer = new QAction(QIcon(icon), tr("Graticule Creator"), this); #endif - myQActionPointer->setWhatsThis("Creates a graticule (grid) and stores the result as a shapefile"); + myQActionPointer->setWhatsThis(tr("Creates a graticule (grid) and stores the result as a shapefile")); // Connect the action to the run connect(myQActionPointer, SIGNAL(activated()), this, SLOT(run())); @@ -158,7 +158,7 @@ void QgsGridMakerPlugin::unload() { // remove the GUI - qGisInterface->removePluginMenuItem("&Graticules",menuId); + qGisInterface->removePluginMenuItem(tr("&Graticules"),menuId); qGisInterface->removeToolBarIcon(myQActionPointer); delete myQActionPointer; } Index: src/plugins/grid_maker/plugingui.cpp =================================================================== --- src/plugins/grid_maker/plugingui.cpp (revision 5121) +++ src/plugins/grid_maker/plugingui.cpp (working copy) @@ -50,8 +50,8 @@ if (leOutputShapeFile->text().isEmpty()) { - QMessageBox::warning( 0, "QGIS - Grid Maker", - QString("Please enter the file name before pressing OK!." )); + QMessageBox::warning( 0, tr("QGIS - Grid Maker"), + QString(tr("Please enter the file name before pressing OK!.") )); return; } @@ -60,48 +60,48 @@ double myLongitudeInterval = leLongitudeInterval->text().toDouble(&myFlag); if (!myFlag) { - QMessageBox::warning( 0, "QGIS - Grid Maker", - QString("Longitude Interval is invalid - please correct and try again." )); + QMessageBox::warning( 0, tr("QGIS - Grid Maker"), + QString(tr("Longitude Interval is invalid - please correct and try again." ))); return; } myFlag=false;//reset test flag double myLatitudeInterval = leLatitudeInterval->text().toDouble(&myFlag); if (!myFlag) { - QMessageBox::warning( 0, "QGIS - Grid Maker", - QString("Latitude Interval is invalid - please correct and try again." )); + QMessageBox::warning( 0, tr("QGIS - Grid Maker"), + QString(tr("Latitude Interval is invalid - please correct and try again." ))); return; } myFlag=false;//reset test flag double myLongitudeOrigin = leOriginLongitude->text().toDouble(&myFlag); if (!myFlag) { - QMessageBox::warning( 0, "QGIS - Grid Maker", - QString("Longitude Origin is invalid - please correct and try again.." )); + QMessageBox::warning( 0, tr("QGIS - Grid Maker"), + QString(tr("Longitude Origin is invalid - please correct and try again.." ))); return; } myFlag=false;//reset test flag double myLatitudeOrigin = leOriginLatitude->text().toDouble(&myFlag); if (!myFlag) { - QMessageBox::warning( 0, "QGIS - Grid Maker", - QString("Latitude Origin is invalid - please correct and try again." )); + QMessageBox::warning( 0, tr("QGIS - Grid Maker"), + QString(tr("Latitude Origin is invalid - please correct and try again." ))); return; } myFlag=false;//reset test flag double myEndPointLongitude = leEndPointLongitude->text().toDouble(&myFlag); if (!myFlag) { - QMessageBox::warning( 0, "QGIS - Grid Maker", - QString("End Point Longitude is invalid - please correct and try again." )); + QMessageBox::warning( 0, tr("QGIS - Grid Maker"), + QString(tr("End Point Longitude is invalid - please correct and try again." ))); return; } myFlag=false;//reset test flag double myEndPointLatitude = leEndPointLatitude->text().toDouble(&myFlag); if (!myFlag) { - QMessageBox::warning( 0, "QGIS - Grid Maker", - QString("End Point Latitude is invalid - please correct and try again." )); + QMessageBox::warning( 0, tr("QGIS - Grid Maker"), + QString(tr("End Point Latitude is invalid - please correct and try again." ))); return; } @@ -161,9 +161,9 @@ std::cout << " Gps File Importer Gui::pbnSelectOutputFile_clicked() " << std::endl; QString myOutputFileNameQString = QFileDialog::getSaveFileName( this, - "Choose a filename to save under", + tr("Choose a filename to save under"), ".", - "ESRI Shapefile (*.shp)"); + tr("ESRI Shapefile (*.shp)")); if (myOutputFileNameQString.right(4) != ".shp") myOutputFileNameQString += ".shp"; Index: src/plugins/delimited_text/qgsdelimitedtextplugin.cpp =================================================================== --- src/plugins/delimited_text/qgsdelimitedtextplugin.cpp (revision 5121) +++ src/plugins/delimited_text/qgsdelimitedtextplugin.cpp (working copy) @@ -101,19 +101,19 @@ */ void QgsDelimitedTextPlugin::initGui() { - QMenu *pluginMenu = qGisInterface->getPluginMenu("&Delimited text"); - menuId = pluginMenu->insertItem(QIcon(icon),"&Add Delimited Text Layer", this, SLOT(run())); + QMenu *pluginMenu = qGisInterface->getPluginMenu(tr("&Delimited text")); + menuId = pluginMenu->insertItem(QIcon(icon),tr("&Add Delimited Text Layer"), this, SLOT(run())); - pluginMenu->setWhatsThis(menuId, "Add a delimited text file as a map layer. " - "The file must have a header row containing the field names. " - "X and Y fields are required and must contain coordinates in decimal units."); + pluginMenu->setWhatsThis(menuId, tr("Add a delimited text file as a map layer. ")+ + tr("The file must have a header row containing the field names. ")+ + tr("X and Y fields are required and must contain coordinates in decimal units.")); // Create the action for tool - myQActionPointer = new QAction(QIcon(icon), "Add Delimited Text Layer", this); + myQActionPointer = new QAction(QIcon(icon), tr("Add Delimited Text Layer"), this); - myQActionPointer->setWhatsThis("Add a delimited text file as a map layer. " - "The file must have a header row containing the field names. " - "X and Y fields are required and must contain coordinates in decimal units."); + myQActionPointer->setWhatsThis(tr("Add a delimited text file as a map layer. ")+ + tr("The file must have a header row containing the field names. ")+ + tr("X and Y fields are required and must contain coordinates in decimal units.")); // Connect the action to the run connect(myQActionPointer, SIGNAL(activated()), this, SLOT(run())); // Add the icon to the toolbar @@ -154,7 +154,7 @@ void QgsDelimitedTextPlugin::unload() { // remove the GUI - qGisInterface->removePluginMenuItem("&Delimited text",menuId); + qGisInterface->removePluginMenuItem(tr("&Delimited text"),menuId); qGisInterface->removeToolBarIcon(myQActionPointer); delete myQActionPointer; } Index: src/plugins/geoprocessing/qgspggeoprocessing.cpp =================================================================== --- src/plugins/geoprocessing/qgspggeoprocessing.cpp (revision 5121) +++ src/plugins/geoprocessing/qgspggeoprocessing.cpp (working copy) @@ -75,13 +75,13 @@ QMenu *pluginMenu = qI->getPluginMenu(tr("&Geoprocessing")); menuId = pluginMenu->insertItem(QIcon(icon_buffer),tr("&Buffer Features"), this, SLOT(buffer())); - pluginMenu->setWhatsThis(menuId, tr("Create a buffer for a PostgreSQL layer. " - "A new layer is created in the database with the buffered features.")); + pluginMenu->setWhatsThis(menuId, tr("Create a buffer for a PostgreSQL layer. " + + tr("A new layer is created in the database with the buffered features."))); // Create the action for tool bufferAction = new QAction(QIcon(icon_buffer), tr("Buffer features"), this); - bufferAction->setWhatsThis(tr("Create a buffer for a PostgreSQL layer. " - "A new layer is created in the database with the buffered features.")); + bufferAction->setWhatsThis(tr("Create a buffer for a PostgreSQL layer. " + + tr("A new layer is created in the database with the buffered features."))); // Connect the action to the buffer slot connect(bufferAction, SIGNAL(activated()), this, SLOT(buffer())); Index: src/plugins/copyright_label/plugin.cpp =================================================================== --- src/plugins/copyright_label/plugin.cpp (revision 5121) +++ src/plugins/copyright_label/plugin.cpp (working copy) @@ -79,14 +79,14 @@ */ void QgsCopyrightLabelPlugin::initGui() { - QMenu *pluginMenu = qGisInterface->getPluginMenu("&Decorations"); - menuId = pluginMenu->insertItem(QIcon(icon),"&CopyrightLabel", this, SLOT(run())); + QMenu *pluginMenu = qGisInterface->getPluginMenu(tr("&Decorations")); + menuId = pluginMenu->insertItem(QIcon(icon),tr("&CopyrightLabel"), this, SLOT(run())); - pluginMenu->setWhatsThis(menuId, "Creates a copyright label that is displayed on the map canvas."); + pluginMenu->setWhatsThis(menuId, tr("Creates a copyright label that is displayed on the map canvas.")); // Create the action for tool - myQActionPointer = new QAction(QIcon(icon), "Copyright Label", this); - myQActionPointer->setWhatsThis("Creates a copyright label that is displayed on the map canvas."); + myQActionPointer = new QAction(QIcon(icon), tr("Copyright Label"), this); + myQActionPointer->setWhatsThis(tr("Creates a copyright label that is displayed on the map canvas.")); // Connect the action to the run connect(myQActionPointer, SIGNAL(activated()), this, SLOT(run())); // This calls the renderer everytime the cnavas has drawn itself @@ -204,7 +204,7 @@ void QgsCopyrightLabelPlugin::unload() { // remove the GUI - qGisInterface->removePluginMenuItem("&Decorations",menuId); + qGisInterface->removePluginMenuItem(tr("&Decorations"),menuId); qGisInterface->removeToolBarIcon(myQActionPointer); // remove the copyright from the canvas disconnect(qGisInterface->getMapCanvas(), SIGNAL(renderComplete(QPainter *)), Index: src/plugins/gps_importer/qgsgpsplugin.cpp =================================================================== --- src/plugins/gps_importer/qgsgpsplugin.cpp (revision 5121) +++ src/plugins/gps_importer/qgsgpsplugin.cpp (working copy) @@ -103,16 +103,16 @@ */ void QgsGPSPlugin::initGui() { - QMenu *pluginMenu = mQGisInterface->getPluginMenu("&Gps"); - mMenuIdGPS = pluginMenu->insertItem(QIcon(icon),"&Gps Tools", this, SLOT(run())); - mMenuIdGPX = pluginMenu->insertItem(QIcon(icon),"&Create new GPX layer", this, SLOT(createGPX())); + QMenu *pluginMenu = mQGisInterface->getPluginMenu(tr("&Gps")); + mMenuIdGPS = pluginMenu->insertItem(QIcon(icon),tr("&Gps Tools"), this, SLOT(run())); + mMenuIdGPX = pluginMenu->insertItem(QIcon(icon),tr("&Create new GPX layer"), this, SLOT(createGPX())); - pluginMenu->setWhatsThis(mMenuIdGPX, "Creates a new GPX layer and displays it on the map canvas"); + pluginMenu->setWhatsThis(mMenuIdGPX, tr("Creates a new GPX layer and displays it on the map canvas")); // add an action to the toolbar - mQActionPointer = new QAction(QIcon(icon), "Gps Tools", this); + mQActionPointer = new QAction(QIcon(icon), tr("Gps Tools"), this); - mQActionPointer->setWhatsThis( "Creates a new GPX layer and displays it on the map canvas"); + mQActionPointer->setWhatsThis(tr("Creates a new GPX layer and displays it on the map canvas")); connect(mQActionPointer, SIGNAL(activated()), this, SLOT(run())); mQGisInterface->addToolBarIcon(mQActionPointer); } @@ -167,15 +167,15 @@ void QgsGPSPlugin::createGPX() { QString fileName = QFileDialog::getSaveFileName(mMainWindowPointer, - "Save new GPX file as...", "." , "GPS eXchange file (*.gpx)"); + tr("Save new GPX file as..."), "." , tr("GPS eXchange file (*.gpx)")); if (!fileName.isEmpty()) { QFileInfo fileInfo(fileName); std::ofstream ofs((const char*)fileName); if (!ofs) { - QMessageBox::warning(NULL, "Could not create file", - "Unable to create a GPX file with the given name. " - "Try again with another name or in another " - "directory."); + QMessageBox::warning(NULL, tr("Could not create file"), + tr("Unable to create a GPX file with the given name. ")+ + tr("Try again with another name or in another ")+ + tr("directory.")); return; } ofs<<""<removePluginMenuItem("&Gps",mMenuIdGPS); - mQGisInterface->removePluginMenuItem("&Gps",mMenuIdGPX); + mQGisInterface->removePluginMenuItem(tr("&Gps"),mMenuIdGPS); + mQGisInterface->removePluginMenuItem(tr("&Gps"),mMenuIdGPX); mQGisInterface->removeToolBarIcon(mQActionPointer); delete mQActionPointer; } @@ -214,9 +214,9 @@ //check if input file is readable QFileInfo fileInfo(filename); if (!fileInfo.isReadable()) { - QMessageBox::warning(NULL, "GPX Loader", - "Unable to read the selected file.\n" - "Please reselect a valid file." ); + QMessageBox::warning(NULL, tr("GPX Loader"), + tr("Unable to read the selected file.\n")+ + tr("Please reselect a valid file.") ); return; } @@ -259,13 +259,13 @@ inputFilename, outputFilename); Q3Process babelProcess(babelArgs); if (!babelProcess.start()) { - QMessageBox::warning(NULL, "Could not start process", - "Could not start GPSBabel!"); + QMessageBox::warning(NULL, tr("Could not start process"), + tr("Could not start GPSBabel!")); return; } // wait for gpsbabel to finish (or the user to cancel) - Q3ProgressDialog progressDialog("Importing data...", "Cancel", 0, + Q3ProgressDialog progressDialog(tr("Importing data..."), tr("Cancel"), 0, NULL, 0, true); progressDialog.show(); for (int i = 0; babelProcess.isRunning(); ++i) { @@ -282,10 +282,10 @@ // did we get any data? if (babelProcess.exitStatus() != 0) { QString babelError(babelProcess.readStderr()); - QString errorMsg(QString("Could not import data from %1!\n\n") + QString errorMsg(QString(tr("Could not import data from %1!\n\n")) .arg(inputFilename)); errorMsg += babelError; - QMessageBox::warning(NULL, "Error importing data", errorMsg); + QMessageBox::warning(NULL, tr("Error importing data"), errorMsg); return; } @@ -329,20 +329,20 @@ mDevices[device]->importCommand(mBabelPath, typeArg, port, outputFilename); if (babelArgs.isEmpty()) { - QMessageBox::warning(NULL, "Not supported", - QString("This device does not support downloading " - "of ") + features + "."); + QMessageBox::warning(NULL, tr("Not supported"), + QString(tr("This device does not support downloading ") + + tr("of ")) + features + "."); return; } Q3Process babelProcess(babelArgs); if (!babelProcess.start()) { - QMessageBox::warning(NULL, "Could not start process", - "Could not start GPSBabel!"); + QMessageBox::warning(NULL, tr("Could not start process"), + tr("Could not start GPSBabel!")); return; } // wait for gpsbabel to finish (or the user to cancel) - Q3ProgressDialog progressDialog("Downloading data...", "Cancel", 0, + Q3ProgressDialog progressDialog(tr("Downloading data..."), tr("Cancel"), 0, NULL, 0, true); progressDialog.show(); for (int i = 0; babelProcess.isRunning(); ++i) { @@ -359,9 +359,9 @@ // did we get any data? if (babelProcess.exitStatus() != 0) { QString babelError(babelProcess.readStderr()); - QString errorMsg("Could not download data from GPS!\n\n"); + QString errorMsg(tr("Could not download data from GPS!\n\n")); errorMsg += babelError; - QMessageBox::warning(NULL, "Error downloading data", errorMsg); + QMessageBox::warning(NULL, tr("Error downloading data"), errorMsg); return; } @@ -414,20 +414,20 @@ mDevices[device]->exportCommand(mBabelPath, typeArg, source.left(source.findRev('?')), port); if (babelArgs.isEmpty()) { - QMessageBox::warning(NULL, "Not supported", - QString("This device does not support uploading of ")+ + QMessageBox::warning(NULL, tr("Not supported"), + QString(tr("This device does not support uploading of "))+ features + "."); return; } Q3Process babelProcess(babelArgs); if (!babelProcess.start()) { - QMessageBox::warning(NULL, "Could not start process", - "Could not start GPSBabel!"); + QMessageBox::warning(NULL, tr("Could not start process"), + tr("Could not start GPSBabel!")); return; } // wait for gpsbabel to finish (or the user to cancel) - Q3ProgressDialog progressDialog("Uploading data...", "Cancel", 0, + Q3ProgressDialog progressDialog(tr("Uploading data..."), tr("Cancel"), 0, NULL, 0, true); progressDialog.show(); for (int i = 0; babelProcess.isRunning(); ++i) { @@ -444,9 +444,9 @@ // did we get an error? if (babelProcess.exitStatus() != 0) { QString babelError(babelProcess.readStderr()); - QString errorMsg("Error while uploading data to GPS!\n\n"); + QString errorMsg(tr("Error while uploading data to GPS!\n\n")); errorMsg += babelError; - QMessageBox::warning(NULL, "Error uploading data", errorMsg); + QMessageBox::warning(NULL, tr("Error uploading data"), errorMsg); return; } Index: src/plugins/gps_importer/qgsgpsplugingui.cpp =================================================================== --- src/plugins/gps_importer/qgsgpsplugingui.cpp (revision 5121) +++ src/plugins/gps_importer/qgsgpsplugingui.cpp (working copy) @@ -131,9 +131,9 @@ { QString myFileNameQString = QFileDialog::getSaveFileName(this, //parent dialog - "Choose a filename to save under", + tr("Choose a filename to save under"), "." , //initial dir - "GPS eXchange format (*.gpx)"); + tr("GPS eXchange format (*.gpx)")); leDLOutput->setText(myFileNameQString); } @@ -210,7 +210,7 @@ dir = "."; QString myFileNameQString = QFileDialog::getOpenFileName( this, //parent dialog - "Select GPX file", //caption + tr("Select GPX file"), //caption dir, //initial dir myFilterString, //filters to select &myFileTypeQString); //the pointer to store selected filter @@ -223,7 +223,7 @@ QString myFileType; QString myFileName = QFileDialog::getOpenFileName( this, //parent dialog - "Select file and format to import", //caption + tr("Select file and format to import"), //caption ".", //initial dir mBabelFilter, &myFileType); //the pointer to store selected filter @@ -251,9 +251,9 @@ void QgsGPSPluginGui::on_pbnIMPOutput_clicked() { QString myFileNameQString = QFileDialog::getSaveFileName(this, //parent dialog - "Choose a filename to save under", + tr("Choose a filename to save under"), ".", //initial dir - "GPS eXchange format (*.gpx)"); + tr("GPS eXchange format (*.gpx)")); leIMPOutput->setText(myFileNameQString); } Index: src/plugins/scale_bar/plugin.cpp =================================================================== --- src/plugins/scale_bar/plugin.cpp (revision 5121) +++ src/plugins/scale_bar/plugin.cpp (working copy) @@ -95,18 +95,18 @@ */ void QgsScaleBarPlugin::initGui() { - QMenu *pluginMenu = qGisInterface->getPluginMenu("&Decorations"); - menuId = pluginMenu->insertItem(QIcon(icon),"&ScaleBar", this, SLOT(run())); + QMenu *pluginMenu = qGisInterface->getPluginMenu(tr("&Decorations")); + menuId = pluginMenu->insertItem(QIcon(icon),tr("&ScaleBar"), this, SLOT(run())); - pluginMenu->setWhatsThis(menuId, "Creates a scale bar that is displayed on the map canvas"); + pluginMenu->setWhatsThis(menuId, tr("Creates a scale bar that is displayed on the map canvas")); // Create the action for tool #if QT_VERSION < 0x040000 - myQActionPointer = new QAction("Scale Bar", QIcon(icon), "&Wmi",0, this, "run"); + myQActionPointer = new QAction(tr("Scale Bar"), QIcon(icon), "&Wmi",0, this, "run"); #else - myQActionPointer = new QAction(QIcon(icon), "Scale Bar", this); + myQActionPointer = new QAction(QIcon(icon), tr("Scale Bar"), this); #endif - myQActionPointer->setWhatsThis("Creates a scale bar that is displayed on the map canvas"); + myQActionPointer->setWhatsThis(tr("Creates a scale bar that is displayed on the map canvas")); // Connect the action to the run connect(myQActionPointer, SIGNAL(activated()), this, SLOT(run())); //render the scale bar each time the map is rendered @@ -517,7 +517,7 @@ void QgsScaleBarPlugin::unload() { // remove the GUI - qGisInterface->removePluginMenuItem("&Decorations",menuId); + qGisInterface->removePluginMenuItem(tr("&Decorations"),menuId); qGisInterface->removeToolBarIcon(myQActionPointer); // remove the northarrow from the canvas Index: src/plugins/georeferencer/plugin.cpp =================================================================== --- src/plugins/georeferencer/plugin.cpp (revision 5121) +++ src/plugins/georeferencer/plugin.cpp (working copy) @@ -108,13 +108,13 @@ void QgsGeorefPlugin::initGui() { // Create the action for tool - mQActionPointer = new QAction(QIcon(":/icon.png"), "&Georeferencer", this); + mQActionPointer = new QAction(QIcon(":/icon.png"), tr("&Georeferencer"), this); // Connect the action to the run connect(mQActionPointer, SIGNAL(activated()), this, SLOT(run())); // add to the plugin menu - QMenu *pluginMenu = mQGisIface->getPluginMenu("&Georeferencer"); + QMenu *pluginMenu = mQGisIface->getPluginMenu(tr("&Georeferencer")); pluginMenu->addAction(mQActionPointer); // Add to the toolbar @@ -139,7 +139,7 @@ { // TODO: make it work in Qt4 way // remove the GUI - mQGisIface->removePluginMenuItem("&Georeferencer",mMenuId); + mQGisIface->removePluginMenuItem(tr("&Georeferencer"),mMenuId); mQGisIface->removeToolBarIcon(mQActionPointer); delete mQActionPointer; } Index: src/plugins/georeferencer/plugingui.cpp =================================================================== --- src/plugins/georeferencer/plugingui.cpp (revision 5121) +++ src/plugins/georeferencer/plugingui.cpp (working copy) @@ -56,9 +56,9 @@ dir = "."; QString filename = QFileDialog::getOpenFileName(this, - "Choose a raster file", + tr("Choose a raster file"), dir, - "Raster files (*.*)"); + tr("Raster files (*.*)")); leSelectRaster->setText(filename); } @@ -67,8 +67,8 @@ // do we think that this is a valid raster? if (!QgsRasterLayer::isValidRasterFileName(leSelectRaster->text())) { - QMessageBox::critical(this, "Error", - "The selected file is not a valid raster file."); + QMessageBox::critical(this, tr("Error"), + tr("The selected file is not a valid raster file.")); return; } @@ -94,10 +94,10 @@ // check if there already is a world file if (!worldfile.isEmpty()) { if (QFile::exists(worldfile)) { - QMessageBox::critical(this, "Error", - "The selected file already seems to have a " - "world file! If you want to replace it with a " - "new world file, remove the old one first."); + QMessageBox::critical(this, tr("Error"), + tr("The selected file already seems to have a ")+ + tr("world file! If you want to replace it with a ")+ + tr("new world file, remove the old one first.")); return; } } Index: src/gui/qgisapp.cpp =================================================================== --- src/gui/qgisapp.cpp (revision 5121) +++ src/gui/qgisapp.cpp (working copy) @@ -217,10 +217,10 @@ { setupUi(this); - mSplash->showMessage("Reading settings", Qt::AlignHCenter | Qt::AlignBottom); + mSplash->showMessage(tr("Reading settings"), Qt::AlignHCenter | Qt::AlignBottom); qApp->processEvents(); readSettings(); - mSplash->showMessage("Setting up the GUI", Qt::AlignHCenter | Qt::AlignBottom); + mSplash->showMessage(tr("Setting up the GUI"), Qt::AlignHCenter | Qt::AlignBottom); qApp->processEvents(); createActions(); createActionGroups(); @@ -236,7 +236,7 @@ fileNew(); // prepare empty project - mSplash->showMessage("Checking database", Qt::AlignHCenter | Qt::AlignBottom); + mSplash->showMessage(tr("Checking database"), Qt::AlignHCenter | Qt::AlignBottom); qApp->processEvents(); createDB(); @@ -273,7 +273,7 @@ std::cout << "Plugins and providers are installed in " << plib.toLocal8Bit().data() << std::endl; #endif // load any plugins that were running in the last session - mSplash->showMessage("Restoring loaded plugins", Qt::AlignHCenter | Qt::AlignBottom); + mSplash->showMessage(tr("Restoring loaded plugins"), Qt::AlignHCenter | Qt::AlignBottom); qApp->processEvents(); restoreSessionPlugins(plib); @@ -293,7 +293,7 @@ // Map composer mComposer = new QgsComposer(this); - mSplash->showMessage("Initializing file filters", Qt::AlignHCenter | Qt::AlignBottom); + mSplash->showMessage(tr("Initializing file filters"), Qt::AlignHCenter | Qt::AlignBottom); qApp->processEvents(); // now build vector file filter buildSupportedVectorFileFilter_( mVectorFileFilter ); @@ -318,11 +318,11 @@ // Please make sure this is the last thing the ctor does so that we can ensure teh // widgets are all initialised before trying to restore their state. // - mSplash->showMessage("Restoring window state", Qt::AlignHCenter | Qt::AlignBottom); + mSplash->showMessage(tr("Restoring window state"), Qt::AlignHCenter | Qt::AlignBottom); qApp->processEvents(); restoreWindowState(); - mSplash->showMessage("QGIS Ready!", Qt::AlignHCenter | Qt::AlignBottom); + mSplash->showMessage(tr("QGIS Ready!"), Qt::AlignHCenter | Qt::AlignBottom); qApp->processEvents(); } // QgisApp ctor @@ -672,7 +672,7 @@ mFileMenu = menuBar()->addMenu(tr("&File")); mFileMenu->addAction(mActionFileNew); mFileMenu->addAction(mActionFileOpen); - mRecentProjectsMenu = mFileMenu->addMenu("&Open Recent Projects"); + mRecentProjectsMenu = mFileMenu->addMenu(tr("&Open Recent Projects")); // Connect once for the entire submenu. connect(mRecentProjectsMenu, SIGNAL(triggered(QAction *)), this, SLOT(openProject(QAction *))); @@ -1453,7 +1453,7 @@ if (!driverRegistrar) { - QMessageBox::warning(0,"OGR Driver Manager","unable to get OGRDriverManager"); + QMessageBox::warning(0,tr("OGR Driver Manager"),tr("unable to get OGRDriverManager")); return; // XXX good place to throw exception if we } // XXX decide to do exceptions @@ -5158,8 +5158,8 @@ } else { - QMessageBox::critical(this,"Layer is not valid", - "The layer is not a valid layer and can not be added to the map"); + QMessageBox::critical(this,tr("Layer is not valid"), + tr("The layer is not a valid layer and can not be added to the map")); } qApp->processEvents();