diff --git a/lang/gpxsee_cs.ts b/lang/gpxsee_cs.ts
index cc75dde9..ac2989e4 100644
--- a/lang/gpxsee_cs.ts
+++ b/lang/gpxsee_cs.ts
@@ -151,7 +151,7 @@
Otevřít soubor
-
+
Otevřít POI soubor
@@ -364,70 +364,63 @@
-
+
Všechny podporované soubory (*.gpx *.tcx *.kml *.csv)
-
+
Soubory GPX (*.gpx)
-
+
Soubory TCX (*.tcx)
-
+
Soubory KML (*.kml)
-
-
-
- Datový soubor nelze otevřít:
-%1
-
-
+
Soubory CSV (*.csv)
-
+
Všechny soubory (*)
-
-
+
+
Datum
-
+
Trasy
-
+
Nejsou načteny žádné GPX soubory
-
-
+
+
- %1 soubor
- %1 soubory
- %1 souborů
+ %n soubor
+ %n soubory
+ %n souborů
@@ -451,7 +444,7 @@
Exportovat do PDF...
-
+
Navigační body
@@ -497,12 +490,22 @@
-
+
+ Datový soubor nelze načíst:
+
+
+
+
Řádka: %1
-
+
+
+ Soubor POI nelze načíst:
+
+
+
Cesty
@@ -529,29 +532,16 @@
-
+
Vzdálenost
-
+
Čas
-
-
-
-
- Chyba
-
-
-
-
- Soubor POI nelze otevřít:
-%1
-
GraphView
@@ -654,7 +644,17 @@
RouteItem
-
+
+
+ Název
+
+
+
+
+ Popis
+
+
+
Vzdálenost
@@ -748,17 +748,27 @@
TrackItem
-
+
+
+ Název
+
+
+
+
+ Popis
+
+
+
Vzdálenost
-
+
Čas
-
+
Datum
diff --git a/src/csvparser.cpp b/src/csvparser.cpp
index a6d244cd..b1504fd2 100644
--- a/src/csvparser.cpp
+++ b/src/csvparser.cpp
@@ -12,20 +12,20 @@ bool CSVParser::loadFile(QFile *file)
QByteArray line = file->readLine();
QList list = line.split(',');
if (list.size() < 3) {
- _errorString = "Parse error.";
+ _errorString = "Parse error";
_errorLine = ln;
return false;
}
qreal lat = list[0].trimmed().toDouble(&res);
if (!res || (lat < -90.0 || lat > 90.0)) {
- _errorString = "Invalid latitude.";
+ _errorString = "Invalid latitude";
_errorLine = ln;
return false;
}
qreal lon = list[1].trimmed().toDouble(&res);
if (!res || (lon < -180.0 || lon > 180.0)) {
- _errorString = "Invalid longitude.";
+ _errorString = "Invalid longitude";
_errorLine = ln;
return false;
}
diff --git a/src/gpxparser.cpp b/src/gpxparser.cpp
index 778dede3..9468a55e 100644
--- a/src/gpxparser.cpp
+++ b/src/gpxparser.cpp
@@ -6,7 +6,7 @@ qreal GPXParser::number()
bool res;
qreal ret = _reader.readElementText().toDouble(&res);
if (!res)
- _reader.raiseError(QString("Invalid %1.").arg(
+ _reader.raiseError(QString("Invalid %1").arg(
_reader.name().toString()));
return ret;
@@ -17,7 +17,7 @@ QDateTime GPXParser::time()
QDateTime d = QDateTime::fromString(_reader.readElementText(),
Qt::ISODate);
if (!d.isValid())
- _reader.raiseError(QString("Invalid %1.").arg(
+ _reader.raiseError(QString("Invalid %1").arg(
_reader.name().toString()));
return d;
@@ -35,7 +35,7 @@ Coordinates GPXParser::coordinates()
lon = attr.value("lon").toDouble(&res);
#endif // QT_VERSION < 5
if (!res || (lon < -180.0 || lon > 180.0)) {
- _reader.raiseError("Invalid longitude.");
+ _reader.raiseError("Invalid longitude");
return Coordinates();
}
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
@@ -44,7 +44,7 @@ Coordinates GPXParser::coordinates()
lat = attr.value("lat").toDouble(&res);
#endif // QT_VERSION < 5
if (!res || (lat < -90.0 || lat > 90.0)) {
- _reader.raiseError("Invalid latitude.");
+ _reader.raiseError("Invalid latitude");
return Coordinates();
}
@@ -229,7 +229,7 @@ bool GPXParser::parse()
if (_reader.name() == "gpx")
gpx();
else
- _reader.raiseError("Not a GPX file.");
+ _reader.raiseError("Not a GPX file");
}
return !_reader.error();
diff --git a/src/gui.cpp b/src/gui.cpp
index 411cb3f5..bd14a00c 100644
--- a/src/gui.cpp
+++ b/src/gui.cpp
@@ -672,13 +672,11 @@ bool GUI::loadFile(const QString &fileName)
updateGraphTabs();
updatePathView();
- QString error = fileName + QString("\n\n")
- + tr("Error loading data file:\n%1").arg(data.errorString())
- + QString("\n");
+ QString error = tr("Error loading data file:") + "\n\n"
+ + fileName + "\n\n" + data.errorString();
if (data.errorLine())
- error.append(tr("Line: %1").arg(data.errorLine()));
-
- QMessageBox::critical(this, tr("Error"), error);
+ error.append("\n" + tr("Line: %1").arg(data.errorLine()));
+ QMessageBox::critical(this, APP_NAME, error);
return false;
}
}
@@ -702,12 +700,11 @@ bool GUI::openPOIFile(const QString &fileName)
return false;
if (!_poi->loadFile(fileName)) {
- QString error = fileName + QString("\n\n")
- + tr("Error loading POI file:\n%1").arg(_poi->errorString())
- + QString("\n");
+ QString error = tr("Error loading POI file:") + "\n\n"
+ + fileName + "\n\n" + _poi->errorString();
if (_poi->errorLine())
- error.append(tr("Line: %1").arg(_poi->errorLine()));
- QMessageBox::critical(this, tr("Error"), error);
+ error.append("\n" + tr("Line: %1").arg(_poi->errorLine()));
+ QMessageBox::critical(this, APP_NAME, error);
return false;
} else {
@@ -979,8 +976,7 @@ void GUI::updateStatusBarInfo()
else if (_files.count() == 1)
_fileNameLabel->setText(_files.at(0));
else
- _fileNameLabel->setText(tr("%1 files", "", _files.count())
- .arg(_files.count()));
+ _fileNameLabel->setText(tr("%n files", "", _files.count()));
qreal d = distance();
Units units = _imperialUnitsAction->isChecked() ? Imperial : Metric;
diff --git a/src/kmlparser.cpp b/src/kmlparser.cpp
index a44bf871..24c3b9c2 100644
--- a/src/kmlparser.cpp
+++ b/src/kmlparser.cpp
@@ -6,7 +6,7 @@ qreal KMLParser::number()
bool res;
qreal ret = _reader.readElementText().toDouble(&res);
if (!res)
- _reader.raiseError(QString("Invalid %1.").arg(
+ _reader.raiseError(QString("Invalid %1").arg(
_reader.name().toString()));
return ret;
@@ -17,7 +17,7 @@ QDateTime KMLParser::time()
QDateTime d = QDateTime::fromString(_reader.readElementText(),
Qt::ISODate);
if (!d.isValid())
- _reader.raiseError(QString("Invalid %1.").arg(
+ _reader.raiseError(QString("Invalid %1").arg(
_reader.name().toString()));
return d;
@@ -205,7 +205,7 @@ void KMLParser::lineString(TrackData &track)
while (_reader.readNextStartElement()) {
if (_reader.name() == "coordinates") {
if (!lineCoordinates(track))
- _reader.raiseError("Invalid coordinates.");
+ _reader.raiseError("Invalid coordinates");
} else
_reader.skipCurrentElement();
}
@@ -216,18 +216,18 @@ void KMLParser::point(Waypoint &waypoint)
while (_reader.readNextStartElement()) {
if (_reader.name() == "coordinates") {
if (!pointCoordinates(waypoint))
- _reader.raiseError("Invalid coordinates.");
+ _reader.raiseError("Invalid coordinates");
} else
_reader.skipCurrentElement();
}
if (waypoint.coordinates().isNull())
- _reader.raiseError("Missing Point coordinates.");
+ _reader.raiseError("Missing Point coordinates");
}
void KMLParser::Track(TrackData &track)
{
- const char mismatchError[] = "gx:coord/when element count mismatch.";
+ const char mismatchError[] = "gx:coord/when element count mismatch";
int i = track.size();
while (_reader.readNextStartElement()) {
@@ -239,7 +239,7 @@ void KMLParser::Track(TrackData &track)
_reader.raiseError(mismatchError);
return;
} else if (!coord(track[i])) {
- _reader.raiseError("Invalid coordinates.");
+ _reader.raiseError("Invalid coordinates");
return;
}
i++;
@@ -329,7 +329,7 @@ bool KMLParser::parse()
if (_reader.name() == "kml")
kml();
else
- _reader.raiseError("Not a KML file.");
+ _reader.raiseError("Not a KML file");
}
return !_reader.error();
diff --git a/src/tcxparser.cpp b/src/tcxparser.cpp
index 74281ac8..f15734fc 100644
--- a/src/tcxparser.cpp
+++ b/src/tcxparser.cpp
@@ -13,7 +13,7 @@ qreal TCXParser::number()
bool res;
qreal ret = _reader.readElementText().toDouble(&res);
if (!res)
- _reader.raiseError(QString("Invalid %1.").arg(
+ _reader.raiseError(QString("Invalid %1").arg(
_reader.name().toString()));
return ret;
@@ -24,7 +24,7 @@ QDateTime TCXParser::time()
QDateTime d = QDateTime::fromString(_reader.readElementText(),
Qt::ISODate);
if (!d.isValid())
- _reader.raiseError(QString("Invalid %1.").arg(
+ _reader.raiseError(QString("Invalid %1").arg(
_reader.name().toString()));
return d;
@@ -40,13 +40,13 @@ Coordinates TCXParser::position()
if (_reader.name() == "LatitudeDegrees") {
val = _reader.readElementText().toDouble(&res);
if (!res || (val < -90.0 || val > 90.0))
- _reader.raiseError("Invalid LatitudeDegrees.");
+ _reader.raiseError("Invalid LatitudeDegrees");
else
pos.setLat(val);
} else if (_reader.name() == "LongitudeDegrees") {
val = _reader.readElementText().toDouble(&res);
if (!res || (val < -180.0 || val > 180.0))
- _reader.raiseError("Invalid LongitudeDegrees.");
+ _reader.raiseError("Invalid LongitudeDegrees");
else
pos.setLon(val);
} else
@@ -186,7 +186,7 @@ bool TCXParser::parse()
if (_reader.name() == "TrainingCenterDatabase")
tcx();
else
- _reader.raiseError("Not a TCX file.");
+ _reader.raiseError("Not a TCX file");
}
return !_reader.error();