summaryrefslogtreecommitdiff
path: root/src/gui/debugwindow.cpp
diff options
context:
space:
mode:
authorKess Vargavind <vargavind@gmail.com>2009-07-26 16:52:53 +0200
committerKess Vargavind <vargavind@gmail.com>2009-07-26 16:52:53 +0200
commitc98665d62a089c978189662c3f526464365f08fa (patch)
treeb6ac1a86376827ea411393f10775c2a6c5ae94c9 /src/gui/debugwindow.cpp
parentc7d5d825999912892d99c295ba7b583eaaa884ff (diff)
downloadMana-c98665d62a089c978189662c3f526464365f08fa.tar.gz
Mana-c98665d62a089c978189662c3f526464365f08fa.tar.bz2
Mana-c98665d62a089c978189662c3f526464365f08fa.tar.xz
Mana-c98665d62a089c978189662c3f526464365f08fa.zip
Gettext fixes
And a Swedish translation of the desktop file.
Diffstat (limited to 'src/gui/debugwindow.cpp')
-rw-r--r--src/gui/debugwindow.cpp32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp
index 4f18421b..1ddadba4 100644
--- a/src/gui/debugwindow.cpp
+++ b/src/gui/debugwindow.cpp
@@ -32,10 +32,11 @@
#include "particle.h"
#include "map.h"
+#include "utils/gettext.h"
#include "utils/stringutils.h"
DebugWindow::DebugWindow():
- Window("Debug")
+ Window(_("Debug"))
{
setWindowName("Debug");
setupWindow->registerWindowForReset(this);
@@ -45,19 +46,19 @@ DebugWindow::DebugWindow():
setSaveVisible(true);
setDefaultSize(400, 100, ImageRect::CENTER);
- mFPSLabel = new Label("0 FPS");
- mMusicFileLabel = new Label("Music: ");
- mMapLabel = new Label("Map: ");
- mMiniMapLabel = new Label("Mini-Map: ");
- mTileMouseLabel = new Label("Mouse: 0, 0");
- mParticleCountLabel = new Label("Particle count: 0");
+ mFPSLabel = new Label(strprintf(_("%d FPS"), 0));
+ mMusicFileLabel = new Label(strprintf(_("Music: %s"), ""));
+ mMapLabel = new Label(strprintf(_("Map: %s"), ""));
+ mMinimapLabel = new Label(strprintf(_("Minimap: %s"), ""));
+ mTileMouseLabel = new Label(strprintf(_("Tile: (%d, %d)"), 0, 0));
+ mParticleCountLabel = new Label(strprintf(_("Particle Count: %d"), 0));
place(0, 0, mFPSLabel, 3);
place(3, 0, mTileMouseLabel);
place(0, 1, mMusicFileLabel, 3);
place(3, 1, mParticleCountLabel);
place(0, 2, mMapLabel, 4);
- place(0, 3, mMiniMapLabel, 4);
+ place(0, 3, mMinimapLabel, 4);
loadWindowState();
}
@@ -71,27 +72,28 @@ void DebugWindow::logic()
int mouseTileX = (viewport->getMouseX() + viewport->getCameraX()) / 32;
int mouseTileY = (viewport->getMouseY() + viewport->getCameraY()) / 32;
- mFPSLabel->setCaption(toString(fps) + " FPS");
+ mFPSLabel->setCaption(strprintf(_("%d FPS"), fps));
- mTileMouseLabel->setCaption("Tile: (" + toString(mouseTileX) + ", " +
- toString(mouseTileY) + ")");
+ mTileMouseLabel->setCaption(strprintf(_("Tile: (%d, %d)"), mouseTileX,
+ mouseTileY));
Map *currentMap = engine->getCurrentMap();
if (currentMap)
{
+ // TODO: Add gettext support below
const std::string music =
"Music: " + currentMap->getProperty("music");
mMusicFileLabel->setCaption(music);
const std::string minimap =
- "MiniMap: " + currentMap->getProperty("minimap");
- mMiniMapLabel->setCaption(minimap);
+ "Minimap: " + currentMap->getProperty("minimap");
+ mMinimapLabel->setCaption(minimap);
const std::string map =
"Map: " + currentMap->getProperty("_filename");
mMapLabel->setCaption(map);
}
- mParticleCountLabel->setCaption("Particle count: " +
- toString(Particle::particleCount));
+ mParticleCountLabel->setCaption(strprintf(_("Particle count: %d"),
+ Particle::particleCount));
}