From 1c9ece47bb383b3a7eb9ca8165b0818f07151431 Mon Sep 17 00:00:00 2001 From: jef Date: Sun, 8 Nov 2009 16:44:54 +0000 Subject: [PATCH] add translation strings to diagram overlay plugin git-svn-id: http://svn.osgeo.org/qgis/trunk@12022 c8812cc2-4d05-0410-92ff-de0c093fc19c --- src/plugins/diagram_overlay/qgsdiagramdialog.cpp | 8 ++++---- src/plugins/diagram_overlay/qgsdiagramoverlayplugin.cpp | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/diagram_overlay/qgsdiagramdialog.cpp b/src/plugins/diagram_overlay/qgsdiagramdialog.cpp index 9ec5ea66235..47d9f144986 100644 --- a/src/plugins/diagram_overlay/qgsdiagramdialog.cpp +++ b/src/plugins/diagram_overlay/qgsdiagramdialog.cpp @@ -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 diff --git a/src/plugins/diagram_overlay/qgsdiagramoverlayplugin.cpp b/src/plugins/diagram_overlay/qgsdiagramoverlayplugin.cpp index fb01b337d14..4b4841ea0d5 100644 --- a/src/plugins/diagram_overlay/qgsdiagramoverlayplugin.cpp +++ b/src/plugins/diagram_overlay/qgsdiagramoverlayplugin.cpp @@ -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 ) {