mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-09 15:54:47 -07:00
Permit translation in "game created" column; Fix #999
Also, extracted the 2 new strings
This commit is contained in:
parent
3141fb84e9
commit
629f48e2ff
2 changed files with 4 additions and 5 deletions
|
|
@ -20,12 +20,12 @@ const QString GamesModel::getGameCreatedString(const int secs) const {
|
|||
else if (secs < SECS_PER_HOUR)
|
||||
ret = QString::number(secs / SECS_PER_MIN).append(tr("m ago"));
|
||||
else if (secs < SECS_PER_MIN * 90) {
|
||||
ret = tr("1hr ").append(QString::number((secs / SECS_PER_MIN) - 60)).append(tr("m ago"));
|
||||
ret = tr("1hr %1m ago").arg(QString::number((secs / SECS_PER_MIN) - 60));
|
||||
} else if (secs < SECS_PER_HOUR * 4) {
|
||||
unsigned int hours = secs / SECS_PER_HOUR;
|
||||
if (secs % SECS_PER_HOUR >= SECS_PER_MIN * 30)
|
||||
hours++;
|
||||
ret = QString::number(hours).append(tr("hr ago"));
|
||||
ret = tr("%1hr ago").arg(QString::number(hours));
|
||||
} else
|
||||
ret = tr("5+ hrs ago");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue