summaryrefslogtreecommitdiff
authorcniehaus <cniehaus>2002-09-03 19:00:18 (UTC)
committer cniehaus <cniehaus>2002-09-03 19:00:18 (UTC)
commitcf317ab123c51fb957ec35d44431e77a8b76c279 (patch) (unidiff)
treecb81fa703851995a6beb2c8b562da4d2344da47b
parentd9186e958c93df6d6363e2dc0af704e93eb0c06e (diff)
downloadopie-cf317ab123c51fb957ec35d44431e77a8b76c279.zip
opie-cf317ab123c51fb957ec35d44431e77a8b76c279.tar.gz
opie-cf317ab123c51fb957ec35d44431e77a8b76c279.tar.bz2
As KPacman didn't use tr() but KDE's i18n() is did a simple
perl -pi~ -e 's/i18n/tr/g' *.cpp
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/kpacman/board.cpp6
-rw-r--r--noncore/games/kpacman/keys.cpp10
-rw-r--r--noncore/games/kpacman/kpacman.cpp30
-rw-r--r--noncore/games/kpacman/kpacmanwidget.cpp4
-rw-r--r--noncore/games/kpacman/painter.cpp6
-rw-r--r--noncore/games/kpacman/referee.cpp54
-rw-r--r--noncore/games/kpacman/score.cpp48
-rw-r--r--noncore/games/kpacman/status.cpp4
8 files changed, 81 insertions, 81 deletions
diff --git a/noncore/games/kpacman/board.cpp b/noncore/games/kpacman/board.cpp
index 849e75b..f95f699 100644
--- a/noncore/games/kpacman/board.cpp
+++ b/noncore/games/kpacman/board.cpp
@@ -54,17 +54,17 @@ void Board::init(Image image, QString levelName)
54 if (mapName == levelName) 54 if (mapName == levelName)
55 image = File; 55 image = File;
56 else { 56 else {
57 QFile levelFile(levelName); 57 QFile levelFile(levelName);
58 if (!levelFile.open(IO_ReadOnly)) { 58 if (!levelFile.open(IO_ReadOnly)) {
59 59
60 QString msg = i18n("The levelmap could not be constructed.\n\n" 60 QString msg = "The levelmap could not be constructed.\n\n"
61 "The file '@LEVELNAME@' does not exist,\n" 61 "The file '@LEVELNAME@' does not exist,\n"
62 "or could not be opened for reading."); 62 "or could not be opened for reading.";
63 msg.replace(QRegExp("@LEVELNAME@"), levelName); 63 msg.replace(QRegExp("@LEVELNAME@"), levelName);
64 // QMessageBox::information(0, i18n("Initialization Error"), msg); 64 // QMessageBox::information(0, tr("Initialization Error"), msg);
65 printf("%s\n", msg.data()); 65 printf("%s\n", msg.data());
66 } else { 66 } else {
67 map.fill(' ', BoardHeight*BoardWidth); 67 map.fill(' ', BoardHeight*BoardWidth);
68 int height = 0; 68 int height = 0;
69 69
70 QTextStream levelStream(&levelFile); 70 QTextStream levelStream(&levelFile);
diff --git a/noncore/games/kpacman/keys.cpp b/noncore/games/kpacman/keys.cpp
index c609373..8b17785 100644
--- a/noncore/games/kpacman/keys.cpp
+++ b/noncore/games/kpacman/keys.cpp
@@ -27,25 +27,25 @@
27Keys::Keys( QWidget *parent, const char *name) 27Keys::Keys( QWidget *parent, const char *name)
28 : QDialog( parent, name, TRUE ) 28 : QDialog( parent, name, TRUE )
29{ 29{
30 //KStandardDirs *dirs = KGlobal::dirs(); 30 //KStandardDirs *dirs = KGlobal::dirs();
31 31
32 QPushButton *okButton = new QPushButton(this); 32 QPushButton *okButton = new QPushButton(this);
33 okButton->setText(i18n("Ok")); 33 okButton->setText(tr("Ok"));
34 okButton->setFixedSize(okButton->size()); 34 okButton->setFixedSize(okButton->size());
35 connect( okButton, SIGNAL(clicked()),this, SLOT(ok()) ); 35 connect( okButton, SIGNAL(clicked()),this, SLOT(ok()) );
36 okButton->move(20,210); 36 okButton->move(20,210);
37 37
38 QPushButton *defaultButton = new QPushButton(this); 38 QPushButton *defaultButton = new QPushButton(this);
39 defaultButton->setText(i18n("Defaults")); 39 defaultButton->setText(tr("Defaults"));
40 defaultButton->setFixedSize(defaultButton->size()); 40 defaultButton->setFixedSize(defaultButton->size());
41 connect( defaultButton, SIGNAL(clicked()),this, SLOT(defaults()) ); 41 connect( defaultButton, SIGNAL(clicked()),this, SLOT(defaults()) );
42 defaultButton->move(140,210); 42 defaultButton->move(140,210);
43 43
44 QPushButton *cancelButton = new QPushButton(this); 44 QPushButton *cancelButton = new QPushButton(this);
45 cancelButton->setText(i18n("Cancel")); 45 cancelButton->setText(tr("Cancel"));
46 cancelButton->setFixedSize(cancelButton->size()); 46 cancelButton->setFixedSize(cancelButton->size());
47 connect( cancelButton, SIGNAL(clicked()),this, SLOT(reject()) ); 47 connect( cancelButton, SIGNAL(clicked()),this, SLOT(reject()) );
48 cancelButton->move(260,210); 48 cancelButton->move(260,210);
49 49
50 QFrame *separator = new QFrame(this); 50 QFrame *separator = new QFrame(this);
51 separator->setFrameStyle( QFrame::HLine | QFrame::Sunken ); 51 separator->setFrameStyle( QFrame::HLine | QFrame::Sunken );
@@ -90,26 +90,26 @@ Keys::Keys( QWidget *parent, const char *name)
90 right->setPixmap( QPixmap(pixPath)); 90 right->setPixmap( QPixmap(pixPath));
91 right->setFixedSize(right->pixmap()->size()); 91 right->setFixedSize(right->pixmap()->size());
92 connect( right, SIGNAL(clicked()),this, SLOT(butRight()) ); 92 connect( right, SIGNAL(clicked()),this, SLOT(butRight()) );
93 right->move(220, 90); 93 right->move(220, 90);
94 94
95 95
96 setCaption(i18n("Change Direction Keys")); 96 setCaption(tr("Change Direction Keys"));
97 setFixedSize(380, 260); 97 setFixedSize(380, 260);
98 lab = 0; 98 lab = 0;
99 init(); 99 init();
100} 100}
101 101
102void Keys::keyPressEvent( QKeyEvent *e ) 102void Keys::keyPressEvent( QKeyEvent *e )
103{ 103{
104 uint kCode = e->key() & ~(SHIFT | CTRL | ALT); 104 uint kCode = e->key() & ~(SHIFT | CTRL | ALT);
105 QString string = KAccel::keyToString(kCode); 105 QString string = KAccel::keyToString(kCode);
106 106
107 if (lab != 0) { 107 if (lab != 0) {
108 if ( string.isNull() ) 108 if ( string.isNull() )
109 lab->setText(i18n("Undefined key")); 109 lab->setText(tr("Undefined key"));
110 else 110 else
111 lab->setText(string); 111 lab->setText(string);
112 } 112 }
113 else if ( lab == 0 && e->key() == Key_Escape) 113 else if ( lab == 0 && e->key() == Key_Escape)
114 reject(); 114 reject();
115} 115}
diff --git a/noncore/games/kpacman/kpacman.cpp b/noncore/games/kpacman/kpacman.cpp
index 4077085..7df6ef0 100644
--- a/noncore/games/kpacman/kpacman.cpp
+++ b/noncore/games/kpacman/kpacman.cpp
@@ -84,47 +84,47 @@ Kpacman::~Kpacman()
84} 84}
85 85
86void Kpacman::menu() 86void Kpacman::menu()
87{ 87{
88 gamePopup = new QPopupMenu(); 88 gamePopup = new QPopupMenu();
89 CHECK_PTR( gamePopup ); 89 CHECK_PTR( gamePopup );
90 newID = gamePopup->insertItem(i18n("&New"), this, SLOT(newKpacman()),Key_F2); 90 newID = gamePopup->insertItem(tr("&New"), this, SLOT(newKpacman()),Key_F2);
91 pauseID = gamePopup->insertItem(i18n("&Pause"), 91 pauseID = gamePopup->insertItem(tr("&Pause"),
92 this, SLOT(pauseKpacman()), Key_F3); 92 this, SLOT(pauseKpacman()), Key_F3);
93 hofID = gamePopup->insertItem(i18n("&Hall of fame"), 93 hofID = gamePopup->insertItem(tr("&Hall of fame"),
94 this, SLOT(toggleHallOfFame()), Key_F4); 94 this, SLOT(toggleHallOfFame()), Key_F4);
95 gamePopup->insertSeparator(); 95 gamePopup->insertSeparator();
96 gamePopup->insertItem(i18n("&Quit"), this, SLOT(quitKpacman()), CTRL+Key_Q); 96 gamePopup->insertItem(tr("&Quit"), this, SLOT(quitKpacman()), CTRL+Key_Q);
97 gamePopup->setCheckable(TRUE); 97 gamePopup->setCheckable(TRUE);
98 98
99 optionsPopup = new QPopupMenu(); 99 optionsPopup = new QPopupMenu();
100 CHECK_PTR(optionsPopup); 100 CHECK_PTR(optionsPopup);
101 101
102 modesPopup = new QPopupMenu(); 102 modesPopup = new QPopupMenu();
103 CHECK_PTR(modesPopup); 103 CHECK_PTR(modesPopup);
104 104
105 hideMouseCursorID = optionsPopup->insertItem(i18n("&Hide Mousecursor"), 105 hideMouseCursorID = optionsPopup->insertItem(tr("&Hide Mousecursor"),
106 this, SLOT(toggleHideMouseCursor()), 106 this, SLOT(toggleHideMouseCursor()),
107 CTRL+Key_H); 107 CTRL+Key_H);
108 optionsPopup->insertSeparator(); 108 optionsPopup->insertSeparator();
109 109
110 if (lookupSchemes() > 0) { 110 if (lookupSchemes() > 0) {
111 optionsPopup->insertItem(i18n("&Select graphic scheme"), modesPopup); 111 optionsPopup->insertItem(tr("&Select graphic scheme"), modesPopup);
112 optionsPopup->insertSeparator(); 112 optionsPopup->insertSeparator();
113 } 113 }
114 114
115 focusOutPauseID = optionsPopup->insertItem(i18n("&Pause in Background"), 115 focusOutPauseID = optionsPopup->insertItem(tr("&Pause in Background"),
116 this, SLOT(toggleFocusOutPause())); 116 this, SLOT(toggleFocusOutPause()));
117 focusInContinueID = optionsPopup->insertItem(i18n("&Continue in Foreground"), 117 focusInContinueID = optionsPopup->insertItem(tr("&Continue in Foreground"),
118 this, SLOT(toggleFocusInContinue())); 118 this, SLOT(toggleFocusInContinue()));
119 optionsPopup->insertSeparator(); 119 optionsPopup->insertSeparator();
120 120
121 optionsPopup->insertItem(i18n("Change &keys..."), this, SLOT(confKeys())); 121 optionsPopup->insertItem(tr("Change &keys..."), this, SLOT(confKeys()));
122 122
123#ifndef QWS 123#ifndef QWS
124 QString aboutText = i18n("@PACKAGE@ - @VERSION@\n\n" 124 QString aboutText = tr("@PACKAGE@ - @VERSION@\n\n"
125 "Joerg Thoennissen (joe@dsite.de)\n\n" 125 "Joerg Thoennissen (joe@dsite.de)\n\n"
126 "A pacman game for the KDE Desktop\n\n" 126 "A pacman game for the KDE Desktop\n\n"
127 "The program based on the source of ksnake\n" 127 "The program based on the source of ksnake\n"
128 "by Michel Filippi (mfilippi@sade.rhein-main.de).\n" 128 "by Michel Filippi (mfilippi@sade.rhein-main.de).\n"
129 "The design was strongly influenced by the pacman\n" 129 "The design was strongly influenced by the pacman\n"
130 "(c) 1980 MIDWAY MFG.CO.\n\n" 130 "(c) 1980 MIDWAY MFG.CO.\n\n"
@@ -134,31 +134,31 @@ void Kpacman::menu()
134 aboutText.replace(QRegExp("@VERSION@"), VERSION); 134 aboutText.replace(QRegExp("@VERSION@"), VERSION);
135 QPopupMenu *helpPopup = helpMenu(aboutText, FALSE); 135 QPopupMenu *helpPopup = helpMenu(aboutText, FALSE);
136#endif 136#endif
137 137
138 //_menuBar = new KMenuBar(this); 138 //_menuBar = new KMenuBar(this);
139 //CHECK_PTR( _menuBar ); 139 //CHECK_PTR( _menuBar );
140 //_menuBar->insertItem(i18n("&Game"), gamePopup); 140 //_menuBar->insertItem(tr("&Game"), gamePopup);
141 //_menuBar->insertItem(i18n("&Options"), optionsPopup); 141 //_menuBar->insertItem(tr("&Options"), optionsPopup);
142 //_menuBar->insertSeparator(); 142 //_menuBar->insertSeparator();
143#ifndef QWS 143#ifndef QWS
144 _menuBar->insertItem(i18n("&Help"), helpPopup); 144 _menuBar->insertItem(tr("&Help"), helpPopup);
145#endif 145#endif
146} 146}
147 147
148int Kpacman::lookupSchemes() 148int Kpacman::lookupSchemes()
149{ 149{
150 APP_CONFIG_BEGIN( cfg ); 150 APP_CONFIG_BEGIN( cfg );
151 int ModeCount = cfg->readNumEntry("ModeCount", -1); 151 int ModeCount = cfg->readNumEntry("ModeCount", -1);
152 int Mode = cfg->readNumEntry("Mode", -1); 152 int Mode = cfg->readNumEntry("Mode", -1);
153 int SchemeCount = cfg->readNumEntry("SchemeCount"); 153 int SchemeCount = cfg->readNumEntry("SchemeCount");
154 int Scheme = cfg->readNumEntry("Scheme", -1); 154 int Scheme = cfg->readNumEntry("Scheme", -1);
155 155
156 if (SchemeCount == 0 || Scheme == -1) { 156 if (SchemeCount == 0 || Scheme == -1) {
157 QMessageBox::warning(this, i18n("Configuration Error"), 157 QMessageBox::warning(this, tr("Configuration Error"),
158 i18n("There are no schemes defined,\n" 158 tr("There are no schemes defined,\n"
159 "or no scheme is selected.")); 159 "or no scheme is selected."));
160 APP_CONFIG_END( cfg ); 160 APP_CONFIG_END( cfg );
161 return 0; 161 return 0;
162 } 162 }
163 163
164 connect(modesPopup, SIGNAL(activated(int)), this, SLOT(schemeChecked(int))); 164 connect(modesPopup, SIGNAL(activated(int)), this, SLOT(schemeChecked(int)));
diff --git a/noncore/games/kpacman/kpacmanwidget.cpp b/noncore/games/kpacman/kpacmanwidget.cpp
index 330c88e..215dcda 100644
--- a/noncore/games/kpacman/kpacmanwidget.cpp
+++ b/noncore/games/kpacman/kpacmanwidget.cpp
@@ -111,17 +111,17 @@ void KpacmanWidget::confScheme()
111 111
112 if (bitfont != 0) 112 if (bitfont != 0)
113 delete bitfont; 113 delete bitfont;
114 114
115 bitfont = new Bitfont(fontName, bitfontFirstChar, bitfontLastChar); 115 bitfont = new Bitfont(fontName, bitfontFirstChar, bitfontLastChar);
116 if (bitfont->width() == 0 || bitfont->height() == 0) { 116 if (bitfont->width() == 0 || bitfont->height() == 0) {
117 QString msg = i18n("The bitfont could not be contructed.\n\n" 117 QString msg = tr("The bitfont could not be contructed.\n\n"
118 "The file '@FONTNAME@' does not exist,\n" 118 "The file '@FONTNAME@' does not exist,\n"
119 "or is of an unknown format."); 119 "or is of an unknown format.");
120 msg.replace(QRegExp("@FONTNAME@"), fontName); 120 msg.replace(QRegExp("@FONTNAME@"), fontName);
121 // QMessageBox::critical(this, i18n("Initialization Error"), msg); 121 // QMessageBox::critical(this, tr("Initialization Error"), msg);
122 printf("%s\n", msg.data()); 122 printf("%s\n", msg.data());
123 } 123 }
124 } 124 }
125 125
126 RESTORE_CONFIG_GROUP( cfg, oldgroup ); 126 RESTORE_CONFIG_GROUP( cfg, oldgroup );
127 APP_CONFIG_END( cfg ); 127 APP_CONFIG_END( cfg );
diff --git a/noncore/games/kpacman/painter.cpp b/noncore/games/kpacman/painter.cpp
index 16fed55..80aeab0 100644
--- a/noncore/games/kpacman/painter.cpp
+++ b/noncore/games/kpacman/painter.cpp
@@ -71,17 +71,17 @@ QList<QPixmap> *Painter::loadPixmap(QWidget*, QString pixmapName,
71 71
72 if (!pixmaps->isEmpty()) 72 if (!pixmaps->isEmpty())
73 pixmaps->clear(); 73 pixmaps->clear();
74 74
75 QPixmap PIXMAP(pixmapName); 75 QPixmap PIXMAP(pixmapName);
76 if (PIXMAP.isNull() || PIXMAP.mask() == NULL) { 76 if (PIXMAP.isNull() || PIXMAP.mask() == NULL) {
77 QString msg = i18n("The pixmap could not be contructed.\n\n" 77 QString msg = "The pixmap could not be contructed.\n\n"
78 "The file '@PIXMAPNAME@' does not exist,\n" 78 "The file '@PIXMAPNAME@' does not exist,\n"
79 "or is of an unknown format."); 79 "or is of an unknown format.";
80 msg.replace(QRegExp("@PIXMAPNAME@"), pixmapName); 80 msg.replace(QRegExp("@PIXMAPNAME@"), pixmapName);
81 // QMessageBox::critical(parent, i18n("Initialization Error"), msg); 81 // QMessageBox::critical(parent, tr("Initialization Error"), msg);
82 printf("%s\n", msg.data()); 82 printf("%s\n", msg.data());
83 return 0; 83 return 0;
84 } 84 }
85 85
86 int height = PIXMAP.height(); 86 int height = PIXMAP.height();
87 int width = (height == 0) ? 0 : PIXMAP.width()/(PIXMAP.width()/height); 87 int width = (height == 0) ? 0 : PIXMAP.width()/(PIXMAP.width()/height);
diff --git a/noncore/games/kpacman/referee.cpp b/noncore/games/kpacman/referee.cpp
index 567a8ed..9edaabd 100644
--- a/noncore/games/kpacman/referee.cpp
+++ b/noncore/games/kpacman/referee.cpp
@@ -92,14 +92,14 @@ void Referee::paintEvent( QPaintEvent *e)
92 QPixmap p = pix->levelPix(); 92 QPixmap p = pix->levelPix();
93 bitBlt(this, rect.x(), rect.y(), 93 bitBlt(this, rect.x(), rect.y(),
94 &p, rect.x(), rect.y(), rect.width(), rect.height()); 94 &p, rect.x(), rect.y(), rect.width(), rect.height());
95 } 95 }
96 96
97 if ((gameState.testBit(GameOver) || gameState.testBit(Demonstration)) && 97 if ((gameState.testBit(GameOver) || gameState.testBit(Demonstration)) &&
98 rect.intersects(pix->rect(board->position(fruithome), i18n("GAME OVER")))) 98 rect.intersects(pix->rect(board->position(fruithome), tr("GAME OVER"))))
99 pix->draw(board->position(fruithome), Widget, i18n("GAME OVER"), RED); 99 pix->draw(board->position(fruithome), Widget, tr("GAME OVER"), RED);
100 100
101 for (Energizer *e = energizers->first(); e != 0; e = energizers->next()) { 101 for (Energizer *e = energizers->first(); e != 0; e = energizers->next()) {
102 if (e && e->state() == on && 102 if (e && e->state() == on &&
103 rect.intersects(pix->rect(e->position(), EnergizerPix)) && 103 rect.intersects(pix->rect(e->position(), EnergizerPix)) &&
104 !(e->position() == pacman->position() && gameState.testBit(Scoring))) { 104 !(e->position() == pacman->position() && gameState.testBit(Scoring))) {
105 if (e->pix() != -1) 105 if (e->pix() != -1)
@@ -154,22 +154,22 @@ void Referee::paintEvent( QPaintEvent *e)
154 154
155 if (gameState.testBit(LevelDone) && 155 if (gameState.testBit(LevelDone) &&
156 rect.intersects(pix->rect(pacman->position(), PacmanPix))) 156 rect.intersects(pix->rect(pacman->position(), PacmanPix)))
157 pix->draw(pacman->position(), Widget, PacmanPix, pacman->pix()); 157 pix->draw(pacman->position(), Widget, PacmanPix, pacman->pix());
158 158
159 if (gameState.testBit(Player) && 159 if (gameState.testBit(Player) &&
160 rect.intersects(pix->rect(board->position(monsterhome, 0), i18n("PLAYER ONE")))) 160 rect.intersects(pix->rect(board->position(monsterhome, 0), tr("PLAYER ONE"))))
161 pix->draw(board->position(monsterhome, 0), Widget, i18n("PLAYER ONE"), CYAN); 161 pix->draw(board->position(monsterhome, 0), Widget, tr("PLAYER ONE"), CYAN);
162 162
163 if (gameState.testBit(Ready) && 163 if (gameState.testBit(Ready) &&
164 rect.intersects(pix->rect(board->position(fruithome), i18n("READY!")))) 164 rect.intersects(pix->rect(board->position(fruithome), tr("READY!"))))
165 pix->draw(board->position(fruithome), Widget, i18n("READY!"), YELLOW); 165 pix->draw(board->position(fruithome), Widget, tr("READY!"), YELLOW);
166 166
167 if (gameState.testBit(Paused) && 167 if (gameState.testBit(Paused) &&
168 rect.intersects(pix->rect((BoardWidth*BoardHeight)/2-BoardWidth, i18n("PAUSED")))) 168 rect.intersects(pix->rect((BoardWidth*BoardHeight)/2-BoardWidth, tr("PAUSED"))))
169 pix->draw((BoardWidth*BoardHeight)/2-BoardWidth, Widget, i18n("PAUSED"), RED, BLACK); 169 pix->draw((BoardWidth*BoardHeight)/2-BoardWidth, Widget, tr("PAUSED"), RED, BLACK);
170} 170}
171 171
172void Referee::timerEvent( QTimerEvent *e ) 172void Referee::timerEvent( QTimerEvent *e )
173{ 173{
174 if (gameState.testBit(HallOfFame)) 174 if (gameState.testBit(HallOfFame))
175 return; 175 return;
@@ -837,16 +837,16 @@ void Referee::pause()
837 837
838 if (!gameState.testBit(Paused)) { 838 if (!gameState.testBit(Paused)) {
839 pausedTimer = gameTimer; 839 pausedTimer = gameTimer;
840 stop(); 840 stop();
841 stopEnergizer(); 841 stopEnergizer();
842 gameState.setBit(Paused); 842 gameState.setBit(Paused);
843 repaint(pix->rect((BoardWidth*BoardHeight)/2-BoardWidth, i18n("PAUSED")), FALSE); 843 repaint(pix->rect((BoardWidth*BoardHeight)/2-BoardWidth, tr("PAUSED")), FALSE);
844 } else { 844 } else {
845 gameState.clearBit(Paused); 845 gameState.clearBit(Paused);
846 repaint(pix->rect((BoardWidth*BoardHeight)/2-BoardWidth, i18n("PAUSED")), FALSE); 846 repaint(pix->rect((BoardWidth*BoardHeight)/2-BoardWidth, tr("PAUSED")), FALSE);
847 if (pausedTimer) { 847 if (pausedTimer) {
848 pausedTimer = 0; 848 pausedTimer = 0;
849 start(); 849 start();
850 } 850 }
851 } 851 }
852 emit togglePaused(); 852 emit togglePaused();
@@ -903,39 +903,39 @@ void Referee::introMonster(int id)
903 903
904void Referee::introPaint(int t) 904void Referee::introPaint(int t)
905{ 905{
906 QString pts; 906 QString pts;
907 907
908 switch (t) { 908 switch (t) {
909 case 0 : repaint(pix->draw(16, 6, RoomPix, i18n("CHARACTER"), WHITE, QColor(), AlignLeft), FALSE); 909 case 0 : repaint(pix->draw(16, 6, RoomPix, tr("CHARACTER"), WHITE, QColor(), AlignLeft), FALSE);
910 repaint(pix->draw(36, 6, RoomPix, i18n("/"), WHITE, QColor(), AlignLeft), FALSE); 910 repaint(pix->draw(36, 6, RoomPix, tr("/"), WHITE, QColor(), AlignLeft), FALSE);
911 repaint(pix->draw(40, 6, RoomPix, i18n("NICKNAME"), WHITE, QColor(), AlignLeft), FALSE); 911 repaint(pix->draw(40, 6, RoomPix, tr("NICKNAME"), WHITE, QColor(), AlignLeft), FALSE);
912 break; 912 break;
913 case 1 : introMonster(0); 913 case 1 : introMonster(0);
914 break; 914 break;
915 case 2 : repaint(pix->draw(16, 10, RoomPix, i18n("-SHADOW"), RED, QColor(), AlignLeft), FALSE); 915 case 2 : repaint(pix->draw(16, 10, RoomPix, tr("-SHADOW"), RED, QColor(), AlignLeft), FALSE);
916 break; 916 break;
917 case 3 : repaint(pix->draw(38, 10, RoomPix, i18n("\"BLINKY\""), RED, QColor(), AlignLeft), FALSE); 917 case 3 : repaint(pix->draw(38, 10, RoomPix, tr("\"BLINKY\""), RED, QColor(), AlignLeft), FALSE);
918 break; 918 break;
919 case 4 : introMonster(1); 919 case 4 : introMonster(1);
920 break; 920 break;
921 case 5 : repaint(pix->draw(16, 16, RoomPix, i18n("-SPEEDY"), PINK, QColor(), AlignLeft), FALSE); 921 case 5 : repaint(pix->draw(16, 16, RoomPix, tr("-SPEEDY"), PINK, QColor(), AlignLeft), FALSE);
922 break; 922 break;
923 case 6 : repaint(pix->draw(38, 16, RoomPix, i18n("\"PINKY\""), PINK, QColor(), AlignLeft), FALSE); 923 case 6 : repaint(pix->draw(38, 16, RoomPix, tr("\"PINKY\""), PINK, QColor(), AlignLeft), FALSE);
924 break; 924 break;
925 case 7 : introMonster(2); 925 case 7 : introMonster(2);
926 break; 926 break;
927 case 8 : repaint(pix->draw(16, 22, RoomPix, i18n("-BASHFUL"), CYAN, QColor(), AlignLeft), FALSE); 927 case 8 : repaint(pix->draw(16, 22, RoomPix, tr("-BASHFUL"), CYAN, QColor(), AlignLeft), FALSE);
928 break; 928 break;
929 case 9 : repaint(pix->draw(38, 22, RoomPix, i18n("\"INKY\""), CYAN, QColor(), AlignLeft), FALSE); 929 case 9 : repaint(pix->draw(38, 22, RoomPix, tr("\"INKY\""), CYAN, QColor(), AlignLeft), FALSE);
930 break; 930 break;
931 case 10 : introMonster(3); 931 case 10 : introMonster(3);
932 break; 932 break;
933 case 11 : repaint(pix->draw(16, 28, RoomPix, i18n("-POKEY"), ORANGE, QColor(), AlignLeft), FALSE); 933 case 11 : repaint(pix->draw(16, 28, RoomPix, tr("-POKEY"), ORANGE, QColor(), AlignLeft), FALSE);
934 break; 934 break;
935 case 12 : repaint(pix->draw(38, 28, RoomPix, i18n("\"CLYDE\""), ORANGE, QColor(), AlignLeft), FALSE); 935 case 12 : repaint(pix->draw(38, 28, RoomPix, tr("\"CLYDE\""), ORANGE, QColor(), AlignLeft), FALSE);
936 break; 936 break;
937 case 13 : pts.sprintf("%d", pointScore); 937 case 13 : pts.sprintf("%d", pointScore);
938 repaint(pix->draw(28, 44, RoomPix, pts.data(), WHITE, QColor(), AlignRight), FALSE); 938 repaint(pix->draw(28, 44, RoomPix, pts.data(), WHITE, QColor(), AlignRight), FALSE);
939 repaint(pix->draw(31, 44, RoomPix, "\x1C\x1D\x1E", WHITE, QColor(), AlignLeft), FALSE); 939 repaint(pix->draw(31, 44, RoomPix, "\x1C\x1D\x1E", WHITE, QColor(), AlignLeft), FALSE);
940 pts.sprintf("%d", energizerScore); 940 pts.sprintf("%d", energizerScore);
941 repaint(pix->draw(28, 48, RoomPix, pts.data(), WHITE, QColor(), AlignRight), FALSE); 941 repaint(pix->draw(28, 48, RoomPix, pts.data(), WHITE, QColor(), AlignRight), FALSE);
@@ -1093,14 +1093,14 @@ void Referee::play()
1093 repaint(); 1093 repaint();
1094 emit toggleNew(); 1094 emit toggleNew();
1095 emit setLifes(lifes); 1095 emit setLifes(lifes);
1096 emit setLevel(level); 1096 emit setLevel(level);
1097 emit setPoints(points); 1097 emit setPoints(points);
1098 1098
1099 repaint(pix->rect(board->position(monsterhome, 0), i18n("PLAYER ONE")), FALSE); 1099 repaint(pix->rect(board->position(monsterhome, 0), tr("PLAYER ONE")), FALSE);
1100 repaint(pix->rect(board->position(fruithome), i18n("READY!")), FALSE); 1100 repaint(pix->rect(board->position(fruithome), tr("READY!")), FALSE);
1101 1101
1102 timerCount = 0; 1102 timerCount = 0;
1103 QTimer::singleShot(playerDurMS, this, SLOT(ready())); 1103 QTimer::singleShot(playerDurMS, this, SLOT(ready()));
1104} 1104}
1105 1105
1106void Referee::ready() 1106void Referee::ready()
@@ -1111,26 +1111,26 @@ void Referee::ready()
1111 } 1111 }
1112 1112
1113 if (gameState.testBit(Player)) { 1113 if (gameState.testBit(Player)) {
1114 emit setLifes(--lifes); 1114 emit setLifes(--lifes);
1115 gameState.clearBit(Player); 1115 gameState.clearBit(Player);
1116 gameState.clearBit(Init); 1116 gameState.clearBit(Init);
1117 repaint(pix->rect(board->position(monsterhome, 0), i18n("PLAYER ONE")), FALSE); 1117 repaint(pix->rect(board->position(monsterhome, 0), tr("PLAYER ONE")), FALSE);
1118 repaintFigures(); 1118 repaintFigures();
1119 QTimer::singleShot(playerDurMS, this, SLOT(ready())); 1119 QTimer::singleShot(playerDurMS, this, SLOT(ready()));
1120 return; 1120 return;
1121 } 1121 }
1122 1122
1123 if (gameState.testBit(Ready)) { 1123 if (gameState.testBit(Ready)) {
1124 gameState.clearBit(Ready); 1124 gameState.clearBit(Ready);
1125 repaint(pix->rect(board->position(fruithome), i18n("READY!")), FALSE); 1125 repaint(pix->rect(board->position(fruithome), tr("READY!")), FALSE);
1126 start(); 1126 start();
1127 } else { 1127 } else {
1128 gameState.setBit(Ready); 1128 gameState.setBit(Ready);
1129 gameState.clearBit(Init); 1129 gameState.clearBit(Init);
1130 repaint(pix->rect(board->position(fruithome), i18n("READY!")), FALSE); 1130 repaint(pix->rect(board->position(fruithome), tr("READY!")), FALSE);
1131 QTimer::singleShot(readyDurMS, this, SLOT(ready())); 1131 QTimer::singleShot(readyDurMS, this, SLOT(ready()));
1132 } 1132 }
1133} 1133}
1134 1134
1135 1135
1136void Referee::levelUp() 1136void Referee::levelUp()
@@ -1291,13 +1291,13 @@ void Referee::killedPlay()
1291 gameState.setBit(GameOver); 1291 gameState.setBit(GameOver);
1292 gameState.clearBit(Playing); 1292 gameState.clearBit(Playing);
1293 for (int e = 0; e < board->energizers(); e++) { 1293 for (int e = 0; e < board->energizers(); e++) {
1294 energizers->at(e)->setOff(); 1294 energizers->at(e)->setOff();
1295 repaint(pix->rect(board->position(energizer, e), EnergizerPix), FALSE); 1295 repaint(pix->rect(board->position(energizer, e), EnergizerPix), FALSE);
1296 } 1296 }
1297 repaint(pix->rect(board->position(fruithome), i18n("GAME OVER")), FALSE); 1297 repaint(pix->rect(board->position(fruithome), tr("GAME OVER")), FALSE);
1298 QTimer::singleShot(gameOverDurMS, this, SLOT(hallOfFame())); 1298 QTimer::singleShot(gameOverDurMS, this, SLOT(hallOfFame()));
1299 } else { 1299 } else {
1300 gameState.clearBit(Init); 1300 gameState.clearBit(Init);
1301 initPacman(); 1301 initPacman();
1302 initFruit(); 1302 initFruit();
1303 initMonsters(); 1303 initMonsters();
diff --git a/noncore/games/kpacman/score.cpp b/noncore/games/kpacman/score.cpp
index 6e660e8..17dbf0a 100644
--- a/noncore/games/kpacman/score.cpp
+++ b/noncore/games/kpacman/score.cpp
@@ -72,32 +72,32 @@ Score::~Score()
72{ 72{
73 // write(); 73 // write();
74} 74}
75 75
76void Score::paintEvent( QPaintEvent *e) 76void Score::paintEvent( QPaintEvent *e)
77{ 77{
78 if (rect(1, 0, i18n(" 1UP ")).intersects(e->rect())) { 78 if (rect(1, 0, tr(" 1UP ")).intersects(e->rect())) {
79 QPixmap pix; 79 QPixmap pix;
80 QColor fg = BLACK; 80 QColor fg = BLACK;
81 if (cursor.on || paused || lastPlayer != 0) 81 if (cursor.on || paused || lastPlayer != 0)
82 fg = WHITE; 82 fg = WHITE;
83 pix = bitfont->text(i18n(" 1UP "), fg, BLACK); 83 pix = bitfont->text(tr(" 1UP "), fg, BLACK);
84 bitBlt(this, x(1), y(0), &pix); 84 bitBlt(this, x(1), y(0), &pix);
85 } 85 }
86 86
87 if (rect(8, 0, i18n(" HIGH SCORE ")).intersects(e->rect())) { 87 if (rect(8, 0, tr(" HIGH SCORE ")).intersects(e->rect())) {
88 QPixmap pix = bitfont->text(i18n(" HIGH SCORE "), WHITE, BLACK); 88 QPixmap pix = bitfont->text(tr(" HIGH SCORE "), WHITE, BLACK);
89 bitBlt(this, x(8), y(0), &pix); 89 bitBlt(this, x(8), y(0), &pix);
90 } 90 }
91 91
92 if (maxPlayer > 1 && rect(21, 0, i18n(" 2UP ")).intersects(e->rect())) { 92 if (maxPlayer > 1 && rect(21, 0, tr(" 2UP ")).intersects(e->rect())) {
93 QPixmap pix; 93 QPixmap pix;
94 QColor fg = BLACK; 94 QColor fg = BLACK;
95 if (cursor.on || paused || lastPlayer != 1) 95 if (cursor.on || paused || lastPlayer != 1)
96 fg = WHITE; 96 fg = WHITE;
97 pix = bitfont->text(i18n(" 2UP "), fg, BLACK); 97 pix = bitfont->text(tr(" 2UP "), fg, BLACK);
98 bitBlt(this, x(21), y(0), &pix); 98 bitBlt(this, x(21), y(0), &pix);
99 } 99 }
100 100
101 QString s; 101 QString s;
102 102
103 s.sprintf("%6d0", playerScore[0]/10); 103 s.sprintf("%6d0", playerScore[0]/10);
@@ -110,32 +110,32 @@ void Score::paintEvent( QPaintEvent *e)
110 if (rect(8, 1, s).intersects(e->rect())) { 110 if (rect(8, 1, s).intersects(e->rect())) {
111 QPixmap pix = bitfont->text(s, WHITE, BLACK); 111 QPixmap pix = bitfont->text(s, WHITE, BLACK);
112 bitBlt(this, x(8), y(1), &pix); 112 bitBlt(this, x(8), y(1), &pix);
113 } 113 }
114 114
115 if (lastScore >= 0) { 115 if (lastScore >= 0) {
116 if (rect(1, 4*1.25, i18n(" CONGRATULATIONS ")).intersects(e->rect())) { 116 if (rect(1, 4*1.25, tr(" CONGRATULATIONS ")).intersects(e->rect())) {
117 QPixmap pix = bitfont->text(i18n(" CONGRATULATIONS "), YELLOW, BLACK); 117 QPixmap pix = bitfont->text(tr(" CONGRATULATIONS "), YELLOW, BLACK);
118 bitBlt(this, x(1), y(4*1.25), &pix); 118 bitBlt(this, x(1), y(4*1.25), &pix);
119 } 119 }
120 if (rect(1, 6*1.25, i18n(" YOU HAVE ARCHIEVED ")).intersects(e->rect())) { 120 if (rect(1, 6*1.25, tr(" YOU HAVE ARCHIEVED ")).intersects(e->rect())) {
121 QPixmap pix = bitfont->text(i18n(" YOU HAVE ARCHIEVED "), CYAN, BLACK); 121 QPixmap pix = bitfont->text(tr(" YOU HAVE ARCHIEVED "), CYAN, BLACK);
122 bitBlt(this, x(1), y(6*1.25), &pix); 122 bitBlt(this, x(1), y(6*1.25), &pix);
123 } 123 }
124 if (rect(1, 7*1.25, i18n(" A SCORE IN THE TOP 10. ")).intersects(e->rect())) { 124 if (rect(1, 7*1.25, tr(" A SCORE IN THE TOP 10. ")).intersects(e->rect())) {
125 QPixmap pix = bitfont->text(i18n(" A SCORE IN THE TOP 10. "), CYAN, BLACK); 125 QPixmap pix = bitfont->text(tr(" A SCORE IN THE TOP 10. "), CYAN, BLACK);
126 bitBlt(this, x(1), y(7*1.25), &pix); 126 bitBlt(this, x(1), y(7*1.25), &pix);
127 } 127 }
128 if (rect(1, 8*1.25, i18n(" ")).intersects(e->rect())) { 128 if (rect(1, 8*1.25, tr(" ")).intersects(e->rect())) {
129 QPixmap pix = bitfont->text(i18n(" "), CYAN, BLACK); 129 QPixmap pix = bitfont->text(tr(" "), CYAN, BLACK);
130 bitBlt(this, x(1), y(8*1.25), &pix); 130 bitBlt(this, x(1), y(8*1.25), &pix);
131 } 131 }
132 } 132 }
133 133
134 if (rect(1, 9.5*1.25, i18n("RNK SCORE NAME DATE")).intersects(e->rect())) { 134 if (rect(1, 9.5*1.25, tr("RNK SCORE NAME DATE")).intersects(e->rect())) {
135 QPixmap pix = bitfont->text(i18n("RNK SCORE NAME DATE"), WHITE, BLACK); 135 QPixmap pix = bitfont->text(tr("RNK SCORE NAME DATE"), WHITE, BLACK);
136 bitBlt(this, x(1), y(9.5*1.25), &pix); 136 bitBlt(this, x(1), y(9.5*1.25), &pix);
137 } 137 }
138 138
139 for (int i = 0; i < 10; i++) { 139 for (int i = 0; i < 10; i++) {
140 s.sprintf("%2d%9d %-3.3s %-8.8s", 140 s.sprintf("%2d%9d %-3.3s %-8.8s",
141 i+1, hallOfFame[i].points, hallOfFame[i].name.utf8().data(), 141 i+1, hallOfFame[i].points, hallOfFame[i].name.utf8().data(),
@@ -152,14 +152,14 @@ void Score::paintEvent( QPaintEvent *e)
152 bitBlt(this, x(cursor.x), y(cursor.y*1.25), &pix); 152 bitBlt(this, x(cursor.x), y(cursor.y*1.25), &pix);
153 } 153 }
154 } 154 }
155 155
156 if (paused) { 156 if (paused) {
157 157
158 QPixmap pix = bitfont->text(i18n("PAUSED"), RED, BLACK); 158 QPixmap pix = bitfont->text(tr("PAUSED"), RED, BLACK);
159 QRect r = bitfont->rect(i18n("PAUSED")); 159 QRect r = bitfont->rect(tr("PAUSED"));
160 r.moveCenter(QPoint(this->width()/2, this->height()/2)); 160 r.moveCenter(QPoint(this->width()/2, this->height()/2));
161 161
162 bitBlt(this, r.x(), r.y(), &pix); 162 bitBlt(this, r.x(), r.y(), &pix);
163 } 163 }
164} 164}
165 165
@@ -172,16 +172,16 @@ void Score::timerEvent(QTimerEvent*)
172 172
173 if (cursor.x != -1 && cursor.y != -1) 173 if (cursor.x != -1 && cursor.y != -1)
174 repaint(rect(cursor.x, cursor.y*1.25, cursor.chr), FALSE); 174 repaint(rect(cursor.x, cursor.y*1.25, cursor.chr), FALSE);
175 scrollRepeat = FALSE; 175 scrollRepeat = FALSE;
176 176
177 if (lastPlayer == 0) 177 if (lastPlayer == 0)
178 repaint(rect(1, 0, i18n(" 1UP ")), FALSE); 178 repaint(rect(1, 0, tr(" 1UP ")), FALSE);
179 179
180 if (lastPlayer == 1) 180 if (lastPlayer == 1)
181 repaint(rect(21, 0, i18n(" 2UP ")), FALSE); 181 repaint(rect(21, 0, tr(" 2UP ")), FALSE);
182} 182}
183 183
184void Score::keyPressEvent(QKeyEvent *k) 184void Score::keyPressEvent(QKeyEvent *k)
185{ 185{
186 if (lastScore < 0 || lastPlayer < 0 || lastPlayer >= maxPlayer || paused) { 186 if (lastScore < 0 || lastPlayer < 0 || lastPlayer >= maxPlayer || paused) {
187 k->ignore(); 187 k->ignore();
@@ -478,26 +478,26 @@ void Score::read()
478 478
479void Score::write() 479void Score::write()
480{ 480{
481#ifndef QWS 481#ifndef QWS
482 if (!highscoreFile.exists() && highscoreFile.name() == systemHighscoreFileInfo.filePath()) 482 if (!highscoreFile.exists() && highscoreFile.name() == systemHighscoreFileInfo.filePath())
483 KMessageBox::information(0, 483 KMessageBox::information(0,
484 i18n("You're going to create the highscore-file\n" 484 tr("You're going to create the highscore-file\n"
485 "'%1'\n" 485 "'%1'\n"
486 "for your maschine, that should be used systemwide.\n" 486 "for your maschine, that should be used systemwide.\n"
487 "\n" 487 "\n"
488 "To grant access to the other users, set the appropriate rights (a+w)\n" 488 "To grant access to the other users, set the appropriate rights (a+w)\n"
489 "on that file or ask your systemadministator for that favor.\n" 489 "on that file or ask your systemadministator for that favor.\n"
490 "\n" 490 "\n"
491 "To use a different directory or filename for the highscores," 491 "To use a different directory or filename for the highscores,"
492 "specify them in the configfile (kpacmanrc:highscoreFilePath)." 492 "specify them in the configfile (kpacmanrc:highscoreFilePath)."
493 ).arg(systemHighscoreFileInfo.filePath())); 493 ).arg(systemHighscoreFileInfo.filePath()));
494 494
495 if (highscoreFile.name() == privateHighscoreFileInfo.filePath()) 495 if (highscoreFile.name() == privateHighscoreFileInfo.filePath())
496 KMessageBox::information(0, 496 KMessageBox::information(0,
497 i18n("You're using a private highscore-file, that's mostly because of\n" 497 tr("You're using a private highscore-file, that's mostly because of\n"
498 "missing write-access to the systemwide file\n" 498 "missing write-access to the systemwide file\n"
499 "'%1' .\n" 499 "'%1' .\n"
500 "\n" 500 "\n"
501 "Ask your systemadministrator for granting you access to that file,\n" 501 "Ask your systemadministrator for granting you access to that file,\n"
502 "by setting the appropriate rights (a+w) on it.\n" 502 "by setting the appropriate rights (a+w) on it.\n"
503 "\n" 503 "\n"
@@ -516,13 +516,13 @@ void Score::write()
516} 516}
517 517
518void Score::setPause(bool Paused) 518void Score::setPause(bool Paused)
519{ 519{
520 paused = Paused; 520 paused = Paused;
521 521
522 QRect r = bitfont->rect(i18n("PAUSED")); 522 QRect r = bitfont->rect(tr("PAUSED"));
523 r.moveCenter(QPoint(this->width()/2, this->height()/2)); 523 r.moveCenter(QPoint(this->width()/2, this->height()/2));
524 repaint(r, TRUE); 524 repaint(r, TRUE);
525 525
526 // repaint 1UP or 2UP 526 // repaint 1UP or 2UP
527 repaint(FALSE); 527 repaint(FALSE);
528} 528}
@@ -544,13 +544,13 @@ void Score::end()
544/* 544/*
545 * Return the date in a formatted QString. The format can be changed using internationalization 545 * Return the date in a formatted QString. The format can be changed using internationalization
546 * of the string "YY/MM/DD". Invalid QDate's where returned as "00/00/00". 546 * of the string "YY/MM/DD". Invalid QDate's where returned as "00/00/00".
547 */ 547 */
548QString Score::formatDate(QDate date) 548QString Score::formatDate(QDate date)
549{ 549{
550 QString s = i18n("@YY@/@MM@/@DD@"); 550 QString s = tr("@YY@/@MM@/@DD@");
551 551
552 QString dd; 552 QString dd;
553 dd.sprintf("%02d", date.isValid() ? date.year() % 100 : 0); 553 dd.sprintf("%02d", date.isValid() ? date.year() % 100 : 0);
554 s.replace(QRegExp("@YY@"), dd); 554 s.replace(QRegExp("@YY@"), dd);
555 dd.sprintf("%02d", date.isValid() ? date.month() : 0); 555 dd.sprintf("%02d", date.isValid() ? date.month() : 0);
556 s.replace(QRegExp("@MM@"), dd); 556 s.replace(QRegExp("@MM@"), dd);
diff --git a/noncore/games/kpacman/status.cpp b/noncore/games/kpacman/status.cpp
index 00d1f22..3453d37 100644
--- a/noncore/games/kpacman/status.cpp
+++ b/noncore/games/kpacman/status.cpp
@@ -45,17 +45,17 @@ QList<QPixmap> *Status::loadPixmap(QWidget *parent, QString pixmapName,
45 45
46 if (!pixmaps->isEmpty()) 46 if (!pixmaps->isEmpty())
47 pixmaps->clear(); 47 pixmaps->clear();
48 48
49 QPixmap PIXMAP(pixmapName); 49 QPixmap PIXMAP(pixmapName);
50 if (PIXMAP.isNull() || PIXMAP.mask() == NULL) { 50 if (PIXMAP.isNull() || PIXMAP.mask() == NULL) {
51 QString msg = i18n("The pixmap could not be contructed.\n\n" 51 QString msg = tr("The pixmap could not be contructed.\n\n"
52 "The file '@PIXMAPNAME@' does not exist,\n" 52 "The file '@PIXMAPNAME@' does not exist,\n"
53 "or is of an unknown format."); 53 "or is of an unknown format.");
54 msg.replace(QRegExp("@PIXMAPNAME@"), pixmapName); 54 msg.replace(QRegExp("@PIXMAPNAME@"), pixmapName);
55 QMessageBox::information(parent, i18n("Initialization Error"), 55 QMessageBox::information(parent, tr("Initialization Error"),
56 (const char *) msg); 56 (const char *) msg);
57 return 0; 57 return 0;
58 } 58 }
59 59
60 int height = PIXMAP.height(); 60 int height = PIXMAP.height();
61 int width = (height == 0) ? 0 : PIXMAP.width()/(PIXMAP.width()/height); 61 int width = (height == 0) ? 0 : PIXMAP.width()/(PIXMAP.width()/height);