Index: src/gui/qgsmaptoolvertexedit.cpp =================================================================== --- src/gui/qgsmaptoolvertexedit.cpp (revision 6811) +++ src/gui/qgsmaptoolvertexedit.cpp (working copy) @@ -114,7 +114,7 @@ //Find nearest segment of the selected line, move that node to the mouse location if (!snapSegmentWithContext(point)) { - QMessageBox::warning(0, "Error", + QMessageBox::warning(0, QObject::tr("Error"), QObject::tr("Could not snap segment. Have you set the tolerance in Settings > Project Properties > General?"), QMessageBox::Ok, Qt::NoButton); return; @@ -159,7 +159,7 @@ { if(!snapVertexWithContext(snapPoint)) { - QMessageBox::warning(0, "Error", + QMessageBox::warning(0, QObject::tr("Error"), QObject::tr("Could not snap segment. Have you set the tolerance in Settings > Project Properties > General?"), QMessageBox::Ok, Qt::NoButton); return; @@ -169,7 +169,7 @@ { if (!snapSegmentWithContext(snapPoint)) { - QMessageBox::warning(0, "Error", + QMessageBox::warning(0, QObject::tr("Error"), QObject::tr("Could not snap segment. Have you set the tolerance in Settings > Project Properties > General?"), QMessageBox::Ok, Qt::NoButton); return; @@ -178,7 +178,7 @@ snapPoint = point; if (!snapVertexOfSnappedSegment(snapPoint)) { - QMessageBox::warning(0, "Error", + QMessageBox::warning(0, QObject::tr("Error"), QObject::tr("Could not snap vertex. Have you set the tolerance in Settings > Project Properties > General?"), QMessageBox::Ok, Qt::NoButton); return; @@ -227,7 +227,7 @@ // TODO: Find nearest segment of the selected line, move that node to the mouse location if (!snapVertexWithContext(point)) { - QMessageBox::warning(0, "Error", + QMessageBox::warning(0, QObject::tr("Error"), QObject::tr("Could not snap vertex. Have you set the tolerance in Settings > Project Properties > General?"), QMessageBox::Ok, Qt::NoButton); return; @@ -395,22 +395,22 @@ if (!vlayer) { - QMessageBox::information(0,"Not a vector layer","The current layer is not a vector layer",QMessageBox::Ok); + QMessageBox::information(0, QObject::tr("Not a vector layer"), QObject::tr("The current layer is not a vector layer"), QMessageBox::Ok); return; } if (!(vlayer->getDataProvider()->capabilities() & QgsVectorDataProvider::ChangeGeometries)) { - QMessageBox::information(0,"Change geometry", - "Data provider of the current layer doesn't allow changing geometries", + QMessageBox::information(0, QObject::tr("Change geometry"), + QObject::tr("Data provider of the current layer doesn't allow changing geometries"), QMessageBox::Ok); return; } if (!vlayer->isEditable()) { - QMessageBox::information(0,"Layer not editable", - "Cannot edit the vector layer. Use 'Start editing' in the legend item menu", + QMessageBox::information(0, QObject::tr("Layer not editable"), + QObject::tr("Cannot edit the vector layer. Use 'Start editing' in the legend item menu"), QMessageBox::Ok); return; } Index: src/gui/qgscustomprojectiondialog.cpp =================================================================== --- src/gui/qgscustomprojectiondialog.cpp (revision 6811) +++ src/gui/qgscustomprojectiondialog.cpp (working copy) @@ -414,7 +414,7 @@ //cboEllipsoid->setCurrentText(getEllipsoidName(myEllipsoidId)); leParameters->setText(QString::fromUtf8((char *)sqlite3_column_text(myPreparedStatement,4))); mCurrentRecordLong=1; - lblRecordNo->setText(QString::number(mCurrentRecordLong) + " of " + QString::number(mRecordCountLong)); + lblRecordNo->setText(QString::number(mCurrentRecordLong) + tr(" of ") + QString::number(mRecordCountLong)); } else { @@ -490,7 +490,7 @@ //cboEllipsoid->setCurrentText(getEllipsoidName(myEllipsoidId)); leParameters->setText(QString::fromUtf8((char *)sqlite3_column_text(myPreparedStatement,4))), --mCurrentRecordLong; - lblRecordNo->setText(QString::number(mCurrentRecordLong) + " of " + QString::number(mRecordCountLong)); + lblRecordNo->setText(QString::number(mCurrentRecordLong) + tr(" of ") + QString::number(mRecordCountLong)); } else { @@ -568,7 +568,7 @@ //cboEllipsoid->setCurrentText(getEllipsoidName(myEllipsoidId)); leParameters->setText(QString::fromUtf8((char *)sqlite3_column_text(myPreparedStatement,4))); ++mCurrentRecordLong; - lblRecordNo->setText(QString::number(mCurrentRecordLong) + " of " + QString::number(mRecordCountLong)); + lblRecordNo->setText(QString::number(mCurrentRecordLong) + tr(" of ") + QString::number(mRecordCountLong)); } else { @@ -641,7 +641,7 @@ //cboEllipsoid->setCurrentText(getEllipsoidName(myEllipsoidId)); leParameters->setText(QString::fromUtf8((char *)sqlite3_column_text(myPreparedStatement,4))); mCurrentRecordLong =mRecordCountLong; - lblRecordNo->setText(QString::number(mCurrentRecordLong) + " of " + QString::number(mRecordCountLong)); + lblRecordNo->setText(QString::number(mCurrentRecordLong) + tr(" of ") + QString::number(mRecordCountLong)); } else { @@ -710,7 +710,7 @@ leParameters->setText(""); //cboProjectionFamily->setCurrentItem(0); //cboEllipsoid->setCurrentItem(0); - lblRecordNo->setText("* of " + QString::number(mRecordCountLong)); + lblRecordNo->setText( tr("* of ") + QString::number(mRecordCountLong)); //remember the rec we are on in case the user aborts mLastRecordLong=mCurrentRecordLong; mCurrentRecordId=""; Index: src/gui/qgsoptions.cpp =================================================================== --- src/gui/qgsoptions.cpp (revision 6811) +++ src/gui/qgsoptions.cpp (working copy) @@ -239,7 +239,7 @@ #endif QString browser = QFileDialog::getOpenFileName( this, - "Choose a browser", + tr("Choose a browser"), "./", filter ); if(browser.length() > 0) Index: src/gui/qgssearchquerybuilder.cpp =================================================================== --- src/gui/qgssearchquerybuilder.cpp (revision 6811) +++ src/gui/qgssearchquerybuilder.cpp (working copy) @@ -31,7 +31,7 @@ { setupUi(this); - setWindowTitle("Search query builder"); + setWindowTitle(tr("Search query builder")); // disable unsupported operators btnIn->setEnabled(false); Index: src/gui/qgsmarkerdialog.cpp =================================================================== --- src/gui/qgsmarkerdialog.cpp (revision 6811) +++ src/gui/qgsmarkerdialog.cpp (working copy) @@ -68,7 +68,7 @@ void QgsMarkerDialog::changeDirectory() { QString newdir = QFileDialog::getExistingDirectory( - this, "Choose a directory", mCurrentDir); + this, tr("Choose a directory"), mCurrentDir); if (!newdir.isEmpty()) { mCurrentDir=newdir; Index: src/gui/qgsmaptoolcapture.cpp =================================================================== --- src/gui/qgsmaptoolcapture.cpp (revision 6811) +++ src/gui/qgsmaptoolcapture.cpp (working copy) @@ -78,14 +78,14 @@ if (!vlayer) { - QMessageBox::information(0,"Not a vector layer","The current layer is not a vector layer",QMessageBox::Ok); + QMessageBox::information(0, QObject::tr("Not a vector layer"), QObject::tr("The current layer is not a vector layer"),QMessageBox::Ok); return; } if (!vlayer->isEditable()) { - QMessageBox::information(0,"Layer not editable", - "Cannot edit the vector layer. To make it editable, go to the file item of the layer, right click and check 'Allow Editing'.", + QMessageBox::information(0,QObject::tr("Layer not editable"), + QObject::tr("Cannot edit the vector layer. To make it editable, go to the file item of the layer, right click and check 'Allow Editing'."), QMessageBox::Ok); return; } @@ -98,8 +98,8 @@ //check we only use this tool for point/multipoint layers if(vlayer->vectorType() != QGis::Point) { - QMessageBox::information(0,"Wrong editing tool", "Cannot apply the 'capture point' tool on this vector layer",\ -QMessageBox::Ok); + QMessageBox::information(0, QObject::tr("Wrong editing tool"), QObject::tr("Cannot apply the 'capture point' tool on this vector layer"), + QMessageBox::Ok); return; } QgsPoint idPoint = toMapCoords(e->pos()); @@ -182,7 +182,7 @@ //check we only use the line tool for line/multiline layers if(mTool == CaptureLine && vlayer->vectorType() != QGis::Line) { - QMessageBox::information(0,"Wrong editing tool", "Cannot apply the 'capture line' tool on this vector layer",\ + QMessageBox::information(0,QObject::tr("Wrong editing tool"), QObject::tr("Cannot apply the 'capture line' tool on this vector layer"),\ QMessageBox::Ok); return; } @@ -190,7 +190,7 @@ //check we only use the polygon tool for polygon/multipolygon layers if(mTool == CapturePolygon && vlayer->vectorType() != QGis::Polygon) { - QMessageBox::information(0,"Wrong editing tool", "Cannot apply the 'capture polygon' tool on this vector layer",\ + QMessageBox::information(0,QObject::tr("Wrong editing tool"), QObject::tr("Cannot apply the 'capture polygon' tool on this vector layer"),\ QMessageBox::Ok); return; } Index: src/gui/qgsattributetabledisplay.cpp =================================================================== --- src/gui/qgsattributetabledisplay.cpp (revision 6811) +++ src/gui/qgsattributetabledisplay.cpp (working copy) @@ -133,7 +133,7 @@ { if(!table()->addAttribute(dialog.name(),dialog.type())) { - QMessageBox::information(0,"Name conflict","The attribute could not be inserted. The name already exists in the table",QMessageBox::Ok); + QMessageBox::information(0,tr("Name conflict"),tr("The attribute could not be inserted. The name already exists in the table"),QMessageBox::Ok); } } } @@ -182,12 +182,12 @@ if(table()->edited()) { //commit or roll back? - int commit=QMessageBox::information(0,"Stop editing","Do you want to save the changes?",QMessageBox::Yes,QMessageBox::No); + int commit=QMessageBox::information(0,tr("Stop editing"),tr("Do you want to save the changes?"),QMessageBox::Yes,QMessageBox::No); if(commit==QMessageBox::Yes) { if(!table()->commitChanges(mLayer)) { - QMessageBox::information(0,"Error","Could not commit changes",QMessageBox::Ok); + QMessageBox::information(0,tr("Error"),tr("Could not commit changes"),QMessageBox::Ok); } } else Index: src/gui/qgspgquerybuilder.cpp =================================================================== --- src/gui/qgspgquerybuilder.cpp (revision 6811) +++ src/gui/qgspgquerybuilder.cpp (working copy) @@ -212,7 +212,7 @@ }else { - QMessageBox::warning(this, tr("Database error"), tr("
Failed to get sample of field values using SQL:
") + sql + "
Error message was: "+ QString(PQerrorMessage(mPgConnection)) + "
"); + QMessageBox::warning(this, tr("Database error"), tr("Failed to get sample of field values using SQL:
") + sql + tr("
Error message was: ")+ QString(PQerrorMessage(mPgConnection)) + "
"); } // free the result set PQclear(result); @@ -267,7 +267,7 @@ // if there is no sql, issue a warning if(txtSQL->text().isEmpty()) { - QMessageBox::information(this, "No Query", "You must create a query before you can test it"); + QMessageBox::information(this, tr("No Query"), tr("You must create a query before you can test it")); } else { @@ -334,7 +334,7 @@ if(numRecs == -1) { //error in query - show the problem - QMessageBox::warning(this,"Error in Query", mPgErrorMessage); + QMessageBox::warning(this,tr("Error in Query"), mPgErrorMessage); } else { Index: src/gui/qgsvectorlayerproperties.cpp =================================================================== --- src/gui/qgsvectorlayerproperties.cpp (revision 6811) +++ src/gui/qgsvectorlayerproperties.cpp (working copy) @@ -503,8 +503,8 @@ QgsDebug( cse.what() ); myMetadataQString += "