mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Translations: get hemisphere letters translated again
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
598102c351
commit
789a04bd70
1 changed files with 8 additions and 8 deletions
16
qthelper.cpp
16
qthelper.cpp
|
@ -1,5 +1,6 @@
|
|||
#include "qthelper.h"
|
||||
#include "qt-gui.h"
|
||||
#include "gettextfromc.h"
|
||||
#include "dive.h"
|
||||
#include "statistics.h"
|
||||
#include <exif.h>
|
||||
|
@ -12,8 +13,7 @@
|
|||
#include <QSettings>
|
||||
#include <libxslt/documents.h>
|
||||
|
||||
#define tr(_arg) QObject::tr(_arg)
|
||||
|
||||
#define translate(_context, arg) trGettext(arg)
|
||||
|
||||
QString weight_string(int weight_in_grams)
|
||||
{
|
||||
|
@ -43,8 +43,8 @@ QString printGPSCoords(int lat, int lon)
|
|||
if (!lat && !lon)
|
||||
return QString();
|
||||
|
||||
lath = lat >= 0 ? tr("N") : tr("S");
|
||||
lonh = lon >= 0 ? tr("E") : tr("W");
|
||||
lath = lat >= 0 ? translate("gettextFromC", "N") : translate("gettextFromC", "S");
|
||||
lonh = lon >= 0 ? translate("gettextFromC", "E") : translate("gettextFromC", "W");
|
||||
lat = abs(lat);
|
||||
lon = abs(lon);
|
||||
latdeg = lat / 1000000;
|
||||
|
@ -70,10 +70,10 @@ bool parseGpsText(const QString &gps_text, double *latitude, double *longitude)
|
|||
int eastWest = 4;
|
||||
int northSouth = 1;
|
||||
QString trHemisphere[4];
|
||||
trHemisphere[0] = tr("N");
|
||||
trHemisphere[1] = tr("S");
|
||||
trHemisphere[2] = tr("E");
|
||||
trHemisphere[3] = tr("W");
|
||||
trHemisphere[0] = translate("gettextFromC", "N");
|
||||
trHemisphere[1] = translate("gettextFromC", "S");
|
||||
trHemisphere[2] = translate("gettextFromC", "E");
|
||||
trHemisphere[3] = translate("gettextFromC", "W");
|
||||
QString regExp;
|
||||
/* an empty string is interpreted as 0.0,0.0 and therefore "no gps location" */
|
||||
if (gps_text.trimmed().isEmpty()) {
|
||||
|
|
Loading…
Reference in a new issue