Skip to content

Commit 3fe67c1

Browse files
author
jef
committedJan 28, 2011
some translation string fixes in road graph plugin
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15098 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

7 files changed

+45
-45
lines changed

7 files changed

+45
-45
lines changed
 

‎src/plugins/roadgraph/exportdlg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ RgExportDlg::RgExportDlg( QWidget* parent, Qt::WFlags fl )
3535
QVBoxLayout *v = new QVBoxLayout( this );
3636

3737
QHBoxLayout *h = new QHBoxLayout();
38-
QLabel *l = new QLabel( tr( "Select destination layer:" ), this );
38+
QLabel *l = new QLabel( tr( "Select destination layer" ), this );
3939
h->addWidget( l );
4040
mcbLayers = new QComboBox( this );
4141
h->addWidget( mcbLayers );
@@ -47,7 +47,7 @@ RgExportDlg::RgExportDlg( QWidget* parent, Qt::WFlags fl )
4747
v->addWidget( bb );
4848

4949
//fill list of layers
50-
mcbLayers->insertItem( 0, tr( "new temporary layer" ), QVariant( "-1" ) );
50+
mcbLayers->insertItem( 0, tr( "New temporary layer" ), QVariant( "-1" ) );
5151

5252
QMap<QString, QgsMapLayer*> mapLayers = QgsMapLayerRegistry::instance()->mapLayers();
5353
QMap<QString, QgsMapLayer*>::iterator layer_it = mapLayers.begin();

‎src/plugins/roadgraph/linevectorlayerdirector.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@
3232
#include <iostream>
3333

3434
RgLineVectorLayerDirector::RgLineVectorLayerDirector( const QString& layerId,
35-
int directionFieldId,
36-
const QString& directDirectionValue,
37-
const QString& reverseDirectionValue,
38-
const QString& bothDirectionValue,
39-
int defaultDirection,
40-
const QString& speedUnitName,
41-
int speedFieldId,
42-
double defaultSpeed)
35+
int directionFieldId,
36+
const QString& directDirectionValue,
37+
const QString& reverseDirectionValue,
38+
const QString& bothDirectionValue,
39+
int defaultDirection,
40+
const QString& speedUnitName,
41+
int speedFieldId,
42+
double defaultSpeed )
4343
{
4444
mLayerId = layerId;
4545
mDirectionFieldId = directionFieldId;

‎src/plugins/roadgraph/linevectorlayerdirector.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ class QgsVectorLayer;
3333
class RgLineVectorLayerDirector : public RgGraphDirector
3434
{
3535
public:
36-
RgLineVectorLayerDirector( const QString& layerId,
36+
RgLineVectorLayerDirector( const QString& layerId,
3737
int directionFiledId,
3838
const QString& directDirectionValue,
3939
const QString& reverseDirectionValue,
4040
const QString& bothDirectionValue,
41-
int defaultDirection,
42-
const QString& speedValueUnit = QString("m/s"),
41+
int defaultDirection,
42+
const QString& speedValueUnit = QString( "m/s" ),
4343
int speedFieldId = -1,
4444
double defaultSpeed = 1.0 );
4545

@@ -51,19 +51,19 @@ class RgLineVectorLayerDirector : public RgGraphDirector
5151
void makeGraph( RgGraphBuilder * ) const;
5252

5353
QString name() const;
54-
54+
5555
private:
5656

5757
QgsVectorLayer* myLayer() const;
5858

5959
private:
60-
60+
6161
QString mLayerId;
6262

6363
int mSpeedFieldId;
6464

6565
double mDefaultSpeed;
66-
66+
6767
QString mSpeedUnitName;
6868

6969
int mDirectionFieldId;
@@ -73,7 +73,7 @@ class RgLineVectorLayerDirector : public RgGraphDirector
7373
QString mReverseDirectionValue;
7474

7575
QString mBothDirectionValue;
76-
76+
7777
//FIXME: need enum
7878
int mDefaultDirection;
7979
};

‎src/plugins/roadgraph/linevectorlayerwidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ RgLineVectorLayerSettingsWidget::RgLineVectorLayerSettingsWidget( RgLineVectorLa
103103
h = new QHBoxLayout( frame );
104104
l = new QLabel( tr( "Cost" ), frame );
105105
h->addWidget( l );
106-
l = new QLabel( tr( "lines length" ), frame );
106+
l = new QLabel( tr( "Line lengths" ), frame );
107107
h->addWidget( l );
108108
v->addLayout( h );
109109

‎src/plugins/roadgraph/roadgraphplugin.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
static const char * const sIdent = "$Id: roadgraphplugin.cpp 9327 2009-04-20 10:09:44Z YEKST $";
5555
static const QString sName = QObject::tr( "Road graph plugin" );
56-
static const QString sDescription = QObject::tr( "It solve shortest path poblem." );
56+
static const QString sDescription = QObject::tr( "It solves the shortest path problem." );
5757
static const QString sPluginVersion = QObject::tr( "Version 0.1" );
5858
static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI;
5959

@@ -96,7 +96,7 @@ void RoadGraphPlugin::initGui()
9696

9797
// Create the action for tool
9898
mQSettingsAction = new QAction( QIcon( ":/roadgraph/road.png" ), tr( "Road graph settings" ), this );
99-
mQShowDirectionAction = new QAction( QIcon( ":/roadgraph/showdirect.png" ), tr( "Show roads direction" ), this );
99+
mQShowDirectionAction = new QAction( QIcon( ":/roadgraph/showdirect.png" ), tr( "Show road's direction" ), this );
100100
mInfoAction = new QAction( QIcon( ":/roadgraph/about.png" ), tr( "About" ), this );
101101

102102
// Set the what's this text
@@ -201,7 +201,7 @@ void RoadGraphPlugin::about()
201201
version->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
202202
lines->addWidget( title );
203203
lines->addWidget( version );
204-
lines->addWidget( new QLabel( tr( "Find shortest path on roads graph" ) ) );
204+
lines->addWidget( new QLabel( tr( "Find shortest path on road's graph" ) ) );
205205
lines->addWidget( new QLabel( tr( "<b>Developers:</b>" ) ) );
206206
lines->addWidget( new QLabel( " Sergey Yakushev" ) );
207207
lines->addWidget( new QLabel( tr( "<b>Homepage:</b>" ) ) );
@@ -269,21 +269,21 @@ const RgGraphDirector* RoadGraphPlugin::director() const
269269
if ( layer == NULL )
270270
return NULL;
271271

272-
QgsVectorDataProvider *provider = dynamic_cast< QgsVectorDataProvider* > ( layer->dataProvider() );
272+
QgsVectorDataProvider *provider = dynamic_cast< QgsVectorDataProvider* >( layer->dataProvider() );
273273
if ( provider == NULL )
274274
return NULL;
275275

276-
RgLineVectorLayerDirector * director =
277-
new RgLineVectorLayerDirector( layerId,
278-
provider->fieldNameIndex( mSettings->mDirection ),
279-
mSettings->mFirstPointToLastPointDirectionVal,
280-
mSettings->mLastPointToFirstPointDirectionVal,
281-
mSettings->mBothDirectionVal,
282-
mSettings->mDefaultDirection,
283-
mSettings->mSpeedUnitName,
284-
provider->fieldNameIndex( mSettings->mSpeed ),
285-
mSettings->mDefaultSpeed );
286-
276+
RgLineVectorLayerDirector * director =
277+
new RgLineVectorLayerDirector( layerId,
278+
provider->fieldNameIndex( mSettings->mDirection ),
279+
mSettings->mFirstPointToLastPointDirectionVal,
280+
mSettings->mLastPointToFirstPointDirectionVal,
281+
mSettings->mBothDirectionVal,
282+
mSettings->mDefaultDirection,
283+
mSettings->mSpeedUnitName,
284+
provider->fieldNameIndex( mSettings->mSpeed ),
285+
mSettings->mDefaultSpeed );
286+
287287
return director;
288288
}
289289
void RoadGraphPlugin::render( QPainter *painter )
@@ -292,7 +292,7 @@ void RoadGraphPlugin::render( QPainter *painter )
292292
return;
293293

294294
const RgGraphDirector *graphDirector = director();
295-
295+
296296
if ( graphDirector == NULL )
297297
return;
298298

‎src/plugins/roadgraph/settingsdlg.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ RgSettingsDlg::RgSettingsDlg( RgSettings *settings, QWidget* parent, Qt::WFlags
2929
: mSettings( settings ), QDialog( parent, fl )
3030
{
3131
// create base widgets;
32-
setWindowTitle( tr( "Road graph plugins settings" ) );
32+
setWindowTitle( tr( "Road graph plugin settings" ) );
3333
QVBoxLayout *v = new QVBoxLayout( this );
3434

3535
QHBoxLayout *h = new QHBoxLayout();
36-
QLabel *l = new QLabel( tr( "Plugins time unit:" ), this );
36+
QLabel *l = new QLabel( tr( "Time unit" ), this );
3737
h->addWidget( l );
3838
mcbPluginsTimeUnit = new QComboBox( this );
3939
h->addWidget( mcbPluginsTimeUnit );
4040
v->addLayout( h );
4141

4242
h = new QHBoxLayout();
43-
l = new QLabel( tr( "Plugins distance unit:" ), this );
43+
l = new QLabel( tr( "Distance unit" ), this );
4444
h->addWidget( l );
4545
mcbPluginsDistanceUnit = new QComboBox( this );
4646
h->addWidget( mcbPluginsDistanceUnit );

‎src/plugins/roadgraph/shortestpathwidget.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ RgShortestPathWidget::RgShortestPathWidget( QWidget* theParent, RoadGraphPlugin
6262
QHBoxLayout *h = NULL;
6363
QLabel *l = NULL;
6464

65-
l = new QLabel( tr( "Start:" ), myWidget );
65+
l = new QLabel( tr( "Start" ), myWidget );
6666
v->addWidget( l );
6767
h = new QHBoxLayout();
6868
mFrontPointLineEdit = new QLineEdit( myWidget );
@@ -74,7 +74,7 @@ RgShortestPathWidget::RgShortestPathWidget( QWidget* theParent, RoadGraphPlugin
7474
h->addWidget( selectFrontPoint );
7575
v->addLayout( h );
7676

77-
l = new QLabel( tr( "Stop:" ), myWidget );
77+
l = new QLabel( tr( "Stop" ), myWidget );
7878
v->addWidget( l );
7979
h = new QHBoxLayout();
8080
mBackPointLineEdit = new QLineEdit( myWidget );
@@ -87,7 +87,7 @@ RgShortestPathWidget::RgShortestPathWidget( QWidget* theParent, RoadGraphPlugin
8787
v->addLayout( h );
8888

8989
h = new QHBoxLayout( this );
90-
l = new QLabel( tr( "Criterion:" ), myWidget );
90+
l = new QLabel( tr( "Criterion" ), myWidget );
9191
mCriterionName = new QComboBox( myWidget );
9292
mCriterionName->insertItem( 0, tr( "Length" ) );
9393
mCriterionName->insertItem( 1, tr( "Time" ) );
@@ -96,15 +96,15 @@ RgShortestPathWidget::RgShortestPathWidget( QWidget* theParent, RoadGraphPlugin
9696
v->addLayout( h );
9797

9898
h = new QHBoxLayout( myWidget );
99-
l = new QLabel( tr( "Length:" ), myWidget );
99+
l = new QLabel( tr( "Length" ), myWidget );
100100
mPathCostLineEdit = new QLineEdit( myWidget );
101101
mPathCostLineEdit->setReadOnly( true );
102102
h->addWidget( l );
103103
h->addWidget( mPathCostLineEdit );
104104
v->addLayout( h );
105105

106106
h = new QHBoxLayout( myWidget );
107-
l = new QLabel( tr( "Time:" ), myWidget );
107+
l = new QLabel( tr( "Time" ), myWidget );
108108
mPathTimeLineEdit = new QLineEdit( myWidget );
109109
mPathTimeLineEdit->setReadOnly( true );
110110
h->addWidget( l );
@@ -228,7 +228,7 @@ bool RgShortestPathWidget::getPath( AdjacencyMatrix& matrix, QgsPoint& p1, QgsPo
228228
{
229229
const RgGraphDirector *director = mPlugin->director();
230230
director->makeGraph( &builder );
231-
231+
232232
// not need
233233
delete director;
234234
}
@@ -238,13 +238,13 @@ bool RgShortestPathWidget::getPath( AdjacencyMatrix& matrix, QgsPoint& p1, QgsPo
238238
p1 = builder.tiePoint( mFrontPoint, ok );
239239
if ( !ok )
240240
{
241-
QMessageBox::critical (this, tr("Tie point failed"), tr("Start point don't tie to the road!") );
241+
QMessageBox::critical( this, tr( "Tie point failed" ), tr( "Start point doesn't tie to the road!" ) );
242242
return false;
243243
}
244244
p2 = builder.tiePoint( mBackPoint, ok );
245245
if ( !ok )
246246
{
247-
QMessageBox::critical (this, tr("Tie point failed"), tr("Stop point don't tie to the road!") );
247+
QMessageBox::critical( this, tr( "Tie point failed" ), tr( "Stop point doesn't tie to the road!" ) );
248248
return false;
249249
}
250250
AdjacencyMatrix m = builder.adjacencyMatrix();

0 commit comments

Comments
 (0)
Please sign in to comment.