Deal with weird transifex issue involving leading space

Apparently transifex drops the leading space in the translation string and
then at runtime the string no longer matches. So let's just code this
differently.

This of course creates a new string but that new string should be the
string that transifex already asks people to translate...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-10-08 10:02:42 +01:00
parent f24ab1dfa2
commit eccac1321f
2 changed files with 56 additions and 51 deletions

View file

@ -62,9 +62,9 @@ QVariant TripItem::data(int column, int role) const
d = d->next;
}
if (countShown < trip->nrdives)
shownText = tr(" (%1 shown)").arg(countShown);
shownText = tr("(%1 shown)").arg(countShown);
if (trip->location && *trip->location)
ret = QString(trip->location) + ", " + get_trip_date_string(trip->when, trip->nrdives) + shownText;
ret = QString(trip->location) + ", " + get_trip_date_string(trip->when, trip->nrdives) + " " + shownText;
else
ret = get_trip_date_string(trip->when, trip->nrdives) + shownText;
break;