Index: src/plugins/grass/qgsgrassattributes.cpp
===================================================================
--- src/plugins/grass/qgsgrassattributes.cpp (revision 5884)
+++ src/plugins/grass/qgsgrassattributes.cpp (working copy)
@@ -310,7 +310,7 @@
QString *error = mProvider->updateAttributes ( tb->text(0,1).toInt(), tb->text(1,1).toInt(), sql );
if ( !error->isEmpty() ) {
- QMessageBox::warning( 0, "Warning", *error );
+ QMessageBox::warning( 0, tr("Warning"), *error );
resultLabel->setText ( "ERROR" );
} else {
resultLabel->setText ( "OK" );
Index: src/plugins/grass/qgsgrassbrowser.cpp
===================================================================
--- src/plugins/grass/qgsgrassbrowser.cpp (revision 5884)
+++ src/plugins/grass/qgsgrassbrowser.cpp (working copy)
@@ -285,9 +285,9 @@
{
QString output ( process.readAllStandardOutput () );
QString error ( process.readAllStandardError () );
- QMessageBox::warning( 0, "Warning", "Cannot copy map "
+ QMessageBox::warning( 0, tr("Warning"), tr("Cannot copy map ")
+ map + "@" + mapset
- + "
command: " + module + " " + args.join(" ")
+ + tr("
command: ") + module + " " + args.join(" ")
+ "
" + formatMessage(output)
+ "
" + formatMessage(error) );
}
@@ -351,9 +351,9 @@
{
QString output ( process.readAllStandardOutput () );
QString error ( process.readAllStandardError () );
- QMessageBox::warning( 0, "Warning", "Cannot rename map "
+ QMessageBox::warning( 0, tr("Warning"), tr("Cannot rename map ")
+ map
- + "
command: " + module + " " + args.join(" ")
+ + tr("
command: ") + module + " " + args.join(" ")
+ "
" + formatMessage(output)
+ "
" + formatMessage(error) );
}
@@ -389,8 +389,8 @@
continue; // should not happen
}
- int ret = QMessageBox::question ( 0, "Warning",
- "Delete map " + map + "",
+ int ret = QMessageBox::question ( 0, tr("Warning"),
+ tr("Delete map ") + map + "",
QMessageBox::Yes, QMessageBox::No );
if ( ret == QMessageBox::No ) continue;
@@ -406,9 +406,9 @@
{
QString output ( process.readAllStandardOutput () );
QString error ( process.readAllStandardError () );
- QMessageBox::warning( 0, "Warning", "Cannot delete map "
+ QMessageBox::warning( 0, tr("Warning"), tr("Cannot delete map ")
+ map
- + "
command: " + module + " " + args.join(" ")
+ + tr("
command: ") + module + " " + args.join(" ")
+ "
" + formatMessage(output)
+ "
" + formatMessage(error) );
}
@@ -450,8 +450,8 @@
if ( G_put_window ( window ) == -1 )
{
- QMessageBox::warning( 0, "Warning",
- "Cannot write new region" );
+ QMessageBox::warning( 0, tr("Warning"),
+ tr("Cannot write new region") );
return;
}
emit regionChanged();
Index: src/plugins/grass/qgsgrassedit.cpp
===================================================================
--- src/plugins/grass/qgsgrassedit.cpp (revision 5884)
+++ src/plugins/grass/qgsgrassedit.cpp (working copy)
@@ -223,13 +223,13 @@
void QgsGrassEdit::init()
{
if ( !(mProvider->isGrassEditable()) ) {
- QMessageBox::warning( 0, "Warning", "You are not owner of the mapset, "
- "cannot open the vector for editing." );
+ QMessageBox::warning( 0, tr("Warning"), tr("You are not owner of the mapset, "
+ "cannot open the vector for editing.") );
return;
}
if ( !(mProvider->startEdit()) ) {
- QMessageBox::warning( 0, "Warning", "Cannot open vector for update." );
+ QMessageBox::warning( 0, tr("Warning"), tr("Cannot open vector for update." ));
return;
}
@@ -691,9 +691,9 @@
QString *error = mProvider->createTable ( field, mAttributeTable->item(0,0)->text(), sql );
if ( !error->isEmpty() ) {
- QMessageBox::warning( 0, "Warning", *error );
+ QMessageBox::warning( 0, tr("Warning"), *error );
} else {
- QMessageBox::information( 0, "Info", "The table was created" );
+ QMessageBox::information( 0, tr("Info"), tr("The table was created") );
QString str;
str.sprintf ( "%d", field );
mFieldBox->insertItem( str );
@@ -716,7 +716,7 @@
QString *error = mProvider->addColumn ( field, sql );
if ( !error->isEmpty() ) {
- QMessageBox::warning( 0, "Warning", *error );
+ QMessageBox::warning( 0, tr("Warning"), *error );
}
delete error;
}
@@ -1084,7 +1084,7 @@
QString *error = mProvider->insertAttributes ( field, cat );
if ( !error->isEmpty() ) {
- QMessageBox::warning( 0, "Warning", *error );
+ QMessageBox::warning( 0, tr("Warning"), *error );
}
delete error;
}
@@ -1323,7 +1323,7 @@
case EDIT_CATS:
mTool = NONE;
- QMessageBox::warning( 0, "Warning", "Tool not yet implemented." );
+ QMessageBox::warning( 0, tr("Warning"), tr("Tool not yet implemented.") );
break;
default:
@@ -1350,15 +1350,15 @@
QString *error = mProvider->isOrphan ( field, cat, &orphan );
if ( !error->isEmpty() ) {
- QMessageBox::warning( 0, "Warning", "Cannot check orphan record: "
+ QMessageBox::warning( 0, tr("Warning"), tr("Cannot check orphan record: ")
+ *error );
return;
}
if ( !orphan ) return;
- int ret = QMessageBox::question ( 0, "Warning",
- "Orphan record was left in attribute table. "
- "
Delete the record?",
+ int ret = QMessageBox::question ( 0, tr("Warning"),
+ tr("Orphan record was left in attribute table. "
+ "
Delete the record?"),
QMessageBox::Yes, QMessageBox::No );
if ( ret == QMessageBox::No ) return;
@@ -1366,7 +1366,7 @@
// Delete record
error = mProvider->deleteAttributes ( field, cat );
if ( !error->isEmpty() ) {
- QMessageBox::warning( 0, "Warning", "Cannot delete orphan record: "
+ QMessageBox::warning( 0, tr("Warning"), tr("Cannot delete orphan record: ")
+ *error );
return;
}
@@ -1395,7 +1395,7 @@
if ( cols->size() == 0 ) {
QString str;
str.setNum( field );
- QMessageBox::warning( 0, "Warning", "Cannot describe table for field " + str );
+ QMessageBox::warning( 0, tr("Warning"), tr("Cannot describe table for field ") + str );
} else {
std::vector *atts =
mProvider->attributes ( field, cat );
@@ -1452,7 +1452,7 @@
QString *error = mProvider->insertAttributes ( field, cat );
if ( !error->isEmpty() ) {
- QMessageBox::warning( 0, "Warning", *error );
+ QMessageBox::warning( 0, tr("Warning"), *error );
}
delete error;
}
Index: src/plugins/grass/qgsgrassmapcalc.cpp
===================================================================
--- src/plugins/grass/qgsgrassmapcalc.cpp (revision 5884)
+++ src/plugins/grass/qgsgrassmapcalc.cpp (working copy)
@@ -173,61 +173,61 @@
int t = QgsGrassMapcalcFunction::Operator;
//mFunctions.push_back(QgsGrassMapcalcFunction("-",2, "Odcitani", "in1,in2" ));
// Arithmetical
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "+", 2, "Addition" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "-", 2, "Subtraction"));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "*", 2, "Multiplication" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "/", 2, "Division" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "%", 2, "Modulus" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "^", 2, "Exponentiation" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "+", 2, tr("Addition" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "-", 2, tr("Subtraction")));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "*", 2, tr("Multiplication" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "/", 2, tr("Division" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "%", 2, tr("Modulus" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "^", 2, tr("Exponentiation" )));
// Logical
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "==", 2, "Equal" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "!=", 2, "Not equal" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, ">", 2, "Greater than" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, ">=", 2, "Greater than or equal" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "<", 2, "Less than" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "<=", 2, "Less than or equal" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "&&", 2, "And" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "||", 2, "Or" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "==", 2, tr("Equal" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "!=", 2, tr("Not equal" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, ">", 2, tr("Greater than" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, ">=", 2, tr("Greater than or equal" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "<", 2, tr("Less than" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "<=", 2, tr("Less than or equal" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "&&", 2, tr("And" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "||", 2, tr("Or" )));
t = QgsGrassMapcalcFunction::Function;
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "abs", 1, "Absolute value of x", "abs(x)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "atan", 1, "Inverse tangent of x (result is in degrees)", "atan(x)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "atan", 2, "Inverse tangent of y/x (result is in degrees)", "atan(x,y)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "col", 0, "Current column of moving window (starts with 1)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "cos", 1, "Cosine of x (x is in degrees)", "cos(x)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "double", 1, "Convert x to double-precision floating point", "double(x)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "ewres", 0, "Current east-west resolution" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "exp", 1, "Exponential function of x", "exp(x)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "exp", 2, "x to the power y", "exp(x,y)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "float", 2, "Convert x to single-precision floating point", "float(x)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "if", 1, "Decision: 1 if x not zero, 0 otherwise", "if(x)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "if", 2, "Decision: a if x not zero, 0 otherwise", "if(x,a)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "if", 3, "Decision: a if x not zero, b otherwise", "if(x,a,b)", "if,then,else", false ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "if", 4, "Decision: a if x > 0, b if x is zero, c if x < 0", "if(x,a,b,c)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "int", 1, "Convert x to integer [ truncates ]", "int(x)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "isnull", 1, "Check if x = NULL", "isnull(x)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "log", 1, "Natural log of x", "log(x)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "log", 2, "Log of x base b", "log(x,b)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "max", 2, "Largest value", "max(a,b)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "max", 3, "Largest value", "max(a,b,c)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "median", 2, "Median value", "median(a,b)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "median", 3, "Median value", "median(a,b,c)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "min", 2, "Smallest value", "min(a,b)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "min", 3, "Smallest value", "min(a,b,c)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "mode", 2, "Mode value", "mode(a,b)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "mode", 3, "Mode value", "mode(a,b,c)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "not", 1, "1 if x is zero, 0 otherwise", "not(x)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "nsres", 0, "Current north-south resolution" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "null", 0, "NULL value" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "rand", 2, "Random value between a and b", "rand(a,b)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "round", 1, "Round x to nearest integer", "round(x)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "row", 0, "Current row of moving window (Starts with 1)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "sin", 1, "Sine of x (x is in degrees)", "sin(x)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "sqrt", 1, "Square root of x", "sqrt(x)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "tan", 1, "Tangent of x (x is in degrees)", "tan(x)" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "x", 0, "Current x-coordinate of moving window" ));
- mFunctions.push_back(QgsGrassMapcalcFunction( t, "y", 0, "Current y-coordinate of moving window" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "abs", 1, tr("Absolute value of x"), "abs(x)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "atan", 1, tr("Inverse tangent of x (result is in degrees)"), "atan(x)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "atan", 2, tr("Inverse tangent of y/x (result is in degrees)"), "atan(x,y)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "col", 0, tr("Current column of moving window (starts with 1)") ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "cos", 1, tr("Cosine of x (x is in degrees)"), "cos(x)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "double", 1, tr("Convert x to double-precision floating point"), "double(x)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "ewres", 0, tr("Current east-west resolution" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "exp", 1, tr("Exponential function of x"), "exp(x)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "exp", 2, tr("x to the power y"), "exp(x,y)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "float", 2, tr("Convert x to single-precision floating point"), "float(x)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "if", 1, tr("Decision: 1 if x not zero, 0 otherwise"), "if(x)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "if", 2, tr("Decision: a if x not zero, 0 otherwise"), "if(x,a)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "if", 3, tr("Decision: a if x not zero, b otherwise"), "if(x,a,b)", "if,then,else", false ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "if", 4, tr("Decision: a if x > 0, b if x is zero, c if x < 0"), "if(x,a,b,c)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "int", 1, tr("Convert x to integer [ truncates ]"), "int(x)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "isnull", 1, tr("Check if x = NULL"), "isnull(x)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "log", 1, tr("Natural log of x"), "log(x)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "log", 2, tr("Log of x base b"), "log(x,b)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "max", 2, tr("Largest value"), "max(a,b)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "max", 3, tr("Largest value"), "max(a,b,c)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "median", 2, tr("Median value"), "median(a,b)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "median", 3, tr("Median value"), "median(a,b,c)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "min", 2, tr("Smallest value"), "min(a,b)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "min", 3, tr("Smallest value"), "min(a,b,c)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "mode", 2, tr("Mode value"), "mode(a,b)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "mode", 3, tr("Mode value"), "mode(a,b,c)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "not", 1, tr("1 if x is zero, 0 otherwise"), "not(x)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "nsres", 0, tr("Current north-south resolution" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "null", 0, tr("NULL value" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "rand", 2, tr("Random value between a and b"), "rand(a,b)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "round", 1, tr("Round x to nearest integer"), "round(x)" ));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "row", 0, tr("Current row of moving window (Starts with 1)" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "sin", 1, tr("Sine of x (x is in degrees)", "sin(x)" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "sqrt", 1, tr("Square root of x", "sqrt(x)" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "tan", 1, tr("Tangent of x (x is in degrees)", "tan(x)" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "x", 0, tr("Current x-coordinate of moving window" )));
+ mFunctions.push_back(QgsGrassMapcalcFunction( t, "y", 0, tr("Current y-coordinate of moving window" )));
for ( int i =0; i < mFunctions.size(); i++ )
{
@@ -526,7 +526,7 @@
QgsGrass::getDefaultLocation(),
QgsGrass::getDefaultMapset(), ¤tWindow ) )
{
- QMessageBox::warning( 0, "Warning", "Cannot get current region" );
+ QMessageBox::warning( 0, tr("Warning"), tr("Cannot get current region" ));
return list;
}
@@ -555,8 +555,8 @@
QgsGrass::getDefaultLocation(), mapset, map,
&window ) )
{
- QMessageBox::warning( 0, "Warning", "Cannot check region "
- "of map " + obj->value() );
+ QMessageBox::warning( 0, tr("Warning"), tr("Cannot check region "
+ "of map ") + obj->value() );
continue;
}
@@ -579,7 +579,7 @@
QgsGrass::getDefaultLocation(),
QgsGrass::getDefaultMapset(), window ) )
{
- QMessageBox::warning( 0, "Warning", "Cannot get current region" );
+ QMessageBox::warning( 0, tr("Warning"), tr("Cannot get current region" ));
return false;
}
@@ -611,8 +611,8 @@
QgsGrass::getDefaultLocation(), mapset, map,
&mapWindow ) )
{
- QMessageBox::warning( 0, "Warning", "Cannot get region "
- "of map " + obj->value() );
+ QMessageBox::warning( 0, tr("Warning"), tr("Cannot get region "
+ "of map ") + obj->value() );
return false;
}
@@ -806,8 +806,8 @@
updateMaps();
if ( mMaps.size() == 0 )
{
- QMessageBox::warning( 0, "Warning", "No GRASS raster maps"
- " currently in QGIS" );
+ QMessageBox::warning( 0, tr("Warning"), tr("No GRASS raster maps"
+ " currently in QGIS" ));
setTool ( AddConstant);
return;
@@ -1096,8 +1096,8 @@
if ( !d.mkdir("mapcalc" ) )
{
- QMessageBox::warning( 0, "Warning", "Cannot create 'mapcalc' "
- "directory in current mapset." );
+ QMessageBox::warning( 0, tr("Warning"), tr("Cannot create 'mapcalc' "
+ "directory in current mapset." ));
return;
}
}
@@ -1107,21 +1107,21 @@
while ( 1 )
{
bool ok;
- name = QInputDialog::getText( "New mapcalc",
- "Enter new mapcalc name:", QLineEdit::Normal, mFileName, &ok);
+ name = QInputDialog::getText( tr("New mapcalc"),
+ tr("Enter new mapcalc name:"), QLineEdit::Normal, mFileName, &ok);
if ( !ok ) return;
name = name.stripWhiteSpace();
if ( name.isEmpty() ) {
- QMessageBox::warning( 0, "Warning", "Enter vector name" );
+ QMessageBox::warning( 0, tr("Warning"), tr("Enter vector name" ));
continue;
}
// check if exists
if ( QFile::exists( mc+ "/" + name ) )
{
- int ret = QMessageBox::question ( 0, "Warning",
- "The file already exists. Overwrite? ",
+ int ret = QMessageBox::question ( 0, tr("Warning"),
+ tr("The file already exists. Overwrite? "),
QMessageBox::Yes, QMessageBox::No );
if ( ret == QMessageBox::No ) continue;
@@ -1141,7 +1141,7 @@
#endif
if ( mFileName.isEmpty() ) // Should not happen
{
- QMessageBox::warning (this, "Save mapcalc", "File name empty" );
+ QMessageBox::warning (this, tr("Save mapcalc"), tr("File name empty") );
return;
}
// TODO!!!: 'escape' < > & ...
@@ -1159,8 +1159,8 @@
QFile out ( path );
if ( !out.open( QIODevice::WriteOnly ) )
{
- QMessageBox::warning (this, "Save mapcalc",
- "Cannot open mapcalc file" );
+ QMessageBox::warning (this, tr("Save mapcalc"),
+ tr("Cannot open mapcalc file") );
return;
}
@@ -1289,14 +1289,14 @@
if ( !file.exists() ) // should not happen
{
- QMessageBox::warning( 0, "Warning", "The mapcalc schema ("
- + path + ") not found." );
+ QMessageBox::warning( 0, tr("Warning"), tr("The mapcalc schema (")
+ + path + tr(") not found." ));
return;
}
if ( ! file.open( QIODevice::ReadOnly ) )
{
- QMessageBox::warning( 0, "Warning", "Cannot open mapcalc schema ("
+ QMessageBox::warning( 0, tr("Warning"), tr("Cannot open mapcalc schema (")
+ path + ")" );
return;
@@ -1308,11 +1308,11 @@
int parsed = doc.setContent( &file, &err, &line, &column );
file.close();
if ( !parsed ) {
- QString errmsg = "Cannot read mapcalc schema (" + path + "):\n" + err
- + "\nat line " + QString::number(line)
- + " column " + QString::number(column);
+ QString errmsg = tr("Cannot read mapcalc schema (") + path + "):\n" + err
+ + tr("\nat line ") + QString::number(line)
+ + tr(" column ") + QString::number(column);
- QMessageBox::warning( 0, "Warning", errmsg );
+ QMessageBox::warning( 0, tr("Warning"), errmsg );
return;
}
Index: src/core/qgslabelattributes.cpp
===================================================================
--- src/core/qgslabelattributes.cpp (revision 5884)
+++ src/core/qgslabelattributes.cpp (working copy)
@@ -55,7 +55,7 @@
{
if ( def ) { // set defaults
- setText ( "Label" );
+ setText ("Label");
mFont = QApplication::font();
mFamilyIsSet = true;
Index: src/helpviewer/qgshelpviewer.cpp
===================================================================
--- src/helpviewer/qgshelpviewer.cpp (revision 5884)
+++ src/helpviewer/qgshelpviewer.cpp (working copy)
@@ -86,7 +86,7 @@
}
else
{
- QMessageBox::critical(this, "Error",
+ QMessageBox::critical(this, tr("Error"),
tr("Failed to get the help text from the database") + QString(":\n ")
+ sqlite3_errmsg(db));
}
Index: src/providers/delimitedtext/qgsdelimitedtextprovider.cpp
===================================================================
--- src/providers/delimitedtext/qgsdelimitedtextprovider.cpp (revision 5884)
+++ src/providers/delimitedtext/qgsdelimitedtextprovider.cpp (working copy)
@@ -745,7 +745,7 @@
QSettings settings;
QString enc;
QString shapefileName;
- QString filter = QString("Shapefiles (*.shp)");
+ QString filter = QString(tr("Shapefiles (*.shp)"));
QString dirName = settings.readEntry("/Plugin-DelimitedText/text_path", "./");
QgsEncodingFileDialog* openFileDialog = new QgsEncodingFileDialog(0,
@@ -821,8 +821,8 @@
name().toLocal8Bit().data() << " width length " << lengths[i] << std::endl;
if (poLayer->CreateField(&fld) != OGRERR_NONE)
{
- QMessageBox::warning(0, "Error",
- "Error creating field " + attrField.name());
+ QMessageBox::warning(0, tr("Error"),
+ tr("Error creating field ") + attrField.name());
}
}
// read the delimited text file and create the features
@@ -895,14 +895,14 @@
}
else
{
- QMessageBox::warning(0, "Error", "Layer creation failed");
+ QMessageBox::warning(0, tr("Error"), tr("Layer creation failed"));
}
}
else
{
- QMessageBox::warning(0, "Error creating shapefile",
- "The shapefile could not be created (" +
+ QMessageBox::warning(0, tr("Error creating shapefile"),
+ tr("The shapefile could not be created (") +
shapefileName + ")");
}
@@ -911,8 +911,8 @@
}
else
{
- QMessageBox::warning(0, "Driver not found",
- driverName + " driver is not available");
+ QMessageBox::warning(0, tr("Driver not found"),
+ driverName + tr(" driver is not available"));
returnValue = false;
}
return returnValue;
Index: src/providers/mysql/qgsmysqlprovider.cpp
===================================================================
--- src/providers/mysql/qgsmysqlprovider.cpp (revision 5884)
+++ src/providers/mysql/qgsmysqlprovider.cpp (working copy)
@@ -887,8 +887,8 @@
name().toLocal8Bit().data() << " width length " << lengths[i] << std::endl;
if (poLayer->CreateField(&fld) != OGRERR_NONE)
{
- QMessageBox::warning(0, "Error",
- "Error creating field " + attrField.name());
+ QMessageBox::warning(0, tr("Error"),
+ tr("Error creating field ") + attrField.name());
}
}
// read the MySQL file and create the features
@@ -967,14 +967,14 @@
}
else
{
- QMessageBox::warning(0, "Error", "Layer creation failed");
+ QMessageBox::warning(0, tr("Error"), tr("Layer creation failed"));
}
}
else
{
- QMessageBox::warning(0, "Error creating shapefile",
- "The shapefile could not be created (" +
+ QMessageBox::warning(0, tr("Error creating shapefile"),
+ tr("The shapefile could not be created (") +
shapefileName + ")");
}
@@ -983,8 +983,8 @@
}
else
{
- QMessageBox::warning(0, "Driver not found",
- driverName + " driver is not available");
+ QMessageBox::warning(0, tr("Driver not found"),
+ driverName + tr(" driver is not available"));
returnValue = false;
}
return returnValue;
Index: src/providers/wms/qgshttptransaction.cpp
===================================================================
--- src/providers/wms/qgshttptransaction.cpp (revision 5884)
+++ src/providers/wms/qgshttptransaction.cpp (working copy)
@@ -1,4 +1,4 @@
-/***************************************************************************
+ /***************************************************************************
qgshttptransaction.cpp - Tracks a HTTP request with its response,
with particular attention to tracking
HTTP redirect responses
@@ -263,13 +263,13 @@
if (total)
{
- status = QString("Received %1 of %2 bytes")
+ status = QString(tr("Received %1 of %2 bytes"))
.arg( done )
.arg( total );
}
else
{
- status = QString("Received %1 bytes (total unknown)")
+ status = QString(tr("Received %1 bytes (total unknown)"))
.arg( done );
}
@@ -380,46 +380,46 @@
{
case QHttp::Unconnected:
QgsDebugMsg("There is no connection to the host.");
- emit setStatus( QString("Not connected") );
+ emit setStatus( QString(tr("Not connected")) );
break;
case QHttp::HostLookup:
QgsDebugMsg("A host name lookup is in progress.");
- emit setStatus( QString("Looking up '%1'")
+ emit setStatus( QString(tr("Looking up '%1'"))
.arg(httphost) );
break;
case QHttp::Connecting:
QgsDebugMsg("An attempt to connect to the host is in progress.");
- emit setStatus( QString("Connecting to '%1'")
+ emit setStatus( QString(tr("Connecting to '%1'"))
.arg(httphost) );
break;
case QHttp::Sending:
QgsDebugMsg("The client is sending its request to the server.");
- emit setStatus( QString("Sending request '%1'")
+ emit setStatus( QString(tr("Sending request '%1'"))
.arg(httpurl) );
break;
case QHttp::Reading:
QgsDebugMsg("The client's request has been sent and the client is reading the server's response.");
- emit setStatus( QString("Receiving reply") );
+ emit setStatus( QString(tr("Receiving reply")) );
break;
case QHttp::Connected:
QgsDebugMsg("The connection to the host is open, but the client is neither sending a request, nor waiting for a response.");
- emit setStatus( QString("Response is complete") );
+ emit setStatus( QString(tr("Response is complete")) );
break;
case QHttp::Closing:
QgsDebugMsg("The connection is closing down, but is not yet closed. (The state will be Unconnected when the connection is closed.)");
- emit setStatus( QString("Closing down connection") );
+ emit setStatus( QString(tr("Closing down connection")) );
break;
}
Index: src/providers/ogr/qgsogrfactory.cpp
===================================================================
--- src/providers/ogr/qgsogrfactory.cpp (revision 5884)
+++ src/providers/ogr/qgsogrfactory.cpp (working copy)
@@ -61,7 +61,7 @@
valid = true;
} else
{
- QMessageBox::warning(NULL, "Wrong Path/URI", "The provided path for the dataset is not valid.",QMessageBox::Ok, Qt::NoButton, Qt::NoButton);
+ QMessageBox::warning(NULL, tr("Wrong Path/URI"), tr("The provided path for the dataset is not valid."),QMessageBox::Ok, Qt::NoButton, Qt::NoButton);
valid = false;
}
}