Skip to content

Commit

Permalink
Make the plugin name, description, and version available for
Browse files Browse the repository at this point in the history
translation.
Also tidy up the plugin descriptions.


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6301 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Dec 22, 2006
1 parent af3f3e6 commit c6938bd
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 42 deletions.
6 changes: 3 additions & 3 deletions src/plugins/copyright_label/plugin.cpp
Expand Up @@ -52,9 +52,9 @@ email : tim@linfiniti.com

static const char * const ident_ = "$Id$";

static const char * const name_ = "CopyrightLabel";
static const char * const description_ = "This plugin overlays copyright information on the rendered map.";
static const char * const version_ = "Version 0.1";
static const QString name_ = QObject::tr("CopyrightLabel");
static const QString description_ = QObject::tr("Draws copyright information");
static const QString version_ = QObject::tr("Version 0.1");
static const QgisPlugin::PLUGINTYPE type_ = QgisPlugin::UI;


Expand Down
13 changes: 7 additions & 6 deletions src/plugins/delimited_text/qgsdelimitedtextplugin.cpp
Expand Up @@ -46,7 +46,8 @@
#define QGISEXTERN extern "C"
#endif

static const char *pluginVersion = "Version 0.2";
static const QString pluginVersion = QObject::tr("Version 0.2");
static const QString description_ = QObject::tr("Loads and displays delimited text files containing x,y coordinates");
/**
* Constructor for the plugin. The plugin is passed a pointer to the main app
* and an interface object that provides access to exposed functions in QGIS.
Expand All @@ -57,9 +58,9 @@ static const char *pluginVersion = "Version 0.2";
qgisMainWindowPointer(theQGisApp), qGisInterface(theQgisInterFace)
{
/** Initialize the plugin and set the required attributes */
pluginNameQString = "DelimitedTextLayer";
pluginVersionQString = "Version 0.1";
pluginDescriptionQString = "This plugin provides support for delimited text files containing x,y coordinates";
pluginNameQString = tr("DelimitedTextLayer");
pluginVersionQString = pluginVersion;
pluginDescriptionQString = description_;

}

Expand Down Expand Up @@ -162,13 +163,13 @@ QGISEXTERN QgisPlugin * classFactory(QgisApp * theQGisAppPointer,
// the class may not yet be insantiated when this method is called.
QGISEXTERN QString name()
{
return QString("Add Delimited Text Layer");
return QString(QObject::tr("Add Delimited Text Layer"));
}

// Return the description
QGISEXTERN QString description()
{
return QString("This plugin provides support for delimited text files containing x,y coordinates");
return description_;
}

// Return the type (either UI or MapLayer plugin)
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/georeferencer/plugin.cpp
Expand Up @@ -60,9 +60,9 @@
#endif

static const char * const sIdent = "$Id$";
static const char * const sName = "Georeferencer";
static const char * const sDescription = "The georeferencer plugin is a tool for adding projection info to rasters";
static const char * const sPluginVersion = "Version 0.1";
static const QString sName = QObject::tr("Georeferencer");
static const QString sDescription = QObject::tr("Adding projection info to rasters");
static const QString sPluginVersion = QObject::tr("Version 0.1");
static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI;

//////////////////////////////////////////////////////////////////////
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/gps_importer/qgsgpsplugin.cpp
Expand Up @@ -57,10 +57,10 @@

static const char * const ident_ =
"$Id$";
static const char * const name_ = "GPS Tools";
static const char * const description_ =
"Tools for loading and importing GPS data.";
static const char * const version_ = "Version 0.1";
static const QString name_ = QObject::tr("GPS Tools");
static const QString description_ =
QObject::tr("Tools for loading and importing GPS data");
static const QString version_ = QObject::tr("Version 0.1");
static const QgisPlugin::PLUGINTYPE type_ = QgisPlugin::UI;


Expand Down
12 changes: 6 additions & 6 deletions src/plugins/grass/qgsgrassplugin.cpp
Expand Up @@ -77,7 +77,7 @@ extern "C" {
#include "grass_edit.xpm"
#include "grass_region.xpm"
#include "grass_region_edit.xpm"
static const char *pluginVersion = "Version 0.1";
static const QString pluginVersion = QObject::tr("Version 0.1");

/**
* Constructor for the plugin. The plugin is passed a pointer to the main app
Expand All @@ -89,9 +89,9 @@ QgsGrassPlugin::QgsGrassPlugin(QgisApp * theQGisApp, QgisIface * theQgisInterFac
mQgis(theQGisApp), qGisInterface(theQgisInterFace)
{
/** Initialize the plugin and set the required attributes */
pluginNameQString = "GrassVector";
pluginVersionQString = "0.1";
pluginDescriptionQString = "GRASS layer";
pluginNameQString = tr("GrassVector");
pluginVersionQString = tr("0.1");
pluginDescriptionQString = tr("GRASS layer");
}

QgsGrassPlugin::~QgsGrassPlugin()
Expand Down Expand Up @@ -831,13 +831,13 @@ extern "C" QgisPlugin * classFactory(QgisApp * theQGisAppPointer, QgisIface * th
// the class may not yet be insantiated when this method is called.
extern "C" QString name()
{
return QString("GRASS");
return QObject::tr("GRASS");
}

// Return the description
extern "C" QString description()
{
return QString("GRASS layer");
return QObject::tr("GRASS layer");
}

// Return the type (either UI or MapLayer plugin)
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/grid_maker/plugin.cpp
Expand Up @@ -47,9 +47,9 @@ email : tim@linfiniti.com

static const char * const ident_ = "$Id$";

static const char * const name_ = "Graticule Creator";
static const char * const description_ = "A graticule building plugin.";
static const char * const version_ = "Version 0.1";
static const QString name_ = QObject::tr("Graticule Creator");
static const QString description_ = QObject::tr("Builds a graticule");
static const QString version_ = QObject::tr("Version 0.1");
static const QgisPlugin::PLUGINTYPE type_ = QgisPlugin::UI;
/**
* Constructor for the plugin. The plugin is passed a pointer to the main app
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/north_arrow/plugin.cpp
Expand Up @@ -54,9 +54,9 @@ email : tim@linfiniti.com
//
static const char * const ident_ = "$Id$";

static const char * const name_ = "NorthArrow";
static const char * const description_ = "This plugin displays a north arrow overlayed onto the map.";
static const char * const version_ = "Version 0.1";
static const QString name_ = QObject::tr("NorthArrow");
static const QString description_ = QObject::tr("Displays a north arrow overlayed onto the map");
static const QString version_ = QObject::tr("Version 0.1");
static const QgisPlugin::PLUGINTYPE type_ = QgisPlugin::UI;

const double QgsNorthArrowPlugin::PI = 3.14159265358979323846;
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/plugin_template/plugin.cpp
Expand Up @@ -53,9 +53,9 @@
#endif

static const char * const sIdent = "$Id$";
static const char * const sName = "[menuitemname]";
static const char * const sDescription = "[plugindescription]";
static const char * const sPluginVersion = "Version 0.1";
static const QString sName = QObject::tr("[menuitemname]");
static const QString sDescription = QObject::tr("[plugindescription]");
static const QString sPluginVersion = QObject::tr("Version 0.1");
static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI;

//////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/qgisplugin.h
Expand Up @@ -21,7 +21,7 @@
#define QGISPLUGIN_H


#include <qstring.h>
#include <QString>

#include <qgisapp.h>

Expand Down
6 changes: 3 additions & 3 deletions src/plugins/scale_bar/plugin.cpp
Expand Up @@ -59,9 +59,9 @@ email : sbr00pwb@users.sourceforge.net

static const char * const ident_ = "$Id$";

static const char * const name_ = "ScaleBar";
static const char * const description_ = "Plugin to draw scale bar on map";
static const char * const version_ = "Version 0.1";
static const QString name_ = QObject::tr("ScaleBar");
static const QString description_ = QObject::tr("Draws a scale bar");
static const QString version_ = QObject::tr("Version 0.1");
static const QgisPlugin::PLUGINTYPE type_ = QgisPlugin::UI;


Expand Down
6 changes: 3 additions & 3 deletions src/plugins/spit/qgsspitplugin.cpp
Expand Up @@ -39,9 +39,9 @@

static const char * const ident_ = "$Id$";

static const char * const name_ = "SPIT";
static const char * const description_ = "Shapefile to PostgreSQL/PostGIS Import Tool";
static const char * const version_ = "Version 0.1";
static const QString name_ = QObject::tr("SPIT");
static const QString description_ = QObject::tr("Shapefile to PostgreSQL/PostGIS Import Tool");
static const QString version_ = QObject::tr("Version 0.1");
static const QgisPlugin::PLUGINTYPE type_ = QgisPlugin::UI;


Expand Down
12 changes: 8 additions & 4 deletions src/plugins/wfs/qgswfsplugin.cpp
Expand Up @@ -30,7 +30,11 @@
#define QGISEXTERN extern "C"
#endif

QgsWFSPlugin::QgsWFSPlugin(QgisApp* app, QgisIface* iface): QgisPlugin("WFS plugin", "A plugin to add WFS layers to the QGIS canvas", "Version 0.0001", QgisPlugin::MAPLAYER), mApp(app), mIface(iface), mWfsDialogAction(0)
static const QString name_ = QObject::tr("WFS plugin");
static const QString description_ = QObject::tr("Adds WFS layers to the QGIS canvas");
static const QString version_ = QObject::tr("Version 0.0001");

QgsWFSPlugin::QgsWFSPlugin(QgisApp* app, QgisIface* iface): QgisPlugin(name_, description_, version_, QgisPlugin::MAPLAYER), mApp(app), mIface(iface), mWfsDialogAction(0)
{

}
Expand Down Expand Up @@ -72,17 +76,17 @@ QGISEXTERN QgisPlugin * classFactory(QgisApp * theQGisAppPointer, QgisIface * th

QGISEXTERN QString name()
{
return QString("WFS plugin");
return name_;
}

QGISEXTERN QString description()
{
return QString("A plugin to add WFS layers to the QGIS canvas");
return description_;
}

QGISEXTERN QString version()
{
return QString("Version 0.0001");
return version_;
}

QGISEXTERN int type()
Expand Down

0 comments on commit c6938bd

Please sign in to comment.