summaryrefslogtreecommitdiff
authorcniehaus <cniehaus>2003-06-01 13:48:07 (UTC)
committer cniehaus <cniehaus>2003-06-01 13:48:07 (UTC)
commit145faa6417fd952768d0abe15cc8b9920548d45f (patch) (side-by-side diff)
treed78efad22827115e07bf584425bf666f0f8d7e47
parent316ced6af8e9492215ad0a39d43127665239503d (diff)
downloadopie-145faa6417fd952768d0abe15cc8b9920548d45f.zip
opie-145faa6417fd952768d0abe15cc8b9920548d45f.tar.gz
opie-145faa6417fd952768d0abe15cc8b9920548d45f.tar.bz2
first patches for tr()-changes\!
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/backgammon/aidialog.cpp44
-rw-r--r--noncore/games/backgammon/backgammon.cpp48
2 files changed, 46 insertions, 46 deletions
diff --git a/noncore/games/backgammon/aidialog.cpp b/noncore/games/backgammon/aidialog.cpp
index 9642ca5..7dfe403 100644
--- a/noncore/games/backgammon/aidialog.cpp
+++ b/noncore/games/backgammon/aidialog.cpp
@@ -10,6 +10,6 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
- QGroupBox* settings=new QGroupBox("Settings",this);
+ QGroupBox* settings=new QGroupBox(tr( "Settings" ),this);
settings->setGeometry(10,5,220,170);
- QLabel* rescue_label=new QLabel("<b>Rescue</b>",settings);
+ QLabel* rescue_label=new QLabel(tr( "<b>Rescue</b>" ),settings);
rescue_label->setGeometry(50,20,50,20);
@@ -17,3 +17,3 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
rescue->setGeometry(100,20,40,20);
- QPushButton* rescuehelp=new QPushButton("?",settings);
+ QPushButton* rescuehelp=new QPushButton(tr( "?" ),settings);
rescuehelp->setGeometry(140,20,20,20);
@@ -22,3 +22,3 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
- QLabel* eliminate_label=new QLabel("<b>Eliminate</b>",settings);
+ QLabel* eliminate_label=new QLabel(tr( "<b>Eliminate</b>" ),settings);
eliminate_label->setGeometry(50,40,50,20);
@@ -26,3 +26,3 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
eliminate->setGeometry(100,40,40,20);
- QPushButton* eliminatehelp=new QPushButton("?",settings);
+ QPushButton* eliminatehelp=new QPushButton(tr( "?" ),settings);
eliminatehelp->setGeometry(140,40,20,20);
@@ -31,3 +31,3 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
- QLabel* expose_label=new QLabel("<b>Expose</b>",settings);
+ QLabel* expose_label=new QLabel(tr( "<b>Expose</b>" ),settings);
expose_label->setGeometry(50,60,50,20);
@@ -35,3 +35,3 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
expose->setGeometry(100,60,40,20);
- QPushButton* exposeehelp=new QPushButton("?",settings);
+ QPushButton* exposeehelp=new QPushButton(tr( "?" ),settings);
exposeehelp->setGeometry(140,60,20,20);
@@ -40,3 +40,3 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
- QLabel* protect_label=new QLabel("<b>Protect</b>",settings);
+ QLabel* protect_label=new QLabel(tr( "<b>Protect</b>" ),settings);
protect_label->setGeometry(50,80,50,20);
@@ -44,3 +44,3 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
protect->setGeometry(100,80,40,20);
- QPushButton* protecthelp=new QPushButton("?",settings);
+ QPushButton* protecthelp=new QPushButton(tr( "?" ),settings);
protecthelp->setGeometry(140,80,20,20);
@@ -49,3 +49,3 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
- QLabel* safe_label=new QLabel("<b>Safe</b>",settings);
+ QLabel* safe_label=new QLabel(tr( "<b>Safe</b>" ),settings);
safe_label->setGeometry(50,100,50,20);
@@ -53,3 +53,3 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
safe->setGeometry(100,100,40,20);
- QPushButton* safeehelp=new QPushButton("?",settings);
+ QPushButton* safeehelp=new QPushButton(tr( "?" ),settings);
safeehelp->setGeometry(140,100,20,20);
@@ -58,3 +58,3 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
- QLabel* empty_label=new QLabel("<b>Empty</b>",settings);
+ QLabel* empty_label=new QLabel(tr( "<b>Empty</b>" ),settings);
empty_label->setGeometry(50,120,50,20);
@@ -62,3 +62,3 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
empty->setGeometry(100,120,40,20);
- QPushButton* emptyhelp=new QPushButton("?",settings);
+ QPushButton* emptyhelp=new QPushButton(tr( "?" ),settings);
emptyhelp->setGeometry(140,120,20,20);
@@ -67,3 +67,3 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
- defaultvalues=new QPushButton("Default Values",settings);
+ defaultvalues=new QPushButton(tr( "Default Values" ),settings);
defaultvalues->setGeometry(60,140,90,20);
@@ -71,3 +71,3 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
- QGroupBox* helpbox=new QGroupBox("Help",this);
+ QGroupBox* helpbox=new QGroupBox(tr( "Help" ),this);
helpbox->setGeometry(10,185,220,90);
@@ -184,3 +184,3 @@ void AI_Dialog::setHelpText(const QString& type)
{
- help->setText("Bring the pieces out of the endzone");
+ help->setText(tr( "Bring the pieces out of the endzone" ));
}
@@ -188,3 +188,3 @@ void AI_Dialog::setHelpText(const QString& type)
{
- help->setText("Eliminate an opponents piece");
+ help->setText(tr( "Eliminate an opponents piece" ));
}
@@ -192,3 +192,3 @@ void AI_Dialog::setHelpText(const QString& type)
{
- help->setText("Expose you own pieces.\nAfter such a move only one piece will remain in the slot");
+ help->setText(tr( "Expose you own pieces.\nAfter such a move only one piece will remain in the slot") );
}
@@ -196,3 +196,3 @@ void AI_Dialog::setHelpText(const QString& type)
{
- help->setText("Protect a single piece by\nputting another one in this slot");
+ help->setText(tr( "Protect a single piece by\nputting another one in this slot" ));
}
@@ -200,3 +200,3 @@ void AI_Dialog::setHelpText(const QString& type)
{
- help->setText("Move piece to a slot already\noccupied by the player");
+ help->setText(tr( "Move piece to a slot already\noccupied by the player" ));
}
@@ -204,3 +204,3 @@ void AI_Dialog::setHelpText(const QString& type)
{
- help->setText("Move piece to an empty slot");
+ help->setText(tr( "Move piece to an empty slot") );
}
@@ -208,3 +208,3 @@ void AI_Dialog::setHelpText(const QString& type)
{
- help->setText("Press and hold the ? buttton\nnext to a field for help");
+ help->setText(tr( "Press and hold the ? buttton\nnext to a field for help") );
}
diff --git a/noncore/games/backgammon/backgammon.cpp b/noncore/games/backgammon/backgammon.cpp
index c40f462..06523f1 100644
--- a/noncore/games/backgammon/backgammon.cpp
+++ b/noncore/games/backgammon/backgammon.cpp
@@ -27,3 +27,3 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
if (!name) setName("BackGammon");
- setCaption("Backgammon");
+ setCaption(tr( "Backgammon") );
setIcon( Resource::loadPixmap( "backgammon" ) );
@@ -107,26 +107,26 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
QPopupMenu* gamemenu= new QPopupMenu(this);
- gamemenu->insertItem("New",this,SLOT(newgame()));
+ gamemenu->insertItem(tr( "New" ),this,SLOT(newgame()));
gamemenu->insertSeparator();
- gamemenu->insertItem("Load",this,SLOT(loadgame()));
- gamemenu->insertItem("Save",this,SLOT(savegame()));
+ gamemenu->insertItem(tr( "Load" ),this,SLOT(loadgame()));
+ gamemenu->insertItem(tr( "Save" ),this,SLOT(savegame()));
gamemenu->insertSeparator();
- gamemenu->insertItem("Delete",this,SLOT(deletegame()));
- menuBar->insertItem("Game",gamemenu);
+ gamemenu->insertItem(tr( "Delete" ),this,SLOT(deletegame()));
+ menuBar->insertItem(tr( "Game" ),gamemenu);
QPopupMenu* thememenu= new QPopupMenu(this);
- thememenu->insertItem("New",this,SLOT(newtheme()));
+ thememenu->insertItem(tr( "New" ),this,SLOT(newtheme()));
thememenu->insertSeparator();
- thememenu->insertItem("Load",this,SLOT(loadtheme()));
- thememenu->insertItem("Save",this,SLOT(savetheme()));
+ thememenu->insertItem(tr( "Load"),this,SLOT(loadtheme()));
+ thememenu->insertItem(tr( "Save" ),this,SLOT(savetheme()));
thememenu->insertSeparator();
- thememenu->insertItem("Default",this,SLOT(themedefault()));
- thememenu->insertItem("Delete",this,SLOT(deletetheme()));
- menuBar->insertItem("Theme",thememenu);
+ thememenu->insertItem(tr( "Default"),this,SLOT(themedefault()));
+ thememenu->insertItem(tr( "Delete" ),this,SLOT(deletetheme()));
+ menuBar->insertItem(tr( "Theme" ),thememenu);
QPopupMenu* optionmenu=new QPopupMenu(this);
- optionmenu->insertItem("Player",this,SLOT(playerselect()));
+ optionmenu->insertItem(tr( "Player" ),this,SLOT(playerselect()));
optionmenu->insertSeparator();
- optionmenu->insertItem("AI",this,SLOT(modify_AI()));
- optionmenu->insertItem("Rules",this,SLOT(setrules()));
- menuBar->insertItem("Options",optionmenu);
+ optionmenu->insertItem(tr( "AI" ),this,SLOT(modify_AI()));
+ optionmenu->insertItem(tr( "Rules" ),this,SLOT(setrules()));
+ menuBar->insertItem(tr( "Options"),optionmenu);
@@ -512,3 +512,3 @@ void BackGammon::deletetheme()
- if(!QMessageBox::warning(this,"Backgammon","deleted theme "+theme_name+" ?","OK","Cancel"))
+ if(!QMessageBox::warning(this,tr( "Backgammon" ),tr( "deleted theme %1?").arg(theme_name),tr( "OK" ),tr( "Cancel" )))
{
@@ -520,3 +520,3 @@ void BackGammon::modify_AI()
{
- AI_Dialog* ai_mod=new AI_Dialog(this,"Load Theme",".theme");
+ AI_Dialog* ai_mod=new AI_Dialog(this,tr( "Load Theme" ),".theme");
ai_mod->setAISettings(move->getAISettings());
@@ -541,3 +541,3 @@ void BackGammon::setrules()
{
- RulesDialog* rulesdialog=new RulesDialog(this,"Load Theme",".theme");
+ RulesDialog* rulesdialog=new RulesDialog(this,tr( "Load Theme" ),".theme");
rulesdialog->setRules(rules);
@@ -801,3 +801,3 @@ void BackGammon::nomove()
nomove_marker->show();
- message->setText("<b>no move</b>");
+ message->setText(tr( "<b>no move</b>" ));
dice1_played=true;
@@ -837,5 +837,5 @@ void BackGammon::finished(int theplayer)
if(theplayer==1)
- message->setText("<b>Player 1 wins. Click on board for new game.</b>");
+ message->setText(tr( "<b>Player 1 wins. Click on board for new game.</b>" ));
else
- message->setText("<b>Player 2 wins. Click on board for new game.</b>");
+ message->setText(tr( "<b>Player 2 wins. Click on board for new game.</b>" ));
diceA1_value=7;
@@ -897,3 +897,3 @@ void BackGammon::setplayer()
{
- message->setText("<b>P2 turn</b>");
+ message->setText(tr( "<b>P2 turn</b>", "P means player" ));
dice_rolled=false;
@@ -905,3 +905,3 @@ void BackGammon::setplayer()
{
- message->setText("<b>P1 turn</b>");
+ message->setText(tr( "<b>P1 turn</b>", "P means player" ));
dice_rolled=false;