# HG changeset patch
# User TheXception
# Date 1283461390 -7200
# Node ID 8754f787439528791552fe60d2e4c4a21ec05fff
# Parent 9c32b0e0b6c9b16a26f42b948613dc1007920de1
Frontend: improve statsPage (clean up translation strings)
diff -r 9c32b0e0b6c9 -r 8754f7874395 QTfrontend/statsPage.cpp
--- a/QTfrontend/statsPage.cpp Thu Sep 02 21:55:11 2010 +0100
+++ b/QTfrontend/statsPage.cpp Thu Sep 02 23:03:10 2010 +0200
@@ -51,7 +51,7 @@
labelGameStats = new QLabel(this);
QLabel * l = new QLabel(this);
l->setTextFormat(Qt::RichText);
- l->setText(PageGameStats::tr("
Details
"));
+ l->setText("
" + PageGameStats::tr("Details") + "
");
l->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
labelGameStats->setTextFormat(Qt::RichText);
labelGameStats->setAlignment(Qt::AlignTop);
@@ -64,7 +64,7 @@
graphic = new FitGraphicsView(gb);
l = new QLabel(this);
l->setTextFormat(Qt::RichText);
- l->setText(PageGameStats::tr("
Health graph
"));
+ l->setText("
" + PageGameStats::tr("Health graph") + "
");
l->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
gbl->addWidget(l);
gbl->addWidget(graphic);
@@ -81,7 +81,7 @@
labelGameRank = new QLabel(gb);
l = new QLabel(this);
l->setTextFormat(Qt::RichText);
- l->setText(PageGameStats::tr("
Ranking
"));
+ l->setText("
" + PageGameStats::tr("Ranking") + "
");
l->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
gbl->addWidget(l);
gbl->addWidget(labelGameRank);
@@ -141,22 +141,20 @@
}
case 'D' : {
int i = info.indexOf(' ');
- QString message = PageGameStats::tr("
The best shot award was won by %1 with %2 pts.
")
- .arg(info.mid(i + 1), info.left(i));
+ QString message = "
" + PageGameStats::tr("The best shot award was won by %1 with %2 pts.").arg(info.mid(i + 1), info.left(i)) + "
";
AddStatText(message);
break;
}
case 'k' : {
int i = info.indexOf(' ');
int num = info.left(i).toInt();
- QString message = PageGameStats::tr("
The best killer is %1 with %2 kills in a turn.
", "", num)
- .arg(info.mid(i + 1), info.left(i));
+ QString message = "
" + PageGameStats::tr("The best killer is %1 with %2 kills in a turn.", "", num).arg(info.mid(i + 1), info.left(i)) + "
";
AddStatText(message);
break;
}
case 'K' : {
int num = info.toInt();
- QString message = PageGameStats::tr("
A total of %1 hedgehog(s) were killed during this round.
", "", num).arg(num);
+ QString message = "
" + PageGameStats::tr("A total of %1 hedgehog(s) were killed during this round.", "", num).arg(num) + "
";
AddStatText(message);
break;
}
@@ -217,33 +215,34 @@
}
QString message;
+ QString killstring;
if (kills.toInt() == 1)
{
- message = PageGameStats::tr("%1 %2. %3 (%4 kill).
").arg(image, QString::number(playerPosition), playername, kills, clanColor.name());
+ killstring = PageGameStats::tr("(%1 kill)").arg(kills);
} else {
- message = PageGameStats::tr("%1 %2. %3 (%4 kills).
").arg(image, QString::number(playerPosition), playername, kills, clanColor.name());
+ killstring = PageGameStats::tr("(%1 kills)").arg(kills);
}
- labelGameRank->setText(labelGameRank->text() + message);
+
+ message = QString("%1 %2. %3 ").arg(image, QString::number(playerPosition), playername, clanColor.name()) + killstring + "
";
+
+ labelGameRank->setText(labelGameRank->text() + message);
break;
}
case 's' : {
int i = info.indexOf(' ');
- QString message = PageGameStats::tr("
%1 thought it's good to shoot his own hedgehogs with %2 pts.
")
- .arg(info.mid(i + 1), info.left(i));
+ QString message = "
" + PageGameStats::tr("%1 thought it's good to shoot his own hedgehogs with %2 pts.").arg(info.mid(i + 1), info.left(i)) + "
";
AddStatText(message);
break;
}
case 'S' : {
int i = info.indexOf(' ');
- QString message = PageGameStats::tr("
%1 killed %2 of his own hedgehogs.
")
- .arg(info.mid(i + 1), info.left(i));
+ QString message = "
" + PageGameStats::tr("%1 killed %2 of his own hedgehogs.").arg(info.mid(i + 1), info.left(i)) + "
";
AddStatText(message);
break;
}
case 'B' : {
int i = info.indexOf(' ');
- QString message = PageGameStats::tr("
%1 was scared and skipped turn %2 times.
")
- .arg(info.mid(i + 1), info.left(i));
+ QString message = "
" + PageGameStats::tr("%1 was scared and skipped turn %2 times.").arg(info.mid(i + 1), info.left(i)) + "
";
AddStatText(message);
break;
}