Skip to content
Permalink
Browse files

add translation strings to diagram overlay plugin

git-svn-id: http://svn.osgeo.org/qgis/trunk@12022 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Nov 8, 2009
1 parent abe3093 commit 1c9ece47bb383b3a7eb9ca8165b0818f07151431
@@ -57,7 +57,7 @@ QgsDiagramDialog::QgsDiagramDialog( QgsVectorLayer* vl ): mVectorLayer( vl )
}
}

mClassificationTypeComboBox->insertItem( 0, "linearly scaling" );
mClassificationTypeComboBox->insertItem( 0, tr("linearly scaling") );

//if mVectorLayer already has a diagram overlay, apply its settings to this dialog
const QgsVectorOverlay* previousOverlay = mVectorLayer->findOverlayByType( "diagram" );
@@ -80,7 +80,7 @@ QgsDiagramDialog::~QgsDiagramDialog()

void QgsDiagramDialog::on_mClassificationTypeComboBox_currentIndexChanged( const QString& newType )
{
if ( newType == "linearly scaling" )
if ( newType == tr("linearly scaling") )
{
QWidget* currentWidget = mWidgetStackRenderers->currentWidget();
if ( currentWidget )
@@ -241,7 +241,7 @@ void QgsDiagramDialog::apply() const
}

//remove already existing diagram overlays
mVectorLayer-> removeOverlay( "diagram" );
mVectorLayer->removeOverlay( "diagram" );

//finally add the new overlay to the vector layer
mVectorLayer->addOverlay( diagramOverlay );
@@ -316,7 +316,7 @@ void QgsDiagramDialog::restoreSettings( const QgsVectorOverlay* overlay )
mClassificationComboBox->setCurrentIndex( mClassificationComboBox->findText( classFieldName ) );

//classification type (specific for renderer subclass)
mClassificationTypeComboBox->setCurrentIndex( mClassificationTypeComboBox->findText( "linearly scaling" ) );
mClassificationTypeComboBox->setCurrentIndex( mClassificationTypeComboBox->findText( tr("linearly scaling") ) );
}

//apply the renderer settings to the renderer specific dialog
@@ -31,9 +31,9 @@
#define QGISEXTERN extern "C"
#endif

static const QString pluginName = "Diagram Overlay";
static const QString pluginDescription = "A plugin for placing diagrams on vector layers";
static const QString pluginVersion = "Version 0.0.1";
static const QString pluginName = QObject::tr( "Diagram Overlay" );
static const QString pluginDescription = QObject::tr( "A plugin for placing diagrams on vector layers" );
static const QString pluginVersion = QObject::tr( "Version 0.0.1" );

QgsDiagramOverlayPlugin::QgsDiagramOverlayPlugin( QgisInterface* iface ): QObject(), QgsVectorOverlayPlugin( pluginName, pluginDescription, pluginVersion ), mInterface( iface )
{

0 comments on commit 1c9ece4

Please sign in to comment.
You can’t perform that action at this time.