diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-02-13 14:40:39 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-02-13 15:26:42 +0000 |
commit | 96508ffb32c03850033b41f1eb50e3ca9144408c (patch) | |
tree | 403035ec2111bafc997cfb69af9347805ea8d5db /src | |
parent | 68b515cdff46dc1030b027a664ef5f3f6cde946a (diff) | |
download | qtlocation-96508ffb32c03850033b41f1eb50e3ca9144408c.tar.gz |
QGeoRouteParserOsrmV5: Split messages
Split message into distinct messages depending on argument
as adding up the message may not grammatically work in all
languages.
Change-Id: I0c173461968834e5a42714838294596988965dc1
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/location/maps/qgeorouteparserosrmv5.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/location/maps/qgeorouteparserosrmv5.cpp b/src/location/maps/qgeorouteparserosrmv5.cpp index 6c73b1f7..f168bed6 100644 --- a/src/location/maps/qgeorouteparserosrmv5.cpp +++ b/src/location/maps/qgeorouteparserosrmv5.cpp @@ -590,11 +590,9 @@ static QString instructionRoundaboutTurn(const QString &wayName, QGeoManeuver::I static QString instructionTrain(const QString &wayName) { - QString instruction = QGeoRouteParserOsrmV5::tr("Take the train"); - if (!wayName.isEmpty()) - instruction += QLatin1String(" [") + wayName + QLatin1Char(']'); - - return instruction; + return wayName.isEmpty() + ? QGeoRouteParserOsrmV5::tr("Take the train") + : QGeoRouteParserOsrmV5::tr("Take the train [%1]").arg(wayName); } static QString instructionTurn(const QString &wayName, QGeoManeuver::InstructionDirection direction) |