mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
update translation strings
This commit is contained in:
parent
688e964655
commit
dcfe5ca63f
@ -479,7 +479,7 @@ class Grass7Algorithm(QgsProcessingAlgorithm):
|
||||
# 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):
|
||||
"""
|
||||
@ -611,7 +611,7 @@ class Grass7Algorithm(QgsProcessingAlgorithm):
|
||||
|
||||
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"""
|
||||
|
@ -59,7 +59,7 @@ class AddScriptFromFileAction(ToolboxAction):
|
||||
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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
@ -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
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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() ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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 );
|
||||
@ -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 );
|
||||
@ -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;
|
||||
@ -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;
|
||||
@ -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;
|
||||
@ -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;
|
||||
|
@ -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 ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
@ -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 )
|
||||
|
@ -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" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user