Skip to content

Commit dcfe5ca

Browse files
committed
update translation strings
1 parent 688e964 commit dcfe5ca

14 files changed

+30
-30
lines changed

python/plugins/processing/algs/grass7/Grass7Algorithm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ def postInputs(self):
479479
# Add the default parameters commands
480480
self.commands.append(command)
481481

482-
QgsMessageLog.logMessage('processInputs end. Commands: {}'.format(self.commands), 'Grass7', Qgis.Info)
482+
QgsMessageLog.logMessage(self.tr('processInputs end. Commands: {}').format(self.commands), 'Grass7', Qgis.Info)
483483

484484
def processCommand(self, parameters, context, delOutputs=False):
485485
"""
@@ -611,7 +611,7 @@ def processCommand(self, parameters, context, delOutputs=False):
611611

612612
command += ' --overwrite'
613613
self.commands.append(command)
614-
QgsMessageLog.logMessage('processCommands end. Commands: {}'.format(self.commands), 'Grass7', Qgis.Info)
614+
QgsMessageLog.logMessage(self.tr('processCommands end. Commands: {}').format(self.commands), 'Grass7', Qgis.Info)
615615

616616
def vectorOutputType(self, parameters, context):
617617
"""Determine vector output types for outputs"""

python/plugins/processing/script/AddScriptFromFileAction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def execute(self):
5959
shutil.copy(f, ScriptUtils.scriptsFolders()[0])
6060
valid += 1
6161
except OSError as e:
62-
QgsMessageLog.logMessage("Could not copy script '{}'\n{}".format(f, str(e)),
62+
QgsMessageLog.logMessage(self.tr("Could not copy script '{}'\n{}").format(f, str(e)),
6363
"Processing",
6464
Qgis.Warning)
6565

python/plugins/processing/script/ScriptUtils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ def loadAlgorithm(moduleName, filePath):
7272
scriptsRegistry[x] = filePath
7373
return obj()
7474
except ImportError as e:
75-
QgsMessageLog.logMessage("Could not import script algorithm '{}' from '{}'\n{}".format(moduleName, filePath, str(e)),
76-
"Processing",
75+
QgsMessageLog.logMessage(QCoreApplication.translate("ScriptUtils", "Could not import script algorithm '{}' from '{}'\n{}").format(moduleName, filePath, str(e)),
76+
QCoreApplication.translate("ScriptUtils", "Processing"),
7777
Qgis.Critical)
7878

7979

src/3d/qgstessellator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ void QgsTessellator::addPolygon( const QgsPolygon &polygon, float extrusionHeigh
405405
{
406406
// Failed to fix that. It could be a really tiny geometry... or maybe they gave us
407407
// geometry in unprojected lat/lon coordinates
408-
QgsMessageLog::logMessage( "geometry's coordinates are too close to each other and simplification failed - skipping", "3D" );
408+
QgsMessageLog::logMessage( QObject::tr( "geometry's coordinates are too close to each other and simplification failed - skipping" ), QObject::tr( "3D" ) );
409409
return;
410410
}
411411
else
@@ -417,7 +417,7 @@ void QgsTessellator::addPolygon( const QgsPolygon &polygon, float extrusionHeigh
417417
if ( !_check_intersecting_rings( *polygonNew.get() ) )
418418
{
419419
// skip the polygon - it would cause a crash inside poly2tri library
420-
QgsMessageLog::logMessage( "polygon rings intersect each other - skipping", "3D" );
420+
QgsMessageLog::logMessage( QObject::tr( "polygon rings intersect each other - skipping" ), QObject::tr( "3D" ) );
421421
return;
422422
}
423423

src/app/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,11 +822,11 @@ int main( int argc, char *argv[] )
822822
{
823823
if ( ! QgsSettings::setGlobalSettingsPath( globalsettingsfile ) )
824824
{
825-
QgsMessageLog::logMessage( QStringLiteral( "Invalid globalsettingsfile path: %1" ).arg( globalsettingsfile ), QStringLiteral( "QGIS" ) );
825+
QgsMessageLog::logMessage( QObject::tr( "Invalid globalsettingsfile path: %1" ).arg( globalsettingsfile ), QStringLiteral( "QGIS" ) );
826826
}
827827
else
828828
{
829-
QgsMessageLog::logMessage( QStringLiteral( "Successfully loaded globalsettingsfile path: %1" ).arg( globalsettingsfile ), QStringLiteral( "QGIS" ) );
829+
QgsMessageLog::logMessage( QObject::tr( "Successfully loaded globalsettingsfile path: %1" ).arg( globalsettingsfile ), QStringLiteral( "QGIS" ) );
830830
}
831831
}
832832

src/app/qgsmeasuretool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ void QgsMeasureTool::updateSettings()
152152
}
153153
catch ( QgsCsException &cse )
154154
{
155-
QgsMessageLog::logMessage( QStringLiteral( "Transform error caught at the MeasureTool: %1" ).arg( cse.what() ) );
155+
QgsMessageLog::logMessage( tr( "Transform error caught at the MeasureTool: %1" ).arg( cse.what() ) );
156156
}
157157
}
158158

src/app/qgsprojectlayergroupdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void QgsProjectLayerGroupDialog::changeProjectFile()
149149
//check we are not embedding from/to the same project
150150
if ( mProjectFileLineEdit->isVisible() && mProjectFileLineEdit->text() == QgsProject::instance()->fileName() )
151151
{
152-
QMessageBox::critical( nullptr, tr( "Embed Layers and Groups" ), tr( "Recursive embedding is not allowed. It is not possible to embed layers / groups from the current project." ) );
152+
QMessageBox::critical( nullptr, tr( "Embed Layers and Groups" ), tr( "Recursive embedding is not supported. It is not possible to embed layers / groups from the current project." ) );
153153
return;
154154
}
155155

src/core/expression/qgsexpressionfunction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3391,7 +3391,7 @@ static QVariant fcnTransformGeometry( const QVariantList &values, const QgsExpre
33913391
}
33923392
catch ( QgsCsException &cse )
33933393
{
3394-
QgsMessageLog::logMessage( QStringLiteral( "Transform error caught in transform() function: %1" ).arg( cse.what() ) );
3394+
QgsMessageLog::logMessage( QObject::tr( "Transform error caught in transform() function: %1" ).arg( cse.what() ) );
33953395
return QVariant();
33963396
}
33973397
return QVariant();

src/core/fieldformatter/qgsrelationreferencefieldformatter.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,31 +34,31 @@ QString QgsRelationReferenceFieldFormatter::representValue( QgsVectorLayer *laye
3434
// Some sanity checks
3535
if ( !config.contains( QStringLiteral( "Relation" ) ) )
3636
{
37-
QgsMessageLog::logMessage( QStringLiteral( "Missing Relation in configuration" ) );
37+
QgsMessageLog::logMessage( QObject::tr( "Missing Relation in configuration" ) );
3838
return value.toString();
3939
}
4040
QgsRelation relation = QgsProject::instance()->relationManager()->relation( config[QStringLiteral( "Relation" )].toString() );
4141
if ( !relation.isValid() )
4242
{
43-
QgsMessageLog::logMessage( QStringLiteral( "Invalid relation" ) );
43+
QgsMessageLog::logMessage( QObject::tr( "Invalid relation" ) );
4444
return value.toString();
4545
}
4646
QgsVectorLayer *referencingLayer = relation.referencingLayer();
4747
if ( layer != referencingLayer )
4848
{
49-
QgsMessageLog::logMessage( QStringLiteral( "representValue() with inconsistent layer parameter w.r.t relation referencingLayer" ) );
49+
QgsMessageLog::logMessage( QObject::tr( "representValue() with inconsistent layer parameter w.r.t relation referencingLayer" ) );
5050
return value.toString();
5151
}
5252
int referencingFieldIdx = referencingLayer->fields().lookupField( relation.fieldPairs().at( 0 ).first );
5353
if ( referencingFieldIdx != fieldIndex )
5454
{
55-
QgsMessageLog::logMessage( QStringLiteral( "representValue() with inconsistent fieldIndex parameter w.r.t relation referencingFieldIdx" ) );
55+
QgsMessageLog::logMessage( QObject::tr( "representValue() with inconsistent fieldIndex parameter w.r.t relation referencingFieldIdx" ) );
5656
return value.toString();
5757
}
5858
QgsVectorLayer *referencedLayer = relation.referencedLayer();
5959
if ( !referencedLayer )
6060
{
61-
QgsMessageLog::logMessage( QStringLiteral( "Cannot find referenced layer" ) );
61+
QgsMessageLog::logMessage( QObject::tr( "Cannot find referenced layer" ) );
6262
return value.toString();
6363
}
6464

src/core/qgsmapsettings.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ QgsRectangle QgsMapSettings::layerExtentToOutputExtent( const QgsMapLayer *layer
414414
}
415415
catch ( QgsCsException &cse )
416416
{
417-
QgsMessageLog::logMessage( QStringLiteral( "Transform error caught: %1" ).arg( cse.what() ), QStringLiteral( "CRS" ) );
417+
QgsMessageLog::logMessage( QObject::tr( "Transform error caught: %1" ).arg( cse.what() ), QObject::tr( "CRS" ) );
418418
}
419419

420420
QgsDebugMsgLevel( QString( "proj extent = " + extent.toString() ), 3 );
@@ -438,7 +438,7 @@ QgsRectangle QgsMapSettings::outputExtentToLayerExtent( const QgsMapLayer *layer
438438
}
439439
catch ( QgsCsException &cse )
440440
{
441-
QgsMessageLog::logMessage( QStringLiteral( "Transform error caught: %1" ).arg( cse.what() ), QStringLiteral( "CRS" ) );
441+
QgsMessageLog::logMessage( QObject::tr( "Transform error caught: %1" ).arg( cse.what() ), QObject::tr( "CRS" ) );
442442
}
443443

444444
QgsDebugMsgLevel( QString( "proj extent = " + extent.toString() ), 3 );
@@ -457,7 +457,7 @@ QgsPointXY QgsMapSettings::layerToMapCoordinates( const QgsMapLayer *layer, QgsP
457457
}
458458
catch ( QgsCsException &cse )
459459
{
460-
QgsMessageLog::logMessage( QStringLiteral( "Transform error caught: %1" ).arg( cse.what() ), QStringLiteral( "CRS" ) );
460+
QgsMessageLog::logMessage( QObject::tr( "Transform error caught: %1" ).arg( cse.what() ), QObject::tr( "CRS" ) );
461461
}
462462

463463
return point;
@@ -474,7 +474,7 @@ QgsRectangle QgsMapSettings::layerToMapCoordinates( const QgsMapLayer *layer, Qg
474474
}
475475
catch ( QgsCsException &cse )
476476
{
477-
QgsMessageLog::logMessage( QStringLiteral( "Transform error caught: %1" ).arg( cse.what() ), QStringLiteral( "CRS" ) );
477+
QgsMessageLog::logMessage( QObject::tr( "Transform error caught: %1" ).arg( cse.what() ), QObject::tr( "CRS" ) );
478478
}
479479

480480
return rect;
@@ -491,7 +491,7 @@ QgsPointXY QgsMapSettings::mapToLayerCoordinates( const QgsMapLayer *layer, QgsP
491491
}
492492
catch ( QgsCsException &cse )
493493
{
494-
QgsMessageLog::logMessage( QStringLiteral( "Transform error caught: %1" ).arg( cse.what() ), QStringLiteral( "CRS" ) );
494+
QgsMessageLog::logMessage( QObject::tr( "Transform error caught: %1" ).arg( cse.what() ), QObject::tr( "CRS" ) );
495495
}
496496

497497
return point;
@@ -508,7 +508,7 @@ QgsRectangle QgsMapSettings::mapToLayerCoordinates( const QgsMapLayer *layer, Qg
508508
}
509509
catch ( QgsCsException &cse )
510510
{
511-
QgsMessageLog::logMessage( QStringLiteral( "Transform error caught: %1" ).arg( cse.what() ), QStringLiteral( "CRS" ) );
511+
QgsMessageLog::logMessage( QObject::tr( "Transform error caught: %1" ).arg( cse.what() ), QObject::tr( "CRS" ) );
512512
}
513513

514514
return rect;

src/core/qgsprojectbadlayerhandler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222

2323
void QgsProjectBadLayerHandler::handleBadLayers( const QList<QDomNode> &layers )
2424
{
25-
QgsApplication::messageLog()->logMessage( QStringLiteral( "%1 bad layers dismissed:" ).arg( layers.size() ) );
25+
QgsApplication::messageLog()->logMessage( QObject::tr( "%1 bad layers dismissed:" ).arg( layers.size() ) );
2626
Q_FOREACH ( const QDomNode &layer, layers )
2727
{
28-
QgsApplication::messageLog()->logMessage( QStringLiteral( " * %1" ).arg( dataSource( layer ) ) );
28+
QgsApplication::messageLog()->logMessage( QObject::tr( " * %1" ).arg( dataSource( layer ) ) );
2929
}
3030
}
3131

src/gui/editorwidgets/core/qgseditorwidgetregistry.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,12 @@ bool QgsEditorWidgetRegistry::registerWidget( const QString &widgetId, QgsEditor
170170
{
171171
if ( !widgetFactory )
172172
{
173-
QgsApplication::messageLog()->logMessage( QStringLiteral( "QgsEditorWidgetRegistry: Factory not valid." ) );
173+
QgsApplication::messageLog()->logMessage( tr( "QgsEditorWidgetRegistry: Factory not valid." ) );
174174
return false;
175175
}
176176
else if ( mWidgetFactories.contains( widgetId ) )
177177
{
178-
QgsApplication::messageLog()->logMessage( QStringLiteral( "QgsEditorWidgetRegistry: Factory with id %1 already registered." ).arg( widgetId ) );
178+
QgsApplication::messageLog()->logMessage( tr( "QgsEditorWidgetRegistry: Factory with id %1 already registered." ).arg( widgetId ) );
179179
return false;
180180
}
181181
else

src/gui/editorwidgets/qgsdatetimeeditwrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void QgsDateTimeEditWrapper::initWidget( QWidget *editor )
5959
if ( !mQDateTimeEdit )
6060
{
6161
QgsDebugMsg( "Date/time edit widget could not be initialized because provided widget is not a QDateTimeEdit." );
62-
QgsMessageLog::logMessage( QStringLiteral( "Date/time edit widget could not be initialized because provided widget is not a QDateTimeEdit." ), QStringLiteral( "UI forms" ), Qgis::Warning );
62+
QgsMessageLog::logMessage( tr( "Date/time edit widget could not be initialized because provided widget is not a QDateTimeEdit." ), tr( "UI forms" ), Qgis::Warning );
6363
return;
6464
}
6565

@@ -88,7 +88,7 @@ void QgsDateTimeEditWrapper::initWidget( QWidget *editor )
8888
{
8989
QgsApplication::messageLog()->logMessage( tr( "The usual date/time widget QDateTimeEdit cannot be configured to allow NULL values. "
9090
"For that the QGIS custom widget QgsDateTimeEdit needs to be used." ),
91-
QStringLiteral( "field widgets" ) );
91+
tr( "field widgets" ) );
9292
}
9393

9494
if ( mQgsDateTimeEdit )

src/providers/wfs/qgswfsshareddata.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ void QgsWFSSharedData::endOfDownload( bool success, int featureCount,
10431043
msg += " " + tr( "Zoom in to fetch all data." );
10441044
else
10451045
msg += " " + tr( "You may want to check the 'Only request features overlapping the view extent' option to be able to zoom in to fetch all data." );
1046-
QgsMessageLog::logMessage( msg, QStringLiteral( "WFS" ) );
1046+
QgsMessageLog::logMessage( msg, tr( "WFS" ) );
10471047
}
10481048
}
10491049

0 commit comments

Comments
 (0)