summaryrefslogtreecommitdiff
authorcniehaus <cniehaus>2003-06-01 13:48:07 (UTC)
committer cniehaus <cniehaus>2003-06-01 13:48:07 (UTC)
commit145faa6417fd952768d0abe15cc8b9920548d45f (patch) (unidiff)
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
@@ -9,66 +9,66 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
9 setCaption("AI Configuration"); 9 setCaption("AI Configuration");
10 10
11 QGroupBox* settings=new QGroupBox("Settings",this); 11 QGroupBox* settings=new QGroupBox(tr( "Settings" ),this);
12 settings->setGeometry(10,5,220,170); 12 settings->setGeometry(10,5,220,170);
13 13
14 QLabel* rescue_label=new QLabel("<b>Rescue</b>",settings); 14 QLabel* rescue_label=new QLabel(tr( "<b>Rescue</b>" ),settings);
15 rescue_label->setGeometry(50,20,50,20); 15 rescue_label->setGeometry(50,20,50,20);
16 rescue=new QSpinBox(0,6,1,settings); 16 rescue=new QSpinBox(0,6,1,settings);
17 rescue->setGeometry(100,20,40,20); 17 rescue->setGeometry(100,20,40,20);
18 QPushButton* rescuehelp=new QPushButton("?",settings); 18 QPushButton* rescuehelp=new QPushButton(tr( "?" ),settings);
19 rescuehelp->setGeometry(140,20,20,20); 19 rescuehelp->setGeometry(140,20,20,20);
20 connect(rescuehelp,SIGNAL(pressed()),this,SLOT(rescuehelp_pressed())); 20 connect(rescuehelp,SIGNAL(pressed()),this,SLOT(rescuehelp_pressed()));
21 connect(rescuehelp,SIGNAL(released()),this,SLOT(rescuehelp_released())); 21 connect(rescuehelp,SIGNAL(released()),this,SLOT(rescuehelp_released()));
22 22
23 QLabel* eliminate_label=new QLabel("<b>Eliminate</b>",settings); 23 QLabel* eliminate_label=new QLabel(tr( "<b>Eliminate</b>" ),settings);
24 eliminate_label->setGeometry(50,40,50,20); 24 eliminate_label->setGeometry(50,40,50,20);
25 eliminate=new QSpinBox(0,6,1,settings); 25 eliminate=new QSpinBox(0,6,1,settings);
26 eliminate->setGeometry(100,40,40,20); 26 eliminate->setGeometry(100,40,40,20);
27 QPushButton* eliminatehelp=new QPushButton("?",settings); 27 QPushButton* eliminatehelp=new QPushButton(tr( "?" ),settings);
28 eliminatehelp->setGeometry(140,40,20,20); 28 eliminatehelp->setGeometry(140,40,20,20);
29 connect(eliminatehelp,SIGNAL(pressed()),this,SLOT(eliminatehelp_pressed())); 29 connect(eliminatehelp,SIGNAL(pressed()),this,SLOT(eliminatehelp_pressed()));
30 connect(eliminatehelp,SIGNAL(released()),this,SLOT(eliminatehelp_released())); 30 connect(eliminatehelp,SIGNAL(released()),this,SLOT(eliminatehelp_released()));
31 31
32 QLabel* expose_label=new QLabel("<b>Expose</b>",settings); 32 QLabel* expose_label=new QLabel(tr( "<b>Expose</b>" ),settings);
33 expose_label->setGeometry(50,60,50,20); 33 expose_label->setGeometry(50,60,50,20);
34 expose=new QSpinBox(0,6,1,settings); 34 expose=new QSpinBox(0,6,1,settings);
35 expose->setGeometry(100,60,40,20); 35 expose->setGeometry(100,60,40,20);
36 QPushButton* exposeehelp=new QPushButton("?",settings); 36 QPushButton* exposeehelp=new QPushButton(tr( "?" ),settings);
37 exposeehelp->setGeometry(140,60,20,20); 37 exposeehelp->setGeometry(140,60,20,20);
38 connect(exposeehelp,SIGNAL(pressed()),this,SLOT(exposehelp_pressed())); 38 connect(exposeehelp,SIGNAL(pressed()),this,SLOT(exposehelp_pressed()));
39 connect(exposeehelp,SIGNAL(released()),this,SLOT(exposehelp_released())); 39 connect(exposeehelp,SIGNAL(released()),this,SLOT(exposehelp_released()));
40 40
41 QLabel* protect_label=new QLabel("<b>Protect</b>",settings); 41 QLabel* protect_label=new QLabel(tr( "<b>Protect</b>" ),settings);
42 protect_label->setGeometry(50,80,50,20); 42 protect_label->setGeometry(50,80,50,20);
43 protect=new QSpinBox(0,6,1,settings); 43 protect=new QSpinBox(0,6,1,settings);
44 protect->setGeometry(100,80,40,20); 44 protect->setGeometry(100,80,40,20);
45 QPushButton* protecthelp=new QPushButton("?",settings); 45 QPushButton* protecthelp=new QPushButton(tr( "?" ),settings);
46 protecthelp->setGeometry(140,80,20,20); 46 protecthelp->setGeometry(140,80,20,20);
47 connect(protecthelp,SIGNAL(pressed()),this,SLOT(protecthelp_pressed())); 47 connect(protecthelp,SIGNAL(pressed()),this,SLOT(protecthelp_pressed()));
48 connect(protecthelp,SIGNAL(released()),this,SLOT(protecthelp_released())); 48 connect(protecthelp,SIGNAL(released()),this,SLOT(protecthelp_released()));
49 49
50 QLabel* safe_label=new QLabel("<b>Safe</b>",settings); 50 QLabel* safe_label=new QLabel(tr( "<b>Safe</b>" ),settings);
51 safe_label->setGeometry(50,100,50,20); 51 safe_label->setGeometry(50,100,50,20);
52 safe=new QSpinBox(0,6,1,settings); 52 safe=new QSpinBox(0,6,1,settings);
53 safe->setGeometry(100,100,40,20); 53 safe->setGeometry(100,100,40,20);
54 QPushButton* safeehelp=new QPushButton("?",settings); 54 QPushButton* safeehelp=new QPushButton(tr( "?" ),settings);
55 safeehelp->setGeometry(140,100,20,20); 55 safeehelp->setGeometry(140,100,20,20);
56 connect(safeehelp,SIGNAL(pressed()),this,SLOT(safehelp_pressed())); 56 connect(safeehelp,SIGNAL(pressed()),this,SLOT(safehelp_pressed()));
57 connect(safeehelp,SIGNAL(released()),this,SLOT(safehelp_released())); 57 connect(safeehelp,SIGNAL(released()),this,SLOT(safehelp_released()));
58 58
59 QLabel* empty_label=new QLabel("<b>Empty</b>",settings); 59 QLabel* empty_label=new QLabel(tr( "<b>Empty</b>" ),settings);
60 empty_label->setGeometry(50,120,50,20); 60 empty_label->setGeometry(50,120,50,20);
61 empty=new QSpinBox(0,6,1,settings); 61 empty=new QSpinBox(0,6,1,settings);
62 empty->setGeometry(100,120,40,20); 62 empty->setGeometry(100,120,40,20);
63 QPushButton* emptyhelp=new QPushButton("?",settings); 63 QPushButton* emptyhelp=new QPushButton(tr( "?" ),settings);
64 emptyhelp->setGeometry(140,120,20,20); 64 emptyhelp->setGeometry(140,120,20,20);
65 connect(emptyhelp,SIGNAL(pressed()),this,SLOT(emptyhelp_pressed())); 65 connect(emptyhelp,SIGNAL(pressed()),this,SLOT(emptyhelp_pressed()));
66 connect(emptyhelp,SIGNAL(released()),this,SLOT(emptyhelp_released())); 66 connect(emptyhelp,SIGNAL(released()),this,SLOT(emptyhelp_released()));
67 67
68 defaultvalues=new QPushButton("Default Values",settings); 68 defaultvalues=new QPushButton(tr( "Default Values" ),settings);
69 defaultvalues->setGeometry(60,140,90,20); 69 defaultvalues->setGeometry(60,140,90,20);
70 connect(defaultvalues,SIGNAL(clicked()),this,SLOT(setDefaultValues())); 70 connect(defaultvalues,SIGNAL(clicked()),this,SLOT(setDefaultValues()));
71 71
72 QGroupBox* helpbox=new QGroupBox("Help",this); 72 QGroupBox* helpbox=new QGroupBox(tr( "Help" ),this);
73 helpbox->setGeometry(10,185,220,90); 73 helpbox->setGeometry(10,185,220,90);
74 74
@@ -183,29 +183,29 @@ void AI_Dialog::setHelpText(const QString& type)
183 if(type=="rescue") 183 if(type=="rescue")
184 { 184 {
185 help->setText("Bring the pieces out of the endzone"); 185 help->setText(tr( "Bring the pieces out of the endzone" ));
186 } 186 }
187 else if(type=="eliminate") 187 else if(type=="eliminate")
188 { 188 {
189 help->setText("Eliminate an opponents piece"); 189 help->setText(tr( "Eliminate an opponents piece" ));
190 } 190 }
191 else if(type=="expose") 191 else if(type=="expose")
192 { 192 {
193 help->setText("Expose you own pieces.\nAfter such a move only one piece will remain in the slot"); 193 help->setText(tr( "Expose you own pieces.\nAfter such a move only one piece will remain in the slot") );
194 } 194 }
195 else if(type=="protect") 195 else if(type=="protect")
196 { 196 {
197 help->setText("Protect a single piece by\nputting another one in this slot"); 197 help->setText(tr( "Protect a single piece by\nputting another one in this slot" ));
198 } 198 }
199 else if(type=="safe") 199 else if(type=="safe")
200 { 200 {
201 help->setText("Move piece to a slot already\noccupied by the player"); 201 help->setText(tr( "Move piece to a slot already\noccupied by the player" ));
202 } 202 }
203 else if(type=="empty") 203 else if(type=="empty")
204 { 204 {
205 help->setText("Move piece to an empty slot"); 205 help->setText(tr( "Move piece to an empty slot") );
206 } 206 }
207 else 207 else
208 { 208 {
209 help->setText("Press and hold the ? buttton\nnext to a field for help"); 209 help->setText(tr( "Press and hold the ? buttton\nnext to a field for help") );
210 } 210 }
211} 211}
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
@@ -26,5 +26,5 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
26{ 26{
27 if (!name) setName("BackGammon"); 27 if (!name) setName("BackGammon");
28 setCaption("Backgammon"); 28 setCaption(tr( "Backgammon") );
29 setIcon( Resource::loadPixmap( "backgammon" ) ); 29 setIcon( Resource::loadPixmap( "backgammon" ) );
30 //general counter varaible 30 //general counter varaible
@@ -106,28 +106,28 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
106 106
107 QPopupMenu* gamemenu= new QPopupMenu(this); 107 QPopupMenu* gamemenu= new QPopupMenu(this);
108 gamemenu->insertItem("New",this,SLOT(newgame())); 108 gamemenu->insertItem(tr( "New" ),this,SLOT(newgame()));
109 gamemenu->insertSeparator(); 109 gamemenu->insertSeparator();
110 gamemenu->insertItem("Load",this,SLOT(loadgame())); 110 gamemenu->insertItem(tr( "Load" ),this,SLOT(loadgame()));
111 gamemenu->insertItem("Save",this,SLOT(savegame())); 111 gamemenu->insertItem(tr( "Save" ),this,SLOT(savegame()));
112 gamemenu->insertSeparator(); 112 gamemenu->insertSeparator();
113 gamemenu->insertItem("Delete",this,SLOT(deletegame())); 113 gamemenu->insertItem(tr( "Delete" ),this,SLOT(deletegame()));
114 menuBar->insertItem("Game",gamemenu); 114 menuBar->insertItem(tr( "Game" ),gamemenu);
115 115
116 QPopupMenu* thememenu= new QPopupMenu(this); 116 QPopupMenu* thememenu= new QPopupMenu(this);
117 thememenu->insertItem("New",this,SLOT(newtheme())); 117 thememenu->insertItem(tr( "New" ),this,SLOT(newtheme()));
118 thememenu->insertSeparator(); 118 thememenu->insertSeparator();
119 thememenu->insertItem("Load",this,SLOT(loadtheme())); 119 thememenu->insertItem(tr( "Load"),this,SLOT(loadtheme()));
120 thememenu->insertItem("Save",this,SLOT(savetheme())); 120 thememenu->insertItem(tr( "Save" ),this,SLOT(savetheme()));
121 thememenu->insertSeparator(); 121 thememenu->insertSeparator();
122 thememenu->insertItem("Default",this,SLOT(themedefault())); 122 thememenu->insertItem(tr( "Default"),this,SLOT(themedefault()));
123 thememenu->insertItem("Delete",this,SLOT(deletetheme())); 123 thememenu->insertItem(tr( "Delete" ),this,SLOT(deletetheme()));
124 menuBar->insertItem("Theme",thememenu); 124 menuBar->insertItem(tr( "Theme" ),thememenu);
125 125
126 QPopupMenu* optionmenu=new QPopupMenu(this); 126 QPopupMenu* optionmenu=new QPopupMenu(this);
127 optionmenu->insertItem("Player",this,SLOT(playerselect())); 127 optionmenu->insertItem(tr( "Player" ),this,SLOT(playerselect()));
128 optionmenu->insertSeparator(); 128 optionmenu->insertSeparator();
129 optionmenu->insertItem("AI",this,SLOT(modify_AI())); 129 optionmenu->insertItem(tr( "AI" ),this,SLOT(modify_AI()));
130 optionmenu->insertItem("Rules",this,SLOT(setrules())); 130 optionmenu->insertItem(tr( "Rules" ),this,SLOT(setrules()));
131 menuBar->insertItem("Options",optionmenu); 131 menuBar->insertItem(tr( "Options"),optionmenu);
132 132
133 QWidget* mainarea=new QWidget(this); 133 QWidget* mainarea=new QWidget(this);
@@ -511,5 +511,5 @@ void BackGammon::deletetheme()
511 QString theme_file=QPEApplication::qpeDir()+"/backgammon/"+theme_name+".theme"; 511 QString theme_file=QPEApplication::qpeDir()+"/backgammon/"+theme_name+".theme";
512 512
513 if(!QMessageBox::warning(this,"Backgammon","deleted theme "+theme_name+" ?","OK","Cancel")) 513 if(!QMessageBox::warning(this,tr( "Backgammon" ),tr( "deleted theme %1?").arg(theme_name),tr( "OK" ),tr( "Cancel" )))
514 { 514 {
515 QFile(theme_file).remove(); 515 QFile(theme_file).remove();
@@ -519,5 +519,5 @@ void BackGammon::deletetheme()
519void BackGammon::modify_AI() 519void BackGammon::modify_AI()
520{ 520{
521 AI_Dialog* ai_mod=new AI_Dialog(this,"Load Theme",".theme"); 521 AI_Dialog* ai_mod=new AI_Dialog(this,tr( "Load Theme" ),".theme");
522 ai_mod->setAISettings(move->getAISettings()); 522 ai_mod->setAISettings(move->getAISettings());
523 if(!ai_mod->exec()) 523 if(!ai_mod->exec())
@@ -540,5 +540,5 @@ void BackGammon::modify_AI()
540void BackGammon::setrules() 540void BackGammon::setrules()
541{ 541{
542 RulesDialog* rulesdialog=new RulesDialog(this,"Load Theme",".theme"); 542 RulesDialog* rulesdialog=new RulesDialog(this,tr( "Load Theme" ),".theme");
543 rulesdialog->setRules(rules); 543 rulesdialog->setRules(rules);
544 if(!rulesdialog->exec()) 544 if(!rulesdialog->exec())
@@ -800,5 +800,5 @@ void BackGammon::nomove()
800 nomove_marker->setX(170); 800 nomove_marker->setX(170);
801 nomove_marker->show(); 801 nomove_marker->show();
802 message->setText("<b>no move</b>"); 802 message->setText(tr( "<b>no move</b>" ));
803 dice1_played=true; 803 dice1_played=true;
804 dice2_played=true; 804 dice2_played=true;
@@ -836,7 +836,7 @@ void BackGammon::finished(int theplayer)
836 nomove_marker->hide(); 836 nomove_marker->hide();
837 if(theplayer==1) 837 if(theplayer==1)
838 message->setText("<b>Player 1 wins. Click on board for new game.</b>"); 838 message->setText(tr( "<b>Player 1 wins. Click on board for new game.</b>" ));
839 else 839 else
840 message->setText("<b>Player 2 wins. Click on board for new game.</b>"); 840 message->setText(tr( "<b>Player 2 wins. Click on board for new game.</b>" ));
841 diceA1_value=7; 841 diceA1_value=7;
842 diceA2_value=7; 842 diceA2_value=7;
@@ -896,5 +896,5 @@ void BackGammon::setplayer()
896 if(dice1_played && dice2_played && dice3_played && dice4_played && player==1) 896 if(dice1_played && dice2_played && dice3_played && dice4_played && player==1)
897 { 897 {
898 message->setText("<b>P2 turn</b>"); 898 message->setText(tr( "<b>P2 turn</b>", "P means player" ));
899 dice_rolled=false; 899 dice_rolled=false;
900 player=2; 900 player=2;
@@ -904,5 +904,5 @@ void BackGammon::setplayer()
904 else if(dice1_played && dice2_played && dice3_played && dice4_played && player==2) 904 else if(dice1_played && dice2_played && dice3_played && dice4_played && player==2)
905 { 905 {
906 message->setText("<b>P1 turn</b>"); 906 message->setText(tr( "<b>P1 turn</b>", "P means player" ));
907 dice_rolled=false; 907 dice_rolled=false;
908 player=1; 908 player=1;