Skip to content

Commit

Permalink
make some rendering errors translatable
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Aug 20, 2014
1 parent 1cba39d commit a34240d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/core/qgsmaprendererjob.cpp
Expand Up @@ -156,7 +156,7 @@ LayerRenderJobs QgsMapRendererJob::prepareJobs( QPainter* painter, QgsPalLabelin

if ( !ml )
{
mErrors.append( Error( layerId, "Layer not found in registry." ) );
mErrors.append( Error( layerId, tr( "Layer not found in registry." ) ) );
continue;
}

Expand Down Expand Up @@ -188,7 +188,7 @@ LayerRenderJobs QgsMapRendererJob::prepareJobs( QPainter* painter, QgsPalLabelin
QgsDebugMsg( "extent: " + r1.toString() );
if ( !r1.isFinite() || !r2.isFinite() )
{
mErrors.append( Error( layerId, "There was a problem transforming layer's' extent. Layer skipped." ) );
mErrors.append( Error( layerId, tr( "There was a problem transforming the layer's extent. Layer skipped." ) ) );
continue;
}
}
Expand Down Expand Up @@ -237,7 +237,7 @@ LayerRenderJobs QgsMapRendererJob::prepareJobs( QPainter* painter, QgsPalLabelin
mSettings.outputImageFormat() );
if ( mypFlattenedImage->isNull() )
{
mErrors.append( Error( layerId, "Insufficient memory for image " + QString::number( mSettings.outputSize().width() ) + "x" + QString::number( mSettings.outputSize().height() ) ) );
mErrors.append( Error( layerId, tr( "Insufficient memory for image %1x%2" ).arg( mSettings.outputSize().width() ).arg( mSettings.outputSize().height() ) ) );
delete mypFlattenedImage;
layerJobs.removeLast();
continue;
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsvectorlayerrenderer.cpp
Expand Up @@ -113,7 +113,7 @@ bool QgsVectorLayerRenderer::render()

if ( !mRendererV2 )
{
mErrors.append( "No renderer for drawing." );
mErrors.append( QObject::tr( "No renderer for drawing." ) );
return false;
}

Expand Down Expand Up @@ -146,7 +146,7 @@ bool QgsVectorLayerRenderer::render()
try
{
QgsPoint center = mContext.extent().center();
double rectSize = ct->sourceCrs().geographicFlag() ? 0.0008983 /* ~100/(40075014/360=111319.4833) */ : 100;
double rectSize = ct->sourceCrs().geographicFlag() ? 0.0008983 /* ~100/(40075014/360=111319.4833) */ : 100;

QgsRectangle sourceRect = QgsRectangle( center.x(), center.y(), center.x() + rectSize, center.y() + rectSize );
QgsRectangle targetRect = ct->transform( sourceRect );
Expand Down

0 comments on commit a34240d

Please sign in to comment.