Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add translation strings to diagram overlay plugin
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12022 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 8, 2009
1 parent 2482785 commit 2492f37
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/plugins/diagram_overlay/qgsdiagramdialog.cpp
Expand Up @@ -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" );
Expand All @@ -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 )
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/diagram_overlay/qgsdiagramoverlayplugin.cpp
Expand Up @@ -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 )
{
Expand Down

0 comments on commit 2492f37

Please sign in to comment.