Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
update translation strings
  • Loading branch information
jef-n committed Feb 18, 2018
1 parent 688e964 commit dcfe5ca
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/grass7/Grass7Algorithm.py
Expand Up @@ -479,7 +479,7 @@ def postInputs(self):
# Add the default parameters commands
self.commands.append(command)

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

def processCommand(self, parameters, context, delOutputs=False):
"""
Expand Down Expand Up @@ -611,7 +611,7 @@ def processCommand(self, parameters, context, delOutputs=False):

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

def vectorOutputType(self, parameters, context):
"""Determine vector output types for outputs"""
Expand Down
Expand Up @@ -59,7 +59,7 @@ def execute(self):
shutil.copy(f, ScriptUtils.scriptsFolders()[0])
valid += 1
except OSError as e:
QgsMessageLog.logMessage("Could not copy script '{}'\n{}".format(f, str(e)),
QgsMessageLog.logMessage(self.tr("Could not copy script '{}'\n{}").format(f, str(e)),
"Processing",
Qgis.Warning)

Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/script/ScriptUtils.py
Expand Up @@ -72,8 +72,8 @@ def loadAlgorithm(moduleName, filePath):
scriptsRegistry[x] = filePath
return obj()
except ImportError as e:
QgsMessageLog.logMessage("Could not import script algorithm '{}' from '{}'\n{}".format(moduleName, filePath, str(e)),
"Processing",
QgsMessageLog.logMessage(QCoreApplication.translate("ScriptUtils", "Could not import script algorithm '{}' from '{}'\n{}").format(moduleName, filePath, str(e)),
QCoreApplication.translate("ScriptUtils", "Processing"),
Qgis.Critical)


Expand Down
4 changes: 2 additions & 2 deletions src/3d/qgstessellator.cpp
Expand Up @@ -405,7 +405,7 @@ void QgsTessellator::addPolygon( const QgsPolygon &polygon, float extrusionHeigh
{
// Failed to fix that. It could be a really tiny geometry... or maybe they gave us
// geometry in unprojected lat/lon coordinates
QgsMessageLog::logMessage( "geometry's coordinates are too close to each other and simplification failed - skipping", "3D" );
QgsMessageLog::logMessage( QObject::tr( "geometry's coordinates are too close to each other and simplification failed - skipping" ), QObject::tr( "3D" ) );
return;
}
else
Expand All @@ -417,7 +417,7 @@ void QgsTessellator::addPolygon( const QgsPolygon &polygon, float extrusionHeigh
if ( !_check_intersecting_rings( *polygonNew.get() ) )
{
// skip the polygon - it would cause a crash inside poly2tri library
QgsMessageLog::logMessage( "polygon rings intersect each other - skipping", "3D" );
QgsMessageLog::logMessage( QObject::tr( "polygon rings intersect each other - skipping" ), QObject::tr( "3D" ) );
return;
}

Expand Down
4 changes: 2 additions & 2 deletions src/app/main.cpp
Expand Up @@ -822,11 +822,11 @@ int main( int argc, char *argv[] )
{
if ( ! QgsSettings::setGlobalSettingsPath( globalsettingsfile ) )
{
QgsMessageLog::logMessage( QStringLiteral( "Invalid globalsettingsfile path: %1" ).arg( globalsettingsfile ), QStringLiteral( "QGIS" ) );
QgsMessageLog::logMessage( QObject::tr( "Invalid globalsettingsfile path: %1" ).arg( globalsettingsfile ), QStringLiteral( "QGIS" ) );
}
else
{
QgsMessageLog::logMessage( QStringLiteral( "Successfully loaded globalsettingsfile path: %1" ).arg( globalsettingsfile ), QStringLiteral( "QGIS" ) );
QgsMessageLog::logMessage( QObject::tr( "Successfully loaded globalsettingsfile path: %1" ).arg( globalsettingsfile ), QStringLiteral( "QGIS" ) );
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmeasuretool.cpp
Expand Up @@ -152,7 +152,7 @@ void QgsMeasureTool::updateSettings()
}
catch ( QgsCsException &cse )
{
QgsMessageLog::logMessage( QStringLiteral( "Transform error caught at the MeasureTool: %1" ).arg( cse.what() ) );
QgsMessageLog::logMessage( tr( "Transform error caught at the MeasureTool: %1" ).arg( cse.what() ) );
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsprojectlayergroupdialog.cpp
Expand Up @@ -149,7 +149,7 @@ void QgsProjectLayerGroupDialog::changeProjectFile()
//check we are not embedding from/to the same project
if ( mProjectFileLineEdit->isVisible() && mProjectFileLineEdit->text() == QgsProject::instance()->fileName() )
{
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." ) );
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." ) );
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/expression/qgsexpressionfunction.cpp
Expand Up @@ -3391,7 +3391,7 @@ static QVariant fcnTransformGeometry( const QVariantList &values, const QgsExpre
}
catch ( QgsCsException &cse )
{
QgsMessageLog::logMessage( QStringLiteral( "Transform error caught in transform() function: %1" ).arg( cse.what() ) );
QgsMessageLog::logMessage( QObject::tr( "Transform error caught in transform() function: %1" ).arg( cse.what() ) );
return QVariant();
}
return QVariant();
Expand Down
10 changes: 5 additions & 5 deletions src/core/fieldformatter/qgsrelationreferencefieldformatter.cpp
Expand Up @@ -34,31 +34,31 @@ QString QgsRelationReferenceFieldFormatter::representValue( QgsVectorLayer *laye
// Some sanity checks
if ( !config.contains( QStringLiteral( "Relation" ) ) )
{
QgsMessageLog::logMessage( QStringLiteral( "Missing Relation in configuration" ) );
QgsMessageLog::logMessage( QObject::tr( "Missing Relation in configuration" ) );
return value.toString();
}
QgsRelation relation = QgsProject::instance()->relationManager()->relation( config[QStringLiteral( "Relation" )].toString() );
if ( !relation.isValid() )
{
QgsMessageLog::logMessage( QStringLiteral( "Invalid relation" ) );
QgsMessageLog::logMessage( QObject::tr( "Invalid relation" ) );
return value.toString();
}
QgsVectorLayer *referencingLayer = relation.referencingLayer();
if ( layer != referencingLayer )
{
QgsMessageLog::logMessage( QStringLiteral( "representValue() with inconsistent layer parameter w.r.t relation referencingLayer" ) );
QgsMessageLog::logMessage( QObject::tr( "representValue() with inconsistent layer parameter w.r.t relation referencingLayer" ) );
return value.toString();
}
int referencingFieldIdx = referencingLayer->fields().lookupField( relation.fieldPairs().at( 0 ).first );
if ( referencingFieldIdx != fieldIndex )
{
QgsMessageLog::logMessage( QStringLiteral( "representValue() with inconsistent fieldIndex parameter w.r.t relation referencingFieldIdx" ) );
QgsMessageLog::logMessage( QObject::tr( "representValue() with inconsistent fieldIndex parameter w.r.t relation referencingFieldIdx" ) );
return value.toString();
}
QgsVectorLayer *referencedLayer = relation.referencedLayer();
if ( !referencedLayer )
{
QgsMessageLog::logMessage( QStringLiteral( "Cannot find referenced layer" ) );
QgsMessageLog::logMessage( QObject::tr( "Cannot find referenced layer" ) );
return value.toString();
}

Expand Down
12 changes: 6 additions & 6 deletions src/core/qgsmapsettings.cpp
Expand Up @@ -414,7 +414,7 @@ QgsRectangle QgsMapSettings::layerExtentToOutputExtent( const QgsMapLayer *layer
}
catch ( QgsCsException &cse )
{
QgsMessageLog::logMessage( QStringLiteral( "Transform error caught: %1" ).arg( cse.what() ), QStringLiteral( "CRS" ) );
QgsMessageLog::logMessage( QObject::tr( "Transform error caught: %1" ).arg( cse.what() ), QObject::tr( "CRS" ) );
}

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

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

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

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

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

return rect;
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsprojectbadlayerhandler.cpp
Expand Up @@ -22,10 +22,10 @@

void QgsProjectBadLayerHandler::handleBadLayers( const QList<QDomNode> &layers )
{
QgsApplication::messageLog()->logMessage( QStringLiteral( "%1 bad layers dismissed:" ).arg( layers.size() ) );
QgsApplication::messageLog()->logMessage( QObject::tr( "%1 bad layers dismissed:" ).arg( layers.size() ) );
Q_FOREACH ( const QDomNode &layer, layers )
{
QgsApplication::messageLog()->logMessage( QStringLiteral( " * %1" ).arg( dataSource( layer ) ) );
QgsApplication::messageLog()->logMessage( QObject::tr( " * %1" ).arg( dataSource( layer ) ) );
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/gui/editorwidgets/core/qgseditorwidgetregistry.cpp
Expand Up @@ -170,12 +170,12 @@ bool QgsEditorWidgetRegistry::registerWidget( const QString &widgetId, QgsEditor
{
if ( !widgetFactory )
{
QgsApplication::messageLog()->logMessage( QStringLiteral( "QgsEditorWidgetRegistry: Factory not valid." ) );
QgsApplication::messageLog()->logMessage( tr( "QgsEditorWidgetRegistry: Factory not valid." ) );
return false;
}
else if ( mWidgetFactories.contains( widgetId ) )
{
QgsApplication::messageLog()->logMessage( QStringLiteral( "QgsEditorWidgetRegistry: Factory with id %1 already registered." ).arg( widgetId ) );
QgsApplication::messageLog()->logMessage( tr( "QgsEditorWidgetRegistry: Factory with id %1 already registered." ).arg( widgetId ) );
return false;
}
else
Expand Down
4 changes: 2 additions & 2 deletions src/gui/editorwidgets/qgsdatetimeeditwrapper.cpp
Expand Up @@ -59,7 +59,7 @@ void QgsDateTimeEditWrapper::initWidget( QWidget *editor )
if ( !mQDateTimeEdit )
{
QgsDebugMsg( "Date/time edit widget could not be initialized because provided widget is not a QDateTimeEdit." );
QgsMessageLog::logMessage( QStringLiteral( "Date/time edit widget could not be initialized because provided widget is not a QDateTimeEdit." ), QStringLiteral( "UI forms" ), Qgis::Warning );
QgsMessageLog::logMessage( tr( "Date/time edit widget could not be initialized because provided widget is not a QDateTimeEdit." ), tr( "UI forms" ), Qgis::Warning );
return;
}

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

if ( mQgsDateTimeEdit )
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wfs/qgswfsshareddata.cpp
Expand Up @@ -1043,7 +1043,7 @@ void QgsWFSSharedData::endOfDownload( bool success, int featureCount,
msg += " " + tr( "Zoom in to fetch all data." );
else
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." );
QgsMessageLog::logMessage( msg, QStringLiteral( "WFS" ) );
QgsMessageLog::logMessage( msg, tr( "WFS" ) );
}
}

Expand Down

0 comments on commit dcfe5ca

Please sign in to comment.