Commit c1c353c0 authored by Chusslove Illich's avatar Chusslove Illich

Conversion to new i18n API (see KDE4PORTING.html->I18N->i18n calls).

svn path=/trunk/KDE/kdegames/lskat/; revision=528186
parent a22f5b88
......@@ -230,21 +230,21 @@ QString Deck::name(int card)
QString Deck::name(Suite suite, CardType type)
{
QString suiteName = i18n("unknown");
if (suite == Club) suiteName = i18n("suite name", "Clubs");
if (suite == Spade) suiteName = i18n("suite name", "Spades");
if (suite == Heart) suiteName = i18n("suite name", "Hearts");
if (suite == Diamond) suiteName = i18n("suite name", "Diamonds");
if (suite == Grand) suiteName = i18n("trump name", "Grand");
if (suite == Club) suiteName = i18nc("suite name", "Clubs");
if (suite == Spade) suiteName = i18nc("suite name", "Spades");
if (suite == Heart) suiteName = i18nc("suite name", "Hearts");
if (suite == Diamond) suiteName = i18nc("suite name", "Diamonds");
if (suite == Grand) suiteName = i18nc("trump name", "Grand");
QString typeName = i18n("unknown");
if (type == Ace) typeName = i18n("card name", "Ace");
if (type == King) typeName = i18n("card name", "King");
if (type == Queen) typeName = i18n("card name", "Queen");
if (type == Jack) typeName = i18n("card name", "Jack");
if (type == Ten) typeName = i18n("card name", "Ten");
if (type == Nine) typeName = i18n("card name", "Nine");
if (type == Eight) typeName = i18n("card name", "Eight");
if (type == Seven) typeName = i18n("card name", "Seven");
return i18n("eg jack of clubs", "%1 of %2").arg(typeName).arg(suiteName);
if (type == Ace) typeName = i18nc("card name", "Ace");
if (type == King) typeName = i18nc("card name", "King");
if (type == Queen) typeName = i18nc("card name", "Queen");
if (type == Jack) typeName = i18nc("card name", "Jack");
if (type == Ten) typeName = i18nc("card name", "Ten");
if (type == Nine) typeName = i18nc("card name", "Nine");
if (type == Eight) typeName = i18nc("card name", "Eight");
if (type == Seven) typeName = i18nc("card name", "Seven");
return i18nc("eg jack of clubs", "%1 of %2", typeName, suiteName);
}
......@@ -366,7 +366,7 @@ void DisplayTwo::showScore(int position, int score)
TextSprite* text = new TextSprite(mCanvas);
QFont font;
font.setPixelSize(24);
text->setText(i18n("%1 points").arg(score));
text->setText(i18n("%1 points", score));
text->setFont(font);
text->setTextFlags(Qt::AlignCenter);
text->setColor(QColor(255, 128, 0));
......
......@@ -231,40 +231,40 @@ int EngineTwo::evaluateGame()
// First player won
else if (points1 > points2)
{
text = i18n("Player %1 won ").arg(player1->name());
text = i18n("Player %1 won ", player1->name());
score1 = 2;
player1->addWonGame(1);
if (points1 >= 90)
{
score1 += 1; // Schneider
text = i18n("%1 won with 90 points. Super!").arg(player1->name());
text = i18n("%1 won with 90 points. Super!", player1->name());
}
// Do not use 'else if' here !
if (points1 >= 120)
{
score1 += 1; // Schwarz
text = i18n("%1 won to nil. Congratulations!").arg(player1->name());
text = i18n("%1 won to nil. Congratulations!", player1->name());
}
winner = 0;
}
// Second player won
else
{
text = i18n("Player 2 - %1 won ").arg(player2->name());
text = i18n("Player 2 - %1 won ", player2->name());
score2 = 2;
player2->addWonGame(1);
if (points2 >= 90)
{
score2 += 1; // Schneider
text = i18n("%1 won with 90 points. Super!").arg(player2->name());
text = i18n("%1 won with 90 points. Super!", player2->name());
}
// Do not use 'else if' here !
if (points2 >= 120)
{
score2 += 1; // Schwarz
text = i18n("%1 won to nil. Congratulations!").arg(player2->name());
text = i18n("%1 won to nil. Congratulations!", player2->name());
}
winner = 1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment