1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 11:45:53 +01:00

Improved translation

This commit is contained in:
Martin Tůma 2016-08-10 08:19:55 +02:00
parent 20b107581e
commit 63fd7f239c
2 changed files with 10 additions and 8 deletions

View File

@ -374,7 +374,7 @@
<location filename="../src/gui.cpp" line="280"/>
<location filename="../src/gui.cpp" line="730"/>
<source>Routes</source>
<translation>Počet tras</translation>
<translation>Trasy</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="903"/>
@ -467,7 +467,7 @@
<location filename="../src/gui.cpp" line="276"/>
<location filename="../src/gui.cpp" line="728"/>
<source>Tracks</source>
<translation>Počet cest</translation>
<translation>Cesty</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="193"/>
@ -596,24 +596,24 @@
</message>
</context>
<context>
<name>QObject</name>
<name>ScaleItem</name>
<message>
<location filename="../src/scaleitem.cpp" line="81"/>
<source>mi</source>
<translation>mi</translation>
</message>
<message>
<location filename="../src/scaleitem.cpp" line="81"/>
<location filename="../src/scaleitem.cpp" line="82"/>
<source>ft</source>
<translation>ft</translation>
</message>
<message>
<location filename="../src/scaleitem.cpp" line="83"/>
<location filename="../src/scaleitem.cpp" line="84"/>
<source>km</source>
<translation>km</translation>
</message>
<message>
<location filename="../src/scaleitem.cpp" line="83"/>
<location filename="../src/scaleitem.cpp" line="85"/>
<source>m</source>
<translation>m</translation>
</message>

View File

@ -78,9 +78,11 @@ void ScaleItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QString ScaleItem::units() const
{
if (_units == Imperial)
return _scale ? QObject::tr("mi") : QObject::tr("ft");
return _scale ? qApp->translate("ScaleItem", "mi")
: qApp->translate("ScaleItem", "ft");
else
return _scale ? QObject::tr("km") : QObject::tr("m");
return _scale ? qApp->translate("ScaleItem", "km")
: qApp->translate("ScaleItem", "m");
}
void ScaleItem::computeScale()